onresize=resize;var resizeCheck=new Array;var resizeFlag=true;function resize(){resizeCheck['hm1']=true;resizeCheck['hm2']=true;resizeCheck['vm']=true;if(resizeFlag){resizeFlag=false;var theDiv=document.getElementsByTagName("DIV");var obj;for(var i=0;i<theDiv.length;i++){obj=theDiv[i];if(obj&&obj.className&&obj.className.substr(0,7)=='section'){obj.removeAttribute('style')}}}};function wd_DropDownMenu(id){this.type="horizontal";this.delay={"show":200,"hide":200};this.position={"level1":{"top":1,"left":0},"levelX":{"top":0,"left":0}};this.zIndex={"visible":500,"hidden":-1};this.browser={"ie":Boolean(document.body.currentStyle),"ie5":(navigator.appVersion.indexOf("MSIE 5.5")!=-1||navigator.appVersion.indexOf("MSIE 5.0")!=-1),"ie6":(navigator.appVersion.indexOf("MSIE 6.0")!=-1)};if(!this.browser.ie){this.browser.ie5=false;this.browser.ie6=false}this.init=function(){var obj=document.getElementById(this.id);if(!obj){return alert("DropDownMenuX.init() failed. Element '"+this.id+"' does not exist.")}if(this.type!="horizontal"&&this.type!="vertical"){return}if(this.browser.ie&&this.browser.ie5){return}sizeWin();resizeCheck[this.id]=false;obj.onmouseover=this.reParse;parse(document.getElementById(this.id).childNodes,this.tree,this.id)};function sizeWin(){var obj=document.getElementById('main');if(obj){self.pageWidth=(obj.offsetWidth+pos(obj))-50;var objH=obj.offsetHeight+pos(obj);self.pageHeight=(document.body.offsetHeight<objH)?document.body.offsetHeight-50:objH-50}else{self.pageWidth=document.body.offsetWidth-50;self.pageHeight=document.body.offsetHeight-50}}this.reParse=function(){if(typeof resizeCheck!="undefined"&&resizeCheck[this.id]){resizeFlag=true;resizeCheck[this.id]=false;sizeWin();self.tree=[];parse(document.getElementById(this.id).childNodes,self.tree,this.id)}};function pos(obj){pos_x=0;pos_y=0;if(!obj)return 0;if(obj.offsetParent){var temp=obj;while(temp.offsetParent){temp=temp.offsetParent;pos_y+=temp.offsetTop;pos_x+=temp.offsetLeft}}pos_y+=obj.offsetTop;pos_x+=obj.offsetLeft;return pos_x}function parse(nodes,tree,id){for(var i=0;i<nodes.length;i++){if(1!=nodes[i].nodeType){continue}switch(nodes[i].className.substr(0,5)){case'item1':case'item2':nodes[i].id=id+"-"+tree.length;tree.push(new Array());nodes[i].onmouseover=itemOver;nodes[i].onmouseout=itemOut;break;case'secti':nodes[i].id=id+"-"+(tree.length-1)+"-section";nodes[i].onmouseover=sectionOver;nodes[i].onmouseout=sectionOut;var box1=document.getElementById(id+"-"+(tree.length-1));var box2=document.getElementById(nodes[i].id);if(box1){pos_x=0;pos_y=0;pos(box1);var el=new Element(box1.id);if(el.level==1){if("horizontal"==self.type){box2.style.top=box1.offsetTop+box1.offsetHeight+self.position.level1.top+"px";if((pos_x+box2.offsetWidth)>self.pageWidth){box2.style.left=((box1.offsetLeft+self.position.level1.left)-(box2.offsetWidth-box1.offsetWidth))+"px"}else box2.style.left=box1.offsetLeft+self.position.level1.left+"px"}else if("vertical"==self.type){if((pos_y+box2.offsetHeight)>self.pageHeight&&(pos_y-box2.offsetHeight)>0)box2.style.top=box1.offsetTop+box1.offsetHeight-box2.offsetHeight+"px";else box2.style.top=box1.offsetTop+self.position.level1.top+"px";if((pos_x+box2.offsetWidth)>self.pageWidth){box2.style.left=pos_x-box2.offsetWidth+'px'}else box2.style.left=box1.offsetLeft+box1.offsetWidth+self.position.level1.left+"px"}}else{if((pos_y+box2.offsetHeight)>self.pageHeight&&(pos_y-box2.offsetHeight)>0)box2.style.top=box1.offsetTop+box1.offsetHeight-box2.offsetHeight+"px";else box2.style.top=box1.offsetTop+self.position.levelX.top+"px";if((pos_x+(box2.offsetWidth*2))>self.pageWidth){box2.style.left=-(box2.offsetWidth)+"px"}else{box2.style.left=box1.offsetLeft+box1.offsetWidth+self.position.levelX.left+"px"}}}self.sections.push(nodes[i].id);self.sectionsShowCnt.push(0);self.sectionsHideCnt.push(0);break}if(nodes[i].childNodes){if(/\bsection\b/.test(nodes[i].className)){parse(nodes[i].childNodes,tree[tree.length-1],id+"-"+(tree.length-1))}else{parse(nodes[i].childNodes,tree,id)}}}}function itemOver(){self.itemShowCnt++;var id_section=this.id+"-section";if(self.visible.length){var el=new Element(self.visible.getLast());el=document.getElementById(el.getParent().id);if(/item\d-active/.test(el.className)){el.className=el.className.replace(/(item\d)-active/,"$1")}}if(self.sections.contains(id_section)){clearTimers();self.sectionsHideCnt[self.sections.indexOf(id_section)]++;var cnt=self.sectionsShowCnt[self.sections.indexOf(id_section)];var timerId=setTimeout(function(a,b){return function(){self.showSection(a,b)}}(id_section,cnt),self.delay.show);self.timers.push(timerId)}else{if(self.visible.length){clearTimers();var timerId=setTimeout(function(a,b){return function(){self.showItem(a,b)}}(this.id,self.itemShowCnt),self.delay.show);self.timers.push(timerId)}}}function itemOut(){self.itemShowCnt++;var id_section=this.id+"-section";if(self.sections.contains(id_section)){self.sectionsShowCnt[self.sections.indexOf(id_section)]++;if(self.visible.contains(id_section)){var cnt=self.sectionsHideCnt[self.sections.indexOf(id_section)];var timerId=setTimeout(function(a,b){return function(){self.hideSection(a,b)}}(id_section,cnt),self.delay.hide);if(!this.className||this.className.substr(0,this.className.indexOf('-'))!='item1'){self.timers.push(timerId)}}}}function sectionOver(){self.sectionsHideCnt[self.sections.indexOf(this.id)]++;var el=new Element(this.id);var parent=document.getElementById(el.getParent().id);if(!/item\d-active/.test(parent.className)){parent.className=parent.className.replace(/(item\d)/,"$1-active")}}function sectionOut(){self.sectionsShowCnt[self.sections.indexOf(this.id)]++;var cnt=self.sectionsHideCnt[self.sections.indexOf(this.id)];var timerId=setTimeout(function(a,b){return function(){self.hideSection(a,b)}}(this.id,cnt),self.delay.hide);self.timers.push(timerId)}this.showSection=function(id,cnt){if(typeof cnt!="undefined"){if(cnt!=this.sectionsShowCnt[this.sections.indexOf(id)]){return}}this.sectionsShowCnt[this.sections.indexOf(id)]++;if(this.visible.length){if(id==this.visible.getLast()){return}var el=new Element(id);var parents=el.getParentSections();for(var i=this.visible.length-1;i>=0;i--){if(parents.contains(this.visible[i])){break}else{this.hideSection(this.visible[i])}}}var el=new Element(id);var parent=document.getElementById(el.getParent().id);if(!/item\d-active/.test(parent.className)){parent.className=parent.className.replace(/(item\d)/,"$1-active")}if(document.all){document.getElementById(id).style.display="block"}document.getElementById(id).style.visibility="visible";document.getElementById(id).style.zIndex=this.zIndex.visible;this.visible.push(id)};this.showItem=function(id,cnt){if(typeof cnt!="undefined"){if(cnt!=this.itemShowCnt){return}}this.itemShowCnt++;if(this.visible.length){var el=new Element(id+"-section");var parents=el.getParentSections();for(var i=this.visible.length-1;i>=0;i--){if(parents.contains(this.visible[i])){break}else{this.hideSection(this.visible[i])}}}};this.hideSection=function(id,cnt){if(typeof cnt!="undefined"){if(cnt!=this.sectionsHideCnt[this.sections.indexOf(id)]){return}if(id==this.visible.getLast()){for(var i=this.visible.length-1;i>=0;i--){this.hideSection(this.visible[i])}return}}var el=new Element(id);var parent=document.getElementById(el.getParent().id);if(/item\d-active/.test(parent.className)){parent.className=parent.className.replace(/(item\d)-active/,"$1")}document.getElementById(id).style.zIndex=this.zIndex.hidden;document.getElementById(id).style.visibility="hidden";if(document.all){document.getElementById(id).style.display="none"}if(this.visible.contains(id)){if(id==this.visible.getLast()){this.visible.pop()}else{return}}else{return};this.sectionsHideCnt[this.sections.indexOf(id)]++};function Element(id){this.menu=self;this.id=id;this.getLevel=function(){var s=this.id.substr(this.menu.id.length);return s.substrCount("-")};this.getParent=function(){var s=this.id.substr(this.menu.id.length);var a=s.split("-");a.pop();return new Element(this.menu.id+a.join("-"))};this.hasParent=function(){var s=this.id.substr(this.menu.id.length);var a=s.split("-");return a.length>2};this.hasChilds=function(){return Boolean(document.getElementById(this.id+"-section"))};this.getParentSections=function(){var s=this.id.substr(this.menu.id.length);s=s.substr(0,s.length-"-section".length);var a=s.split("-");a.shift();a.pop();var s=this.menu.id;var parents=[];for(var i=0;i<a.length;i++){s+=("-"+a[i]);parents.push(s+"-section")}return parents};this.level=this.getLevel()}function clearTimers(){for(var i=self.timers.length-1;i>=0;i--){clearTimeout(self.timers[i]);self.timers.pop()}}var self=this;this.id=id;this.tree=[];this.sections=[];this.sectionsShowCnt=[];this.sectionsHideCnt=[];this.itemShowCnt=0;this.timers=[];this.visible=[]}if(typeof Array.prototype.indexOf=="undefined"){Array.prototype.indexOf=function(item){for(var i=0;i<this.length;i++){if(this[i]===item){return i}}return-1}}if(typeof Array.prototype.contains=="undefined"){Array.prototype.contains=function(s){for(var i=0;i<this.length;i++){if(this[i]===s){return true}}return false}}if(typeof String.prototype.substrCount=="undefined"){String.prototype.substrCount=function(s){return this.split(s).length-1}}if(typeof Array.prototype.getLast=="undefined"){Array.prototype.getLast=function(){return this[this.length-1]}}