<!--

function WA_dynmenuBg(AXeZv)
{
var KBHmD=document.wa_global_menu_declaration[AXeZv]
WA_bg(KBHmD.id,KBHmD.root_lx,KBHmD.root_ly,KBHmD.root_corner,KBHmD.root_border,KBHmD.root_col_border,[KBHmD.root_bg],false,0)
}
function over_menu_off(p_obj,id_menu)
{
eTjdX()
var qhoKA_root=document.wa_root_obj_menu;
var siUwX_current_menu=qhoKA_root.search(id_menu)
var wcoBB=p_obj.offsetParent.offsetParent;
if(wcoBB)
{
var qhoKA=wcoBB.qhoKA
qhoKA.bmZlc=siUwX_current_menu
lEXBN(wcoBB.cur_menu)
SoIXU(p_obj,true)
}
}
function WA_dynmenu_onmouseover_off(p_obj,EMjuI)
{
hide_menu();
var ZBddt=document.wa_global_menu_declaration[EMjuI]
p_obj.obj_menu=new SLDMp(EMjuI,ZBddt,null,0)
var qhoKA=p_obj.obj_menu
document.wa_root_obj_menu=qhoKA
SoIXU(p_obj,true)
}
function WA_dynmenu_onmouseout(p_obj)
{
clearTimeout(window.wa_dynmenu_timer);
window.wa_dynmenu_timer=wa_timeout("hide_menu()",1000);
SoIXU(p_obj,false)
}
function over_menu(p_obj,id_menu,PFNgH)
{
var qhoKA_root=document.wa_root_obj_menu;
var qhoKA=qhoKA_root.search(id_menu)
eTjdX()
var dyn_cont=document.getElementById('dynmenu-container');
var LpVMl=html_findPos(p_obj)
if(PFNgH==false)
{
var oahMN=p_obj.offsetParent.offsetParent;
lEXBN(oahMN.cur_menu)
}
var x2=0;
var y2=LpVMl.y;
if(PFNgH)
{
x2=PFNgH.x
y2=PFNgH.y
}
var par_menu=p_obj.offsetParent.offsetParent;
if(par_menu)
{
var SFYNB=par_menu.qhoKA
if(SFYNB)
{
var LpVMl_par=SFYNB.Xtsju
x2=LpVMl_par.x+SFYNB.kNBmx()-3
}
}

var dprSk=(x2+qhoKA.kNBmx()+40-getWindowScroll().x)-getWindowSize().width
if(dprSk>0)
{
x2=x2-dprSk 
}
var siHsO_dec=(y2+qhoKA.qYKUE()+15-getWindowScroll().y)-getWindowSize().height
if(siHsO_dec>0)
{
y2=y2-siHsO_dec
y2=Math.max(0,y2)
}
var menu=document.getElementById(id_menu);
menu.qhoKA=qhoKA
qhoKA.Xtsju=new Point(x2,y2)
if(par_menu!=undefined)
{
ONkal(par_menu,menu)
}
html_SetVisibility(menu,true)
html_SetPosition(menu,x2,y2)
qhoKA.FFTvE()
SoIXU(p_obj,true)
}
function ONkal(EHGxi,wcoBB)
{
EHGxi.cur_menu=wcoBB
var SFYNB=EHGxi.qhoKA
if(SFYNB)
{
SFYNB.bmZlc=wcoBB.qhoKA
}
}
function WA_dynmenu_onmouseover(p_obj,AXeZv,kMneG,PFNgH)
{
var KBHmD=document.wa_global_menu_declaration[AXeZv]
var id_menu="dynmenu-id-var"
var dyn_cont=document.getElementById('dynmenu-container');
var LhGRh=new Array();
for(var n=0;n<kMneG.length-1;n++)
{
LhGRh.push(kMneG[n])
}
var brxnB=kMneG[kMneG.length-1]
kMneG=LhGRh 
p_obj.obj_menu=new SLDMp(id_menu,KBHmD,kMneG,null,brxnB)
var qhoKA=p_obj.obj_menu
dyn_cont.innerHTML=qhoKA.div_menu(true)
document.wa_root_obj_menu=qhoKA
over_menu(p_obj,id_menu,PFNgH)
}
function eTjdX()
{
clearTimeout(window.wa_dynmenu_timer);
window.wa_dynmenu_timer=false;
}
function VdOnK(KBHmD,LpVMl)
{
var siHsO=0
for(var i=0;i<KBHmD.root_sizes.length;i++)
{
var qfNcU=KBHmD.root_sizes[i]
siHsO+=qfNcU
if(LpVMl<siHsO)
{
return i;
}
}
return KBHmD.root_sizes.length;
}
function SoIXU(p_obj,b_over)
{
var fknKV=p_obj.offsetParent.offsetParent
var qhoKA=fknKV.qhoKA
var VBkPV_i_root=false;
if(!qhoKA)
{
VBkPV_i_root=true;
qhoKA=document.wa_root_obj_menu;
}
if(!qhoKA) return;
var KBHmD=qhoKA.KBHmD
var wIoKU;
var NntfR=false;
var REBot_text=p_obj
var iUlRn=p_obj.getElementsByTagName("A")
if(iUlRn.length==1)
{
REBot_text=iUlRn[0]
}
if(b_over)
{
wIoKU=(VBkPV_i_root)?KBHmD.root_col_text_over:KBHmD.sub_col_text_over
NntfR=(VBkPV_i_root)?KBHmD.root_text_u_over:KBHmD.sub_text_u_over
}
else
{
wIoKU=(VBkPV_i_root)?KBHmD.root_col_text:KBHmD.sub_col_text
NntfR=(VBkPV_i_root)?KBHmD.root_text_u:KBHmD.sub_text_u
}
REBot_text.style.color=wIoKU
REBot_text.style.textDecoration=(NntfR)?"underline":"none"
if(VBkPV_i_root)
{
WA_bg_menu(KBHmD.id)
if(b_over)
{
var REBot=document.getElementById(KBHmD.id)
if(!REBot)return;
var c=REBot.getContext('2d');
c.fillStyle=KBHmD.root_col_bg_over
c.beginPath()
var LpVMl=html_findPos(p_obj)
var ebjDr=new Rect(0,0,0,0)
if(KBHmD.root_vertical==false)
{
var NaEnD=html_findPos(fknKV)
var ElxnQ=VdOnK(KBHmD,LpVMl.x-NaEnD.x+10) 
ebjDr.x=LpVMl.x-NaEnD.x
ebjDr.y=0
ebjDr.width=p_obj.offsetWidth
ebjDr.height=KBHmD.root_ly
if(ElxnQ==0)
{
ebjDr.x+=KBHmD.root_corner
ebjDr.width-=KBHmD.root_corner
}
if(ElxnQ==KBHmD.root_sizes.length)
{
ebjDr.width-=KBHmD.root_corner
}
}
else
{
var NaEnD=html_findPos(fknKV)
var cDZAu=(LpVMl.y-NaEnD.y)+p_obj.offsetHeight/2 
var siHsO=0;
ebjDr.x=0
ebjDr.width=p_obj.offsetWidth
for(var i=0;i<KBHmD.root_sizes.length;i++)
{
var qfNcU=KBHmD.root_sizes[i]
siHsO+=qfNcU
if(cDZAu<siHsO)
{
ebjDr.y=siHsO-qfNcU
ebjDr.height=qfNcU
break
}
}
if(ebjDr.height==0)
{
ebjDr.y=siHsO
ebjDr.height=KBHmD.root_ly-siHsO
}
{
ebjDr.x+=KBHmD.root_corner
ebjDr.width-=2*KBHmD.root_corner
}
}
c.fillRect(ebjDr.x,ebjDr.y,ebjDr.width,ebjDr.height)
}
}
qhoKA.inGPb()
}
function SLDMp(id_menu,KBHmD,kMneG,MnBkg,PIqol)
{
this.toHtml=function()
{
return this.CZpRT.toHtml()
}
this.search=function(AXeZv)
{
if(this.iUlRn)
for(var i=0;i<this.iUlRn.length;i++)
{
var aooFC=this.iUlRn[i]
var doPTw=aooFC.search(AXeZv)
if(doPTw)return doPTw;
}
if(this.EMjuI==AXeZv)return this;
return false;
}
this.sUAkS=function()
{
this.CZpRT.registerDynamicCanvas()
}
this.inGPb=function()
{
this.CZpRT.draw()
}
this.FFTvE=function()
{
this.sUAkS() 
this.CZpRT.setRect(0,0,this.kNBmx(),this.qYKUE())
}
this.qYKUE=function()
{
return this.iUlRn.length*this.Yucmx
}
this.kNBmx=function()
{
var w2=150;
var VBkPV_hasChild=false;
if(!this.XITID)
{
var kSbUk=w2;
for(var i=0;i<this.iUlRn.length;i++)
{
var BHJXG=this.iUlRn[i]
if(BHJXG.gKBlu())VBkPV_hasChild=true
var MCepU=(this.EMjuI+"-submenu"+i)
var UaGqT=document.getElementById(MCepU);
if(UaGqT)
{
if(isMSIE())
{
kSbUk=Math.max(kSbUk,UaGqT.clientWidth)
}
else
{
kSbUk=Math.max(kSbUk,UaGqT.offsetWidth)
}
}
}
if(isMSIE())
{

}
kSbUk=(kSbUk+6)
for(var i=0;i<this.iUlRn.length;i++)
{
var MCepU=(this.EMjuI+"-submenu"+i)
var UaGqT=document.getElementById(MCepU);
if(UaGqT)
{
UaGqT.style.width=kSbUk+"px";
}
}
if(VBkPV_hasChild)
{
kSbUk+=10
}
this.XITID=kSbUk
w2=kSbUk 
var wcoBB=document.getElementById(this.EMjuI);
wcoBB.style.width=kSbUk+"px";
}
else
{
w2=this.XITID
}
return w2
}
this.gKBlu=function()
{
return(this.cdXUY_menu)?true:false;
}
this.div_menu=function(b_visible,fBuVo)
{
var param_menu=this.cdXUY_menu
var design=this.KBHmD;
if(fBuVo==undefined)fBuVo=0;
var jujws=this.jujws
var bRvBG="";
var iZhFr=400
if(isMSIE())
{
iZhFr=this.PIqol
}
bRvBG+="<div id=\""+this.EMjuI+"\" ";
bRvBG+="style=\"";
if(b_visible==false)
{
bRvBG+="visibility:hidden;";
}
bRvBG+="position:absolute;";
bRvBG+="width:"+iZhFr+"px;";
bRvBG+="z-index:"+(fBuVo*10);
bRvBG+="\">";
bRvBG+=this.CZpRT.toHtml()
bRvBG+="<div style='position:absolute;left:0px;top:0px;";
bRvBG+="z-index:100;" 
bRvBG+="'>";
jujws+="position:relative;"
jujws+="height:"+this.Yucmx+"px;";
jujws+="line-height:"+this.Yucmx+"px;"
jujws+="cursor:"+this.Yucmx+"px;"
if(this.XLaXQ=="center")
{
jujws+="text-align:center;";
}
else
{
jujws+="padding-"+this.XLaXQ+":4px;";
}
this.iUlRn=new Array()
for(var i=0;i<param_menu.length;i++)
{
var MCepU=this.EMjuI+"-"+i
var o=param_menu[i];
var MnBkg=o[0]
var brxnB=MnBkg[3] 
this.iUlRn.push(new SLDMp(MCepU,design,o[1],MnBkg,brxnB))
}
for(var i=0;i<param_menu.length;i++)
{
var BHJXG=this.iUlRn[i]
var info=BHJXG.MnBkg
var jRhVw=info[0] 
var LFmtY=info[1]
var JTqpx=info[2]
if(LFmtY.length>0)
{
bRvBG+="<a href='"+LFmtY+"' style='text-decoration:none;cursor:pointer;' ";
if(JTqpx.length>0)bRvBG+="target="+JTqpx;
bRvBG+=">";
}
bRvBG+="<div id='"+(this.EMjuI+"-submenu"+i)+"' style='"+jujws+"' "
if(BHJXG.cdXUY_menu)
{
bRvBG+="onmouseover=\u0022javascript:over_menu(this,'"+BHJXG.EMjuI+"',false)\u0022 ";
}
else
{
bRvBG+="onmouseover=\u0022javascript:over_menu_off(this,'"+BHJXG.EMjuI+"')\u0022 ";
}
bRvBG+="onmouseout=\u0022javascript:WA_dynmenu_onmouseout(this)\u0022 ";
bRvBG+=">";
bRvBG+=jRhVw;
bRvBG+="</div>";
if(LFmtY.length>0)
{
bRvBG+="</a>";
}
}
bRvBG+="</div>";
bRvBG+="</div>";
for(var i=0;i<param_menu.length;i++)
{
var BHJXG=this.iUlRn[i]
if(BHJXG.cdXUY_menu)
{
bRvBG+=BHJXG.div_menu(false,fBuVo+1)
}
}
return bRvBG;
}

this.cdXUY_menu=kMneG
this.PIqol=PIqol
this.MnBkg=MnBkg
this.KBHmD=KBHmD
this.CwjHU=1
this.oaNVj=KBHmD.sub_col_border
this.jujws=KBHmD.sub_style_text
this.YaGZc=KBHmD.sub_col_text
this.XLaXQ=KBHmD.sub_align_text
this.Yucmx=KBHmD.sub_menu_height
this.EMjuI=id_menu
this.CZpRT=new WA_GraphicElement(id_menu+"-bg",50,KBHmD.sub_menu_shadow)
this.CZpRT.qhoKA=this;
this.CZpRT.KBHmD=KBHmD;
this.CZpRT.draw=function()
{
var siUwX=this.qhoKA
var KBHmD=this.KBHmD
var CsiqZ=this.rect().width
var Ocjjl=this.rect().height
var NjtwW=KBHmD.sub_col_bg.col1
if(KBHmD.sub_col_bg.has_gradient)
{
var lDKcg=KBHmD.sub_col_bg
var YahOl=lDKcg.pt1.x*CsiqZ/100
var vUkxM=lDKcg.pt1.y*Ocjjl/100
var uciRJ=lDKcg.pt2.x*CsiqZ/100
var aqPKr=lDKcg.pt2.y*Ocjjl/100
NjtwW="("+YahOl+";"+vUkxM+";"+uciRJ+";"+aqPKr+";"+lDKcg.col1+";"+lDKcg.col2+")";
}
WA_bg(this.canvasId(),CsiqZ,Ocjjl,KBHmD.sub_menu_corner,1,siUwX.oaNVj,[NjtwW],this.shadow(),0)
var el=document.getElementById(this.canvasId())
if(!el)return;
var c=el.getContext('2d');
c.fillStyle=siUwX.YaGZc;
var w=siUwX.kNBmx()
var h=siUwX.Yucmx
var Ocjjl_arrow=8
var CsiqZ_arrow=6
var oIfRZ=Math.max(2,KBHmD.sub_corner-2);
var TDTVO=0;
var mFpjo=0;
if(this.shadow())
{
TDTVO+=6;
mFpjo+=6;
}
var siHsO=mFpjo+Math.round((h-Ocjjl_arrow)/2);
var vIOYK=TDTVO+w-CsiqZ_arrow-4;
c.shadowOffsetX=0;
c.shadowOffsetY=0;
c.shadowBlur=0;
for(var i=0;i<siUwX.iUlRn.length;i++)
{
var Zrspt=siUwX.iUlRn[i]
if(siUwX.bmZlc==Zrspt) 
{
var uciRJ=vIOYK-30
c.fillStyle=KBHmD.sub_col_bg_over
c.beginPath()
c.fillRect(TDTVO+oIfRZ/2,mFpjo+oIfRZ/2,w-oIfRZ,siUwX.Yucmx-oIfRZ)
}
if(Zrspt.gKBlu())
{
c.fillStyle=siUwX.YaGZc;
c.beginPath()
c.moveTo(vIOYK,siHsO);
c.lineTo(vIOYK+CsiqZ_arrow,siHsO+Ocjjl_arrow/2);
c.lineTo(vIOYK,siHsO+Ocjjl_arrow);
c.lineTo(vIOYK,siHsO);
c.fill()
}
mFpjo+=siUwX.Yucmx
siHsO+=siUwX.Yucmx
}
}
}
function lEXBN(wcoBB)
{
if(wcoBB==undefined) return
if(wcoBB.cur_menu!=undefined)
{
lEXBN(wcoBB.cur_menu)
}
html_SetVisibility(wcoBB,false)
}
function hide_menu()
{
eTjdX()
var PavLI=document.getElementById('dynmenu-container');
PavLI.innerHTML=""
}

-->
