function gmobj(mtxt){if(_d.getElementById){m=_d.getElementById(mtxt)}else if(_d.all){m=_d.all[mtxt]}else if(_d.layers){m=_d[mtxt]}return m;}
function gmstyle(mtxt){m=gmobj(mtxt);if(!ns4){if(m)m=m.style;}return m;}
function spos(gm,t_,l_,h_,w_){px="px";if(ns4){px="";gms=gm;if(w_!=null)gms.clip.width=w_;if(h_!=null)gms.clip.height=h_;}else if(opra){px="";gms=gm.style;if(w_!=null)gms.pixelWidth=w_;if(h_!=null)gms.pixelHeight=h_}else{gms=gm.style;if(w_!=null)gms.width=w_+px;if(h_!=null)gms.height=h_+px;}if(t_!=null)gms.top=t_+px;if(l_!=null)gms.left=l_+px}
function gpos(gm){if(ns4){t_=gm.top;l_=gm.left;h_=gm.clip.height;w_=gm.clip.width;}else if(opra){t_=gm.offsetTop;l_=gm.offsetLeft;h_=gm.offsetHeight;w_=gm.offsetWidth;}else if(ns6){t_=gm.offsetTop;l_=gm.offsetLeft;h_=gm.offsetHeight;w_=gm.offsetWidth}else{if(mac){topM=gm.offsetParent.topMargin;if(!topM)topM=0;leftM=gm.offsetParent.leftMargin;if(!leftM)leftM=0;t_=parseInt(topM)+gm.offsetTop;l_=parseInt(leftM)+gm.offsetLeft;}else{t_=gm.offsetTop;l_=gm.offsetLeft;}h_=gm.offsetHeight;w_=gm.offsetWidth;}if(konq){w_=parseInt(gm.style.width);h_=parseInt(gm.style.height);}var gpa=new Array();gpa[0]=t_;gpa[1]=l_;gpa[2]=h_;gpa[3]=w_;return(gpa)}
function getMouseXY(e){if(ns4||ns6){MouseX=e.pageX;MouseY=e.pageY;}else{MouseX=event.clientX;MouseY=event.clientY}if(!opra&&_d.all){MouseX=MouseX+_d.body.scrollLeft;MouseY=MouseY+_d.body.scrollTop;if(IEDtD)MouseY=MouseY+sy}if(inDragMode){gm=gmobj(DragLayer);spos(gm,MouseY-DragY,MouseX-DragX);return false}return true}
function parseLink(txt,what){txt=txt+";";lt="";if(what=="link"){if(txt.indexOf(""")>0){lt=txt}else{sp=txt.indexOf(" ");lt=txt.substr(0,sp);}}else{sp=txt.indexOf(what)+what.length+1;if(sp>what.length){lt=txt.substr(sp,999);lt=lt.substr(0,lt.indexOf(";"))}}return lt}
function cHexColor(_c){return _c.match(/^[0-9a-f]{6,6}$/i) ? '#' + _c.toUpperCase() : _c;}
function stch(ms){window.status=ms;return true}
function fixForm(divname,show){if(ie55||ns6||mac)return;mfrms=divname.split(";");for(oa=0;oa<mfrms.length;oa++){if(opra||ns4){SDiv(mfrms[oa],show)}else{gmf=_d.forms[mfrms[oa]];if(gmf){for(foa=0;foa<gmf.length;foa++){if(gmf.elements[foa].type.substr(0,7)=="select-"){fobj=gmf.elements[foa].style;if(show){fobj.visibility="visible";fobj.overflow="visible"}else{fobj.visibility="hidden";fobj.overflow="hidden"}}}}}}}
function SDiv(nm,sh){if(ns4&&nm.indexOf(".")>0)tD=eval(nm); else tD=gmstyle(nm);if(tD)if(sh)tD.visibility="visible";else {tD.visibility="hidden";if(ie55){gmif=gmobj("if"+nm);if(gmif)gmif.style.visibility='hidden';}}}
function close_el(){for(xa=hlarr.length-1;xa>=0;xa--){ti=hlarr[xa].split("@");if(!ns4&&SoImG[ti[1]]){stimo="im_"+ti[0].substring(4,99)+"_"+ti[1]+"_"+ti[0];stimo=gmobj(stimo);menu=eval(ti[0]);if(menu[11]==1)stimo.src=menu[6][16]; else stimo.src=menu[6][10];}tmenu=eval(ti[0]);if(ns4){shl(ti[0],ti[1],'hide')}else{arg=gmobj("el"+ti[1]);arg.style.background=ti[2];arg.style.color=""+ti[3];if(ti[4])arg.style.borderColor=ti[4]}if(ti[0]==hll){if(ns4)shl(ti[0],hel,'show');return}}hlcnt=0;hlarr=new Array()}
function closeallmenus(){ShM=0;om="";hll="";close_el();if(ParentMenu){if(ParentMenu.closeFel)ParentMenu.close_el();}if(pf&&pf.MLoaded){pf.closeallmenus();}if(ns4){omv.visibility="hide"}for(a=1;a<menus;a++){menu=eval("menu"+a);if(menu[17]&&MLoaded>1)fixForm(menu[17],1);if(menu[7]!=1)SDiv("menu"+a,0);else _am=""}}
function rep_img(){if(timo&&timo.src!=o_img){timo.src=o_img}}
function popdn(){arg=popdn.arguments;if(arg[0]){if(arg[3].substr(0,5)!="show-"){if(ns4){shl(arg[2],arg[1],"hide")}else{arg[0].style.background=arg[4];arg[0].style.color=arg[5];if(arg[6])arg[0].style.borderColor=arg[6]}}else{if(ns4)omv=0;hlarr[hlcnt]=arg[2]+"@"+arg[1]+"@"+arg[4]+"@"+arg[5]+"@"+arg[6];hlcnt++;}menu=eval(arg[2]);if(!menu[12]){clearTimeout(Mtimer);Mtimer=setTimeout("closeallmenus();resetShM();",timegap)}}else{clearTimeout(Mtimer);Mtimer=setTimeout("closeallmenus();resetShM",timegap)}}
function dc(){if(nshl.indexOf("show-menu=")>-1)return;tr=ltarg.split("=");if(tr[1])parent.frames[tr[1]].location.href=nshl;else location.href=nshl;}
function getMenuByName(mn){mn=mn.toLowerCase();for(a=1;a<menus;a++){if(mn==Mname[a]){return a;}}return a;}
function getMenuItem(mn,item){for(a=1;a<mn;a++){menu=eval("menu"+a);item=item+((menu.length-ac)/5)}item--;return item}
function sis(){for(a=1;a<imar.length;a++){tim=imar[a].split("_");if(tim[4]){tim[3]=tim[3]+"_"+tim[4]}menu=eval(tim[3]);if(ns4){im=_d.layers[tim[3]].document.layers["el"+tim[2]];imp=gpos(im);eln="";for(x=0;x<2;x++){imo=_d.layers[tim[3]].document.layers[eln+"el"+tim[2]].document.layers[imar[a]];imop=gpos(imo);imL=imp[3]-(imop[3]);imT=(imp[2]/2)-(imop[2]/2);if(menu[15])imL=1;if(menu[13]=="left")imL=1;if(menu[13]=="center")imL=(imp[3]/2);eln="m";spos(imo,imT,imL,null,null);}}else{imo=gmobj(imar[a]);imop=gpos(imo);im=gmobj("el"+tim[2]);imp=gpos(im);if(mac){x=menu[6][9];imp[0]=imp[0]-x;imop[0]=imo[0]-x}if(menu[11]){imco=gpos(gmobj("hel"+tim[2]));imc=imco[1];}else{imc=0}imT=imp[0]+(imp[2]/2)-(imop[2]/2);imL=imc+imp[3]-(imop[3]);if(menu[15])imL=imc;if(menu[13]=="left")imL=imc;if(menu[13]=="center")imL=imc+(imp[3]/2);if(ns6&&!ns61){nsC=gpos(gmobj(tim[3]));imT=imT-nsC[0];imL=imL-nsC[1]}spos(imo,imT,imL,null,null);}}}
function fixb(mnu){menu=eval(mnu);ic=(menu.length-ac)/5;menu[21][2]=1;m42=menu[4]*2;mn=gmobj(mnu);if(ns4){if(menu[14]){spos(gmobj("menuback"+mnu),null,null,mn.clip.height+(menu[14]*2),null)}if(menu[11]){mn.clip.width=mn.clip.width+menu[4]}return}mp=gpos(mn);el=menu[21][1];ml=gmobj("el"+(el-1));mlp=gpos(ml);tw=null;th=null;if(menu[11]){lf=0;tc=0;for(y=el-ic;y<el;y++){tc++;ty=gmobj("el"+y);typ=gpos(ty);thy=gmobj("hel"+y);thyp=gpos(thy);if(mac&&!menu[3]){thy.style.width=1+"px";ty.style.width=thy.offsetWidth+menu[6][9]+"px";typ[3]=thy.offsetWidth}if(opra){ty.style.top=menu[4];if(lf==0)lf=menu[4];typ[2]=typ[2]+(m42);spos(ty,null,0,null,typ[3]);}spos(thy,null,lf,typ[2],typ[3]);lfL=0;if(menu[ac-1+(tc*5)]>0)lfL=menu[ac-1+(tc*5)];lf=lf+typ[3]+lfL;hsep=gmobj("hsep"+y);if(y<el-1)spos(hsep,null,typ[3],typ[2]); else spos(hsep,null,0,0,0);}tw=lf-lfL;th=typ[2];if(_d.compatMode=="CSS1Compat"){}else{if(mac){if(!_d.doctype){th=th+(m42);tw=tw+m42}else{if(_d.doctype.name.indexOf(".dtd")<0){th=th+(m42);}}}else if(_d.all&&!opra){tw=tw+(m42);th=th+(m42)}}if(opra)tw=tw+(menu[4])}else{marw=parseLink(menu[20],"margin");if(ns6){tw=mp[3]-(menu[4]*4);}if(IEDtD){tw=menu[3]-menu[4]}if(opra)tw=mp[3]-(menu[4]*2);if(menu[19]){spo=gmobj("S"+mnu);sp=gpos(spo);th=sp[2];}}spos(mn,null,null,th,tw);if(marw)tw=tw+(marw*2)+2;spos(mn,null,null,th,tw);if(menu[14]){spos(gmobj("menuback"+mnu),null,null,th+(menu[14]*2)+m42,null)}}
function sm(v1){menu=eval(v1);if(menu[19]&&!menu[21][2])fixb(v1);if(opra||ns6||menu[11]||IEDtD)if(!menu[7]&&!menu[21][2])fixb(v1);ap=gmobj(v1);if(flta)if(ap.filters[0])ap.filters[0].Apply();gmi++;if(!ns4)aps=ap.style; else aps=ap;aps.zIndex=gmi;aps.visibility='visible';if(ie55){gmif=gmobj("if"+v1);ifgp=gpos(ap);spos(gmif,ifgp[0],ifgp[1],ifgp[2],ifgp[3]);gmif.style.visibility='visible';}if(flta)if(ap.filters[0])ap.filters[0].Play();if(menu[17])fixForm(menu[17],0)}
function popup(mn,mpos){if(isNaN(mn)){for(a=1;a<menus;a++){if(mn==Mname[a]){mn=a;break;}}}setpos();omv.visibility='hide';clearTimeout(Mtimer);closeallmenus();mtxt='menu'+mn;mi=gmstyle(mtxt);if(ns4)_d.captureEvents(Event.MOUSEMOVE);_d.onmousemove=getMouseXY;mn=gmobj(mtxt);gp=gpos(mn);if(mpos>0){ttop=MouseY+2;tleft=MouseX+2}else{ttop=gp[0];tleft=gp[1];}if((ttop+gp[2])>(wh+sy)){ttop=wh-gp[2]+sy;if(!mpos&&mpos>0){spos(mn,ttop,null,null,null);}}if((tleft+gp[3])>(ww+sx)){tleft=ww-gp[3]+sx;if(!mpos&&mpos>0){spos(mn,null,tleft,null,null);}}if(mpos){spos(mn,ttop,tleft,null,null);}flta=0;if((_d.all&&_d.getElementById)&&!mac){ap=gmobj(mtxt);getflta(ap);}sm(mtxt);_am=mn}
function shl(lyr,el,s){clearTimeout(Mtimer);mt=_d.layers[lyr].document.layers["el"+el];omv.visibility="hide";menu=eval(lyr);mt.visibility=s;omv=mt}
function resetShM(){for(a=1;a<menus;a++){menu=eval("menu"+a);if(menu[7]&&menu[12]){ShM=0;return}}if(ParentMenu)ParentMenu.resetShM()}
function PlaceMenu(mn){if(ns4||ns6)pos="relative";else pos="absolute";mnt="<div class=\"main_menu\" id=\""+mn+"DIV\" style=\"width:1;height:1;position:"+pos+"\"></div>";menu=eval("menu"+getMenuByName(mn));menu[21][0]=mn+"DIV";_d.write(mnt)}
function setpos(){for(a=1;a<menus;a++){menu=eval("menu"+a);if(menu[21][0]){gm=gmobj(menu[21][0]);if(ns4){ntp=gm.pageY;nlp=gm.pageX}else{gp=gpos(gm);ntp=gp[0];nlp=gp[1]}mn=gmobj("menu"+a);mnp=gpos(mn);if(ntp==0)ntp=null;if(nlp==0)nlp=null;spos(mn,ntp,nlp,null,null);if(ie55){gmif=gmobj("ifmenu"+a);spos(gmif,ntp,nlp,null,null)}}else{if(!menu[5])menu[5]="";if (menu[5].indexOf("left")!=-1||menu[5].indexOf("center")!=-1||menu[5].indexOf("right")!=-1){mn=gmobj("menu"+a);mnp=gpos(mn);mnw=mnp[3];nlp=((ww-mnw)/2);if(menu[5].indexOf("right")!=-1)nlp=ww-mnw;if(menu[5].indexOf("left")!=-1)nlp=1;ts=menu[2]+"";if(ts.indexOf("offset=")==0){os=parseLink(ts,"offset");nlp=nlp+parseInt(os);min=parseLink(ts,"minimum");if(min&&(nlp<min))nlp=min;}spos(mn,null,nlp,null,null)}if(menu[5].indexOf("top")!=-1||menu[5].indexOf("bottom")!=-1||menu[5].indexOf("middle")!=-1){mn=gmobj("menu"+a);mnp=gpos(mn);mnh=mnp[2];if(opra)mnh=mn.style.pixelHeight;nlp=wh-mnh;if(menu[5].indexOf("middle")!=-1)nlp=((wh-mnh)/2);if(menu[5].indexOf("top")!=-1)nlp=1;ts=menu[1]+"";if(ts.indexOf("offset=")==0){os=parseLink(ts,"offset");mnp=gpos(mn);nlp=nlp+parseInt(os);min=parseLink(ts,"minimum");if(min&&(nlp<min))nlp=min;}if(menu[10]>0){menu[1]=nlp;if(nlp>0)menu[10]=nlp;nlp=nlp+sy;if(menu[10]==nlp&&MLoaded<2)spos(mn,nlp,null,null,null)}else{spos(mn,nlp,null,null,null)}}}}}
function MScan(){sy=self.pageYOffset;sx=self.pageXOffset;if(opra){ww=window.innerWidth;wh=window.innerHeight}else if(_d.all){sy=_d.body.scrollTop;sx=_d.body.scrollLeft;if(!ie4&&!mac){if(sy==0)sy=_d.documentElement.scrollTop;if(sx==0)sx=_d.documentElement.scrollLeft;}if(_d.compatMode=="CSS1Compat"){ww=document.documentElement.clientWidth;wh=document.documentElement.clientHeight}else{ww=_d.body.clientWidth;wh=_d.body.clientHeight}}else{if(ns4){ww=self.innerWidth-16;wh=self.innerHeight-17}else{ww=_d.body.offsetWidth;if(!ww)ww=self.innerWidth-15;ww--;wh=self.innerHeight;}}if(opra&&(owh!=wh||oww!=ww)){if(MLoaded>1){location.reload()}MLoaded++;oww=ww;owh=wh;}if(sy!=osy)checs();if(!mac&&!opra&&MLoaded<2)sis();setpos();}
function mOL(){if(!ns61&&ns6||ns6hif){Minit()}MLoaded=1;if(Oload)Oload();if(loadWait||opra){for(x=0;x<parr.length;x++){fixb("menu"+parr[x]);popup(parr[x])}}sis();MScan();if(!opra)MLoaded++;}
function Minit(){el=0;df=-1;if((_d.all&&_d.getElementById)&&!mac)_d.write("<"+"script>function getflta(ap){try{if(ap.filters){flta=1}}catch(e){}}<"+"/script>");for(x=0;x<parr.length;x++){if(!opra){fixb("menu"+parr[x]);popup(parr[x])}}if(ns4){_d.captureEvents(Event.MOUSEMOVE);oww=self.innerWidth-16;owh=self.innerHeight-17;window.onresize=function(){if(ww!=oww||wh!=owh)window.history.go(0)}}_d.onmousemove=getMouseXY;MScan();}for(a=1;a<menus;a++){dmenu("menu"+a)}if(mac45)Oload=window.onLoad;else Oload=window.onload;if(!ns61&&ns6||ns6hif){window.onload=mOL}else{Minit();sis();window.onload=mOL}