<!--

function WA_dynmenuBg(LFSwC)
{
var TPbXi=document.wa_global_menu_declaration[LFSwC]
WA_bg(TPbXi.id,TPbXi.root_lx,TPbXi.root_ly,TPbXi.root_corner,TPbXi.root_border,TPbXi.root_col_border,[TPbXi.root_bg],false,0)
}
function over_menu_off(p_obj,id_menu)
{
OlXvE()
var ZURRP_root=document.wa_root_obj_menu;
var bSiCf_current_menu=ZURRP_root.search(id_menu)
var VTwHC=p_obj.offsetParent.offsetParent;
if(VTwHC)
{
var ZURRP=VTwHC.ZURRP
ZURRP.FxCvK=bSiCf_current_menu
xwPIG(VTwHC.cur_menu)
pKuqp(p_obj,true)
}
}
function WA_dynmenu_onmouseover_off(p_obj,fxeVx)
{
hide_menu();
var OBHWF=document.wa_global_menu_declaration[fxeVx]
p_obj.obj_menu=new Nimmm(fxeVx,OBHWF,null,0)
var ZURRP=p_obj.obj_menu
document.wa_root_obj_menu=ZURRP
pKuqp(p_obj,true)
}
function WA_dynmenu_onmouseout(p_obj)
{
clearTimeout(window.wa_dynmenu_timer);
window.wa_dynmenu_timer=wa_timeout("hide_menu()",1000);
pKuqp(p_obj,false)
}
function over_menu(p_obj,id_menu,xeqtu)
{
var ZURRP_root=document.wa_root_obj_menu;
var ZURRP=ZURRP_root.search(id_menu)
OlXvE()
var dyn_cont=document.getElementById('dynmenu-container');
var EaGHO=html_findPos(p_obj)
if(xeqtu==false)
{
var bEaAx=p_obj.offsetParent.offsetParent;
xwPIG(bEaAx.cur_menu)
}
var x2=0;
var y2=EaGHO.y;
if(xeqtu)
{
x2=xeqtu.x
y2=xeqtu.y
}
var par_menu=p_obj.offsetParent.offsetParent;
if(par_menu)
{
var tCJSC=par_menu.ZURRP
if(tCJSC)
{
var EaGHO_par=tCJSC.aQfOS
x2=EaGHO_par.x+tCJSC.QmxmK()-3
}
}

var HrbuF=(x2+ZURRP.QmxmK()+40-getWindowScroll().x)-getWindowSize().width
if(HrbuF>0)
{
x2=x2-HrbuF 
}
var xruFv_dec=(y2+ZURRP.qlCdb()+15-getWindowScroll().y)-getWindowSize().height
if(xruFv_dec>0)
{
y2=y2-xruFv_dec
y2=Math.max(0,y2)
}
var menu=document.getElementById(id_menu);
menu.ZURRP=ZURRP
ZURRP.aQfOS=new Point(x2,y2)
if(par_menu!=undefined)
{
OlmXV(par_menu,menu)
}
html_SetVisibility(menu,true)
html_SetPosition(menu,x2,y2)
ZURRP.QSedA()
pKuqp(p_obj,true)
}
function OlmXV(JFWlh,VTwHC)
{
JFWlh.cur_menu=VTwHC
var tCJSC=JFWlh.ZURRP
if(tCJSC)
{
tCJSC.FxCvK=VTwHC.ZURRP
}
}
function WA_dynmenu_onmouseover(p_obj,LFSwC,EAeYn,xeqtu)
{
var TPbXi=document.wa_global_menu_declaration[LFSwC]
var id_menu="dynmenu-id-var"
var dyn_cont=document.getElementById('dynmenu-container');
var CkeEL=new Array();
for(var n=0;n<EAeYn.length-1;n++)
{
CkeEL.push(EAeYn[n])
}
var gAncD=EAeYn[EAeYn.length-1]
EAeYn=CkeEL 
p_obj.obj_menu=new Nimmm(id_menu,TPbXi,EAeYn,null,gAncD)
var ZURRP=p_obj.obj_menu
dyn_cont.innerHTML=ZURRP.div_menu(true)
document.wa_root_obj_menu=ZURRP
over_menu(p_obj,id_menu,xeqtu)
}
function OlXvE()
{
clearTimeout(window.wa_dynmenu_timer);
window.wa_dynmenu_timer=false;
}
function scLfG(TPbXi,EaGHO)
{
var xruFv=0
for(var i=0;i<TPbXi.root_sizes.length;i++)
{
var gToWa=TPbXi.root_sizes[i]
xruFv+=gToWa
if(EaGHO<xruFv)
{
return i;
}
}
return TPbXi.root_sizes.length;
}
function pKuqp(p_obj,b_over)
{
var rWsPn=p_obj.offsetParent.offsetParent
var ZURRP=rWsPn.ZURRP
var eLLMb_i_root=false;
if(!ZURRP)
{
eLLMb_i_root=true;
ZURRP=document.wa_root_obj_menu;
}
if(!ZURRP) return;
var TPbXi=ZURRP.TPbXi
var pINns;
var dcCBn=false;
var TcRTJ_text=p_obj
var RbXvC=p_obj.getElementsByTagName("A")
if(RbXvC.length==1)
{
TcRTJ_text=RbXvC[0]
}
if(b_over)
{
pINns=(eLLMb_i_root)?TPbXi.root_col_text_over:TPbXi.sub_col_text_over
dcCBn=(eLLMb_i_root)?TPbXi.root_text_u_over:TPbXi.sub_text_u_over
}
else
{
pINns=(eLLMb_i_root)?TPbXi.root_col_text:TPbXi.sub_col_text
dcCBn=(eLLMb_i_root)?TPbXi.root_text_u:TPbXi.sub_text_u
}
TcRTJ_text.style.color=pINns
TcRTJ_text.style.textDecoration=(dcCBn)?"underline":"none"
if(eLLMb_i_root)
{
WA_bg_menu(TPbXi.id)
if(b_over)
{
var TcRTJ=document.getElementById(TPbXi.id)
if(!TcRTJ)return;
var c=TcRTJ.getContext('2d');
c.fillStyle=TPbXi.root_col_bg_over
c.beginPath()
var EaGHO=html_findPos(p_obj)
var UVVvT=new Rect(0,0,0,0)
if(TPbXi.root_vertical==false)
{
var aoMJH=html_findPos(rWsPn)
var ZSDjW=scLfG(TPbXi,EaGHO.x-aoMJH.x+10) 
UVVvT.x=EaGHO.x-aoMJH.x
UVVvT.y=0
UVVvT.width=p_obj.offsetWidth
UVVvT.height=TPbXi.root_ly
if(ZSDjW==0)
{
UVVvT.x+=TPbXi.root_corner
UVVvT.width-=TPbXi.root_corner
}
if(ZSDjW==TPbXi.root_sizes.length)
{
UVVvT.width-=TPbXi.root_corner
}
}
else
{
var aoMJH=html_findPos(rWsPn)
var itsCD=(EaGHO.y-aoMJH.y)+p_obj.offsetHeight/2 
var xruFv=0;
UVVvT.x=0
UVVvT.width=p_obj.offsetWidth
for(var i=0;i<TPbXi.root_sizes.length;i++)
{
var gToWa=TPbXi.root_sizes[i]
xruFv+=gToWa
if(itsCD<xruFv)
{
UVVvT.y=xruFv-gToWa
UVVvT.height=gToWa
break
}
}
if(UVVvT.height==0)
{
UVVvT.y=xruFv
UVVvT.height=TPbXi.root_ly-xruFv
}
{
UVVvT.x+=TPbXi.root_corner
UVVvT.width-=2*TPbXi.root_corner
}
}
c.fillRect(UVVvT.x+1,UVVvT.y+1,UVVvT.width-2,UVVvT.height-2)
}
}
ZURRP.fIWXI()
}
function Nimmm(id_menu,TPbXi,EAeYn,jRSWE,pCaNL)
{
this.toHtml=function()
{
return this.TjVKr.toHtml()
}
this.search=function(LFSwC)
{
if(this.RbXvC)
for(var i=0;i<this.RbXvC.length;i++)
{
var onJXO=this.RbXvC[i]
var PVHma=onJXO.search(LFSwC)
if(PVHma)return PVHma;
}
if(this.fxeVx==LFSwC)return this;
return false;
}
this.BmubN=function()
{
this.TjVKr.registerDynamicCanvas()
}
this.fIWXI=function()
{
this.TjVKr.draw()
}
this.QSedA=function()
{
this.BmubN() 
this.TjVKr.setRect(0,0,this.QmxmK(),this.qlCdb())
}
this.qlCdb=function()
{
return this.RbXvC.length*this.ihqKn
}
this.QmxmK=function()
{
var w2=150;
var eLLMb_hasChild=false;
if(!this.jCLek)
{
var nkKsA=w2;
for(var i=0;i<this.RbXvC.length;i++)
{
var JjJgn=this.RbXvC[i]
if(JjJgn.xnFJg())eLLMb_hasChild=true
var omAAa=(this.fxeVx+"-submenu"+i)
var DTVeW_menu=document.getElementById(omAAa);
if(DTVeW_menu)
{
if(isMSIE())
{
nkKsA=Math.max(nkKsA,DTVeW_menu.clientWidth)
}
else
{
nkKsA=Math.max(nkKsA,DTVeW_menu.offsetWidth)
}
}
}
if(isMSIE())
{

}
nkKsA=(nkKsA+6)
for(var i=0;i<this.RbXvC.length;i++)
{
var omAAa=(this.fxeVx+"-submenu"+i)
var DTVeW_menu=document.getElementById(omAAa);
if(DTVeW_menu)
{
DTVeW_menu.style.width=nkKsA+"px";
}
}
if(eLLMb_hasChild)
{
nkKsA+=10
}
this.jCLek=nkKsA
w2=nkKsA 
var VTwHC=document.getElementById(this.fxeVx);
VTwHC.style.width=nkKsA+"px";
}
else
{
w2=this.jCLek
}
return w2
}
this.xnFJg=function()
{
return(this.tbVvU_menu)?true:false;
}
this.div_menu=function(b_visible,FjMdA)
{
var param_menu=this.tbVvU_menu
var design=this.TPbXi;
if(FjMdA==undefined)FjMdA=0;
var WYHJD=this.WYHJD
var mBKWx="";
var rCvkH=400
if(isMSIE())
{
rCvkH=this.pCaNL
}
mBKWx+="<div id=\""+this.fxeVx+"\" ";
mBKWx+="style=\"";
if(b_visible==false)
{
mBKWx+="visibility:hidden;";
}
mBKWx+="position:absolute;";
mBKWx+="width:"+rCvkH+"px;";
mBKWx+="z-index:"+(FjMdA*10);
mBKWx+="\">";
mBKWx+=this.TjVKr.toHtml()
mBKWx+="<div style='position:absolute;left:0px;top:0px;";
mBKWx+="z-index:100;" 
mBKWx+="'>";
WYHJD+="position:relative;"
WYHJD+="height:"+this.ihqKn+"px;";
WYHJD+="line-height:"+this.ihqKn+"px;"
WYHJD+="cursor:"+this.ihqKn+"px;"
if(this.wiKSY=="center")
{
WYHJD+="text-align:center;";
}
else
{
WYHJD+="padding-"+this.wiKSY+":4px;";
}
this.RbXvC=new Array()
for(var i=0;i<param_menu.length;i++)
{
var omAAa=this.fxeVx+"-"+i
var o=param_menu[i];
var jRSWE=o[0]
var gAncD=jRSWE[3] 
this.RbXvC.push(new Nimmm(omAAa,design,o[1],jRSWE,gAncD))
}
for(var i=0;i<param_menu.length;i++)
{
var JjJgn=this.RbXvC[i]
var info=JjJgn.jRSWE
var KlGJH=info[0] 
var CYPrQ=info[1]
var FVfmj=info[2]
if(CYPrQ.length>0)
{
mBKWx+="<a href='"+CYPrQ+"' style='text-decoration:none;cursor:pointer;' ";
if(FVfmj.length>0)mBKWx+="target="+FVfmj;
mBKWx+=">";
}
mBKWx+="<div id='"+(this.fxeVx+"-submenu"+i)+"' style='"+WYHJD+"' "
if(JjJgn.tbVvU_menu)
{
mBKWx+="onmouseover=\u0022javascript:over_menu(this,'"+JjJgn.fxeVx+"',false)\u0022 ";
}
else
{
mBKWx+="onmouseover=\u0022javascript:over_menu_off(this,'"+JjJgn.fxeVx+"')\u0022 ";
}
mBKWx+="onmouseout=\u0022javascript:WA_dynmenu_onmouseout(this)\u0022 ";
mBKWx+=">";
mBKWx+=KlGJH;
mBKWx+="</div>";
if(CYPrQ.length>0)
{
mBKWx+="</a>";
}
}
mBKWx+="</div>";
mBKWx+="</div>";
for(var i=0;i<param_menu.length;i++)
{
var JjJgn=this.RbXvC[i]
if(JjJgn.tbVvU_menu)
{
mBKWx+=JjJgn.div_menu(false,FjMdA+1)
}
}
return mBKWx;
}

this.tbVvU_menu=EAeYn
this.pCaNL=pCaNL
this.jRSWE=jRSWE
this.TPbXi=TPbXi
this.ncCnQ=1
this.LEGSm=TPbXi.sub_col_border
this.WYHJD=TPbXi.sub_style_text
this.xkVWW=TPbXi.sub_col_text
this.wiKSY=TPbXi.sub_align_text
this.ihqKn=TPbXi.sub_menu_height
this.fxeVx=id_menu
this.TjVKr=new WA_GraphicElement(id_menu+"-bg",50,TPbXi.sub_menu_shadow)
this.TjVKr.ZURRP=this;
this.TjVKr.TPbXi=TPbXi;
this.TjVKr.draw=function()
{
var bSiCf=this.ZURRP
var TPbXi=this.TPbXi
var aRfvH=this.rect().width
var bUPUU=this.rect().height
var hJhrt=TPbXi.sub_col_bg.col1
if(TPbXi.sub_col_bg.has_gradient)
{
var DmbmZ=TPbXi.sub_col_bg
var STPLI=DmbmZ.pt1.x*aRfvH/100
var uBpEc=DmbmZ.pt1.y*bUPUU/100
var Jrkar=DmbmZ.pt2.x*aRfvH/100
var FWrsd=DmbmZ.pt2.y*bUPUU/100
hJhrt="("+STPLI+";"+uBpEc+";"+Jrkar+";"+FWrsd+";"+DmbmZ.col1+";"+DmbmZ.col2+")";
}
WA_bg(this.canvasId(),aRfvH,bUPUU,TPbXi.sub_menu_corner,1,bSiCf.LEGSm,[hJhrt],this.shadow(),0)
var el=document.getElementById(this.canvasId())
if(!el)return;
var c=el.getContext('2d');
c.fillStyle=bSiCf.xkVWW;
var w=bSiCf.QmxmK()
var h=bSiCf.ihqKn
var bUPUU_arrow=8
var aRfvH_arrow=6
var FwNRN=Math.max(2,TPbXi.sub_corner-2);
var NtDnu=0;
var xuaTI=0;
if(this.shadow())
{
NtDnu+=6;
xuaTI+=6;
}
var xruFv=xuaTI+Math.round((h-bUPUU_arrow)/2);
var xvgUE=NtDnu+w-aRfvH_arrow-4;
c.shadowOffsetX=0;
c.shadowOffsetY=0;
c.shadowBlur=0;
for(var i=0;i<bSiCf.RbXvC.length;i++)
{
var DTVeW=bSiCf.RbXvC[i]
if(bSiCf.FxCvK==DTVeW) 
{
var Jrkar=xvgUE-30
c.fillStyle=TPbXi.sub_col_bg_over
c.beginPath()
c.fillRect(NtDnu+FwNRN/2,xuaTI+FwNRN/2,w-FwNRN,bSiCf.ihqKn-FwNRN)
}
if(DTVeW.xnFJg())
{
c.fillStyle=bSiCf.xkVWW;
c.beginPath()
c.moveTo(xvgUE,xruFv);
c.lineTo(xvgUE+aRfvH_arrow,xruFv+bUPUU_arrow/2);
c.lineTo(xvgUE,xruFv+bUPUU_arrow);
c.lineTo(xvgUE,xruFv);
c.fill()
}
xuaTI+=bSiCf.ihqKn
xruFv+=bSiCf.ihqKn
}
}
}
function xwPIG(VTwHC)
{
if(VTwHC==undefined) return
if(VTwHC.cur_menu!=undefined)
{
xwPIG(VTwHC.cur_menu)
}
html_SetVisibility(VTwHC,false)
}
function hide_menu()
{
OlXvE()
var ccYho=document.getElementById('dynmenu-container');
ccYho.innerHTML=""
}

-->
