//ddTab 结束 //dropdowncontent 开始 //init:("anchorID", "positionString", glideduration, "revealBehavior") 位置:("left-bottom", "right-bottom", "left-top", or "right-top") 关闭:关闭 var dropdowncontent={ disableanchorlink: false, //设置是否click产生链接 hidedivmouseout: [true, 200], //设置激发产生的层显示的默认时间:[hide_div_onmouseover ?miliseconds_before_hiding] ajaxloadingmsg: "载入链接中……", //ajax页面的时候的载入文字 ajaxbustcache: true, //是否缓存 getposOffset:function(what, offsettype){ return (what.offsetParent)? what[offsettype]+this.getposOffset(what.offsetParent, offsettype) : what[offsettype] }, isContained:function(m, e){ var e=window.event || e var c=e.relatedTarget || ((e.type=="mouseover")? e.fromElement : e.toElement) while (c && c!=m)try {c=c.parentNode} catch(e){c=m} if (c==m) return true else return false }, show:function(anchorobj, subobj, e){ if (!this.isContained(anchorobj, e) || (e && e.type=="click")){ var e=window.event || e if (e.type=="click" && subobj.style.visibility=="visible"){ subobj.style.visibility="hidden" return } var horizontaloffset=(subobj.dropposition[0]=="left")? -(subobj.offsetWidth-anchorobj.offsetWidth) : 0 //calculate user added horizontal offset var verticaloffset=(subobj.dropposition[1]=="top")? -subobj.offsetHeight : anchorobj.offsetHeight //calculate user added vertical offset subobj.style.left=this.getposOffset(anchorobj, "offsetLeft") + horizontaloffset + "px" subobj.style.top=this.getposOffset(anchorobj, "offsetTop")+verticaloffset+"px" subobj.style.clip=(subobj.dropposition[1]=="top")? "rect(auto auto auto 0)" : "rect(0 auto 0 0)" //hide drop down box initially via clipping subobj.style.visibility="visible" subobj.startTime=new Date().getTime() subobj.contentheight=parseInt(subobj.offsetHeight) if (typeof window["hidetimer_"+subobj.id]!="undefined") //clear timer that hides drop down box? clearTimeout(window["hidetimer_"+subobj.id]) this.slideengine(subobj, (subobj.dropposition[1]=="top")? "up" : "down") } }, curveincrement:function(percent){ return (1-Math.cos(percent*Math.PI)) / 2 //return cos curve based value from a percentage input }, slideengine:function(obj, direction){ var elapsed=new Date().getTime()-obj.startTime //get time animation has run if (elapsed