function sl_dropDown(params){this.params=params;this.params.currentDiv=null;this.hideDropDown=function(level){if(params.t){clearTimeout(params.t);params.t=null}if(level==0){params.buttonD.className="nav"}for(var i=params.current_level;i>=level;i--){try{params.div_tree[i].parentNode.removeChild(params.div_tree[i])}catch(e){}}params.current_level=level-1};this.containerOver=function(overOrOut){if(overOrOut){if(params.t){clearTimeout(params.t);params.t=null}}else if(!params.t){params.t=setTimeout("if (document.getElementById('"+params.currentDiv.id+"')) { document.getElementById('"+params.currentDiv.id+"').dd_ob.hideDropDown(0); }",20)}};this.showDropDown=function(fromD,menu,level,overOrOut,index){if(!overOrOut){if(!params.t){params.t=setTimeout("if (document.getElementById('"+params.currentDiv.id+"')) { document.getElementById('"+params.currentDiv.id+"').dd_ob.hideDropDown(0); }",20)}return}if(params.t){clearTimeout(params.t);params.t=null}if(level==params.current_level){if(index!=params.level_tree[level]){this.hideDropDown(level)}else{return}}if(level==0){params.buttonD=fromD}var parentD=level==0?document.body:fromD;if(level<params.current_level){this.hideDropDown(level)}if(!menu)return;var d=document.createElement("div");d.id="sl_dd_"+level+"_"+index;d.className="dd_container";var pos=this.getDBox(fromD,level!=0);d.style.left=(level==0?pos.x1:pos.w+params.offW)+"px";d.style.top=(level==0?pos.y2:pos.y1+params.offH)+"px";d.dd_ob=this;d.onmouseover=function(e){this.dd_ob.containerOver(true);return this.dd_ob.stopEvent(e)};d.onmouseout=function(e){this.dd_ob.containerOver(false);return this.dd_ob.stopEvent(e)};for(var i=0;i<menu.length;i++){var d2=document.createElement("div");d2.className="dd_item";d2.innerHTML=menu[i].title;d2.menu=menu[i];d2.num=i;d2.level=level;d2.dd_ob=this;d2.onmouseover=function(e){this.dd_ob.showDropDown(this,this.menu.children,this.level+1,true,this.num);this.className="dd_item dd_over";return this.dd_ob.stopEvent(e)};d2.onmouseout=function(e){this.dd_ob.showDropDown(this,this.menu.children,this.level+1,false,this.num);this.className="dd_item";return this.dd_ob.stopEvent(e)};if(menu[i].url){d2.onclick=function(e){window.location.href=this.menu.url;return this.dd_ob.stopEvent(e)}}if(menu[i].children&&navigator.userAgent.indexOf('MSIE')==-1){d3=document.createElement("div");d3.className="dd_more";d2.appendChild(d3)}d.appendChild(d2)}params.div_tree[level]=d;params.level_tree[level]=index;parentD.appendChild(d);params.current_level=level;params.currentDiv=d};this.navOver=function(d,over,n,currentPage){params.currentPage=currentPage;if(!currentPage&&over){d.className="nav navOver"}var n=n.split(/[^A-Za-z0-9]/).join("");if(params.dd[n]){this.showDropDown(d,params.dd[n],0,over,n)}else if(!currentPage&&!over){d.className="nav"}};this.stopEvent=function(e){if(!e&&window.event)e=window.event;if(e){e.cancelBubble=true;if(e.preventDefault){e.preventDefault()}}return false};this.getDBox=function(d,onlyFirst){if(!d)return false;var rv=Object();rv.y1=rv.x1=0;rv.x2=d.offsetWidth;rv.y2=d.offsetHeight;if(d){do{rv.x1+=d.offsetLeft-d.scrollLeft;rv.y1+=d.offsetTop-d.scrollTop;d=d.offsetParent}while(d&&!onlyFirst)}rv.x2+=rv.x1;rv.y2+=rv.y1;rv.w=rv.x2-rv.x1;rv.h=rv.y2-rv.y1;return rv}};

