//Pop-it menu- By Dynamic Drive - Modified by Wbird //For full source code and more DHTML scripts, visit http://www.dynamicdrive.com //This credit MUST stay intact for use var menuOffX=0 //菜单距连接文字最左端距离 var menuOffY=18 //菜单距连接文字顶端距离 var fo_shadows=new Array() var linkset=new Array() ////No need to edit beyond here var ie4=document.all&&navigator.userAgent.indexOf("Opera")==-1 var ns6=document.getElementById&&!document.all var ns4=document.layers function showmenu(e,index,p,paging){ //p为当前页数,paging为当前是不是翻页 if (!document.all&&!document.getElementById&&!document.layers) return which=linkset[index] var pSize=10 //每页连接数 var pNum=Math.floor((which.length-1)/pSize)+1 //页数 clearhidemenu() ie_clearshadow() //设置菜单内容 if (pNum==1){ which=which.join("") }else{ which=which.slice( (p-1)*pSize, p*pSize ) which=which.join("") which+="
" if (p==1) { which+="    7" }else{ which+="    7" } if (p==pNum) { which+="8" }else{ which+="8" } which+="
" } menuobj=ie4? document.all.popmenu : ns6? document.getElementById("popmenu") : ns4? document.popmenu : "" menuobj.thestyle=(ie4||ns6)? menuobj.style : menuobj if (ie4||ns6) menuobj.innerHTML=which else{ menuobj.document.write(''+which+'') menuobj.document.close() } menuobj.contentwidth=(ie4||ns6)? menuobj.offsetWidth : menuobj.document.gui.document.width menuobj.contentheight=(ie4||ns6)? menuobj.offsetHeight : menuobj.document.gui.document.height eventX=ie4? event.clientX : ns6? e.clientX : e.x eventY=ie4? event.clientY : ns6? e.clientY : e.y var rightedge=ie4? document.body.clientWidth-eventX : window.innerWidth-eventX var bottomedge=ie4? document.body.clientHeight-eventY : window.innerHeight-eventY if (!paging) { if (rightedge0; i--) { var rect = document.createElement('div'); var rs = rect.style rs.position = 'absolute'; rs.left = (el.style.posLeft + i) + 'px'; rs.top = (el.style.posTop + i) + 'px'; rs.width = el.offsetWidth + 'px'; rs.height = el.offsetHeight + 'px'; rs.zIndex = el.style.zIndex - i; rs.backgroundColor = color; var opacity = 1 - i / (i + 1); rs.filter = 'alpha(opacity=' + (100 * opacity) + ')'; el.insertAdjacentElement('afterEnd', rect); // 输出阴影,若不想要投影,可以注释此句 fo_shadows[fo_shadows.length] = rect; } } function ie_clearshadow() { for(var i=0;i0) o.style.zoom=zoom+'%'; return false; }