// set up drop downs anywhere in the body of the page. I think the bottom of the page is better.. // but you can experiment with effect on loadtime. if (mtDropDown.isSupported()) { //================================================================================================== // create a set of dropdowns //================================================================================================== // the first param should always be down, as it is here // // The second and third param are the top and left offset positions of the menus from their actuators // respectively. To make a menu appear a little to the left and bottom of an actuator, you could use // something like -5, 5 // // The last parameter can be .topLeft, .bottomLeft, .topRight, or .bottomRight to inidicate the corner // of the actuator from which to measure the offset positions above. Here we are saying we want the // menu to appear directly below the bottom left corner of the actuator //================================================================================================== var ms = new mtDropDownSet(mtDropDown.direction.down, 0, 0, mtDropDown.reference.bottomLeft); //================================================================================================== // create a dropdown menu //================================================================================================== // the first parameter should be the HTML element which will act actuator for the menu //================================================================================================== var menu1 = ms.addMenu(document.getElementById("menu1")); menu1.addItem("- 协会概况", "/html/aboutszpa/xiehuigaikuang/"); menu1.addItem("- 协会宗旨", "/html/aboutszpa/xiehuizongzhi/"); menu1.addItem("- 协会章程", "/html/aboutszpa/xiehuizhangcheng/"); menu1.addItem("- 协会领导", "/html/aboutszpa/xiehuilingdao/"); menu1.addItem("- 组织架构", "/html/aboutszpa/zuzhijiagou/"); //menu1.addItem("- 入会申请", "/member/index_do.php?fmdo=user&dopost=regnew"); menu1.addItem("- 入会申请", "/plus/regszports.php"); menu1.addItem("- 会员单位", "/html/aboutszpa/huiyuandanwei/"); //================================================================================================== //================================================================================================== // add a sub-menu //================================================================================================== // to add a sub menu to an existing menu object, call it's addMenu method and pass it the item from // the parent menu which should act as it's actuator. To add a submenu to the fourth item of a menu // called "theMenu", you would do theMenu.addMenu(theMenu.items[3]) //================================================================================================== /* var subMenu1 = menu1.addMenu(menu1.items[0]); subMenu1.addItem("?(ss) Shared-Server", "http://www.mediatemple.net/services/webhosting/ss/linux-standard/"); subMenu1.addItem("?(as) Appliance-Server", "http://www.mediatemple.net/services/webhosting/as/linux/"); subMenu1.addItem("?(ds) Dedicated-Server", "http://www.mediatemple.net/services/webhosting/ds/linux/"); subMenu1.addItem("?(fc) Flash Communication Server MX", "http://www.mediatemple.net/services/webhosting/flashcom/shared/"); subMenu1.addItem("?Infrastructure/Technology", "http://www.mediatemple.net/company/aboutus/techology-infrastructure.php"); */ // submenu // var subMenu2 = menu1.addMenu(menu1.items[2]); // subMenu2.addItem("?Mad Merch (full solution)", "http://www.mediatemple.net/services/madmerch/"); var menu2 = ms.addMenu(document.getElementById("menu2")); menu2.addItem("- 协会信息", "/html/paactivity/xiehuixinxi/"); //menu2.addItem("- 文件通知", "/html/paactivity/wenjiantongzhi/"); //var menu3 = ms.addMenu(document.getElementById("menu3")); //var menu4 = ms.addMenu(document.getElementById("menu4")); var menu5 = ms.addMenu(document.getElementById("menu5")); menu5.addItem("- 深圳港统计数据", "/html/pastatistics/shenchougangkoutuliang/"); menu5.addItem("- 行业统计数据", "/html/pastatistics/xingyetongjishuju/"); var menu6 = ms.addMenu(document.getElementById("menu6")); menu6.addItem("- 《深圳港口》", "/html/pamagazine/shenchougangkou/"); menu6.addItem("- 《深圳港航与货运信息》", "/html/pamagazine/shenchougangkouxiehuidianzitongxun/"); //var menu7 = ms.addMenu(document.getElementById("menu7")); //menu7.addItem("- 行业视点", "/html/paexpert/"); var menu8 = ms.addMenu(document.getElementById("menu8")); menu8.addItem("- 行业知识", "/html/padata/xingyezhishi/"); menu8.addItem("- 中国港口", "/html/padata/guonagangkou/"); menu8.addItem("- 国际港口", "/html/padata/guojigangkou/"); var menu9 = ms.addMenu(document.getElementById("menu9")); menu9.addItem("- 证书查询", "/html/patrain/"); menu9.addItem("- 培训项目", "/html/patrain/peixunxiangmu/"); //menu9.addItem("- 证书查询", "http://www.mediatemple.net/company/"); var menu10 = ms.addMenu(document.getElementById("menu10")); //menu10.addItem("- 联系方式", "/html/pacontact/lianxifangshi/"); menu10.addItem("- 协会地图", "/html/pacontact/xiehuiditu/"); menu10.addItem("- 在线留言", "/plus/guestbook/"); //================================================================================================== // write drop downs into page //================================================================================================== // this method writes all the HTML for the menus into the page with document.write(). It must be // called within the body of the HTML page. //================================================================================================== mtDropDown.renderAll(); }