function $(id) { return document.getElementById(id); } function rd(n) { var s = Math.random().toString().substr(2); if (n) { s = s.substr(0, n); } return s; } function collapse(ctrlobj, showobj) { if(!$(showobj)) { return; } if($(showobj).style.display == '') { ctrlobj.className = 'spread'; $(showobj).style.display = 'none'; } else { ctrlobj.className = 'shrink'; $(showobj).style.display = ''; } } function getMenu() { var menu = [ ['手册首页','index.htm'], ['基础文档','base.htm'], [ ['全局配置【config.xml】','config.htm'], ['媒体列表【list.xml】','list.htm'], ['皮肤配置【skin.xml】','skin.htm'] ], ['API接口','api.htm'], [ ['ActionScript3接口','api_as3.htm'], ['JavaScript接口','api_js.htm'] ], ['使用范例','example.htm'], ['常用工具','tools.htm'] ]; var f = location.href.split("?")[0]; f = f.substr(f.lastIndexOf('/') + 1); f = f.split("#")[0]; var htm = '