//BlaTek Cascading Menu v3.0.1
//Written by Bogdan Blaszczak/BlaTek

function BlaTekCSMenu(){
function B(o,m,b,a){for(k in m)o[k]=b?(b[k]!=a?b[k]:m[k]):m[k];return o}
function S(n,x,y,b,c,jP){
function M(){
var wi=0,t,w1=up5?n.getElementsByTagName('div')[0]:n.all.tags('div')[0],w2=up5?w1.childNodes:w1.children
for(k=0;k<w2.length;k++){
 t=up5?w2[k].getElementsByTagName('table')[0]:w2[k].all.tags('table')[0]
 if(t.offsetWidth>wi)wi=t.offsetWidth}
for(k=0;k<w2.length;k++){
 w2[k].o=l.i[k];w2[k].onmouseover=w2[k].onmouseout=w2[k].onclick=Ev}
 w1.style.width=wi+"px"
/*
 n.style.width=wi+2*mH+(ie?n.offsetWidth:0)+"px"
 n.style.height=w1.offsetHeight+mV+(ie?n.offsetHeight:0)+"px"
*/
 n.style.width=wi+2*mH+"px"
 n.style.height=w1.offsetHeight+mV+"px"
}
with(BlaTek){
l=p[n];n=E(n);n.style.display='block'
var mH=~~l.marginH,mV=~~l.marginV;if(!l.fi)M();l.fi=1
if(!jP){
 D=1;cT(O);H(1)
 R=b?!(b%2):0;B=b>2;if(c){x=R?C.L()+C.P()-pW(n)-x:x+C.L();y=B?C.Too()+C.THiN()-pH(n)-y:y+C.Too()}
 if(parseInt(n.style.top)==y&&parseInt(n.style.left)==x&&l.v)return
 if(!isHidden)hide(1);else if(BlaTek.onbeforeshow)onbeforeshow()}
y-=jP&&B?pH(n)-l.marginV:jP?l.marginV:0;x-=jP&&R?pW(n):0
P[P.length]=n.ID
if(APC){
var x0=C.L(),y0=C.Too(),x1=x0+C.P(),y1=y0+C.THiN();x=x<x0?(R?x+pW(jP)+pW(n):x0):x;y=y<y0?y0:y
var x2=x+pW(n),y2=y+pH(n),oX=jP?pW(jP)+pW(n):x2-x1
x1=x1<x2?(x-oX<x0?x0:x-oX):x;y1=y1<y2?(y-(y2-y1)<y0?y0:y-(y2-y1)):y;x=x1;y=y1}
n.style.left=x+'px';n.style.top=y+'px'
n.style.zIndex=++I
k=0;var T,Er
eval(up5?'try{k=n.filters}catch(Er){}':'k=n.filters')
if(k)for(T in k)if(~T.indexOf('Trans'))eval(up5?'try{k[T].Apply()}catch(Er){}':'k[T].Apply()')
n.style.visibility='visible'
if(k)for(T in k)if(~T.indexOf('Trans'))eval(up5?'try{k[T].Play()}catch(Er){}':'k[T].Play()')
l.v=1;isHidden=0}
}
function cM(){
//if(!ie){with(cL("bltnss","100%")){
//with(style){top=left=0;height='1px';visibility="hidden"}}}
with(BlaTek){I=zIndex
for(k in p){l=p[k]
var c=l.bgColor?l.bgColor:'',w=l.width?l.width:1
var X;with(X=cL(k,ns6?999:op7?'':0)){
with(style){
 left=top=op7?9999:'-999px';visibility="hidden";if(ie&&up5)display="none"
 cursor="default";backgroundColor=c;backgroundImage="url("+l.bgImage+")"
 if(!op7&&l.opacity<100){if(ns6)MozOpacity=l.opacity/100;if(ie)filter='alpha(opacity='+l.opacity+')'}
}className=l.borderClass
var s="<div style='position:absolute;width:"+w+"px;left:"+l.marginH+"px;top:"+l.marginV+"px'>"
for(c in l.i)s+=kx(l.i[c]);s+="</div>";innerHTML=s
if(ie&&l.filterIE)style.filter+=l.filterIE
X.onmouseout=H;X.onmouseover=Ov
}}}}
function cT(t){clearTimeout(t)}function sT(s,T){return setTimeout('with(bMenu)'+s+'hide()',T)}
function H(t){with(BlaTek){if(t==1)O=sT('',waitDelay);else U=sT('if(!D)',hideDelay)}}
function Ov(){with(BlaTek){cT(O);cT(U);D=0}}
function kx(p){
 var c=!p.bgColor?'':';background-color:'+p.bgColor,
 g=!p.bgImage?'':';background-image:url('+p.bgImage+')',
 C=p.cursor?';cursor:'+p.cursor:'',F=p.filterIE?';filter:'+p.filterIE:'',
 h=p.height?'height:'+p.height+'px;':''
 if(p.bgImage){p.In=new Image();p.In.src=p.bgImage}
 if(p.bgImageOver){p.Io=new Image();p.Io.src=p.bgImageOver}
 return "<div style='position:relative;width:100%;"+h+"margin-bottom:"+BlaTek.p[k].marginV+"px"+c+g+C+F+"'>"+
 "<div style='position:absolute;width:100%;height:100%'></div>"+
 "<table class='"+p.borderClass+"' border=0 cellspacing=0 cellpadding="+(op7?0:0)+" width=100% height=100%><tr>"+
 "<td width=100% height=100% align="+p.align+" valign="+p.valign+" class=\""+p.fontClass+"\">"+(op7?"<divop style='display:block;padding:2px'>"+p.t+"</divop>":p.t)+"</td></tr></table></div>"
}
function re(s){
if(s.toLowerCase().indexOf('<hr')==0)return s
k=new RegExp("<[^>]*>","gi");l=s.match(k);
if(l){s=s.replace(k,"&mcbltt;");s=s.split("&mcbltt;")
for(k=0;k<s.length;k++)s[k]=s[k].replace(/ /g,"&nbsp;")+(l[k]?l[k]:"")
s=s.join("")}else s=s.replace(/ /g,"&nbsp;")
return "&nbsp;"+s.replace(/<br>/gi,"&nbsp;<br>&nbsp;")+"&nbsp;"
}
function Ev(e){
function M(o,u,s,e){
var f,T,Er
eval(up5?'try{f=o.filters}catch(Er){}':'f=o.filters')
with(o){
if(f)for(T in f)if(~T.indexOf('Trans'))eval(up5?'try{f[T].Apply()}catch(Er){}':'f[T].Apply()')

k='transparent'
s=o.In?o.In.src:0;e=o.Io?o.Io.src:0;
if(!o.bgColor)o.bgColor=k
if(!o.bgColorOver)o.bgColorOver=k
style.backgroundColor=u?o.bgColorOver:o.bgColor
if((s||e)&&s!=e)style.backgroundImage='url('+(u?e:s)+')'
k=up5?getElementsByTagName('td')[0]:all.tags('td')[0]
k.className=u?o.fontClassOver:o.fontClass
s=o.align;e=o.alignOver;if(s!=e)k.align=u?e:s
s=o.valign;e=o.valignOver;if(s!=e)k.vAlign=u?e:s
if(o.z)k.innerHTML=u?o.z:o.t
k=up5?getElementsByTagName('table')[0]:all.tags('table')[0]
s=o.borderClass;e=o.borderClassOver;if(s!=e)k.className=u?e:s
if(f)for(T in f)if(~T.indexOf('Trans'))eval(up5?'try{f[T].Play()}catch(Er){}':'f[T].Play()')
}}
function U(o,m){
o=up5?o.parentNode.parentNode:o.parentElement.parentElement
with(BlaTek){for(k=P.length-1;k>=0;k--){if(P[k]==o.ID)break;if(P[k]!=m)h(P[k]);P=P.slice(0,-1)}}
}
function G(e,t){with(BlaTek){
var o=e,L=o.offsetLeft,T=o.offsetTop
while(o.offsetParent){o=o.offsetParent;L+=o.offsetLeft;T+=o.offsetTop}
return t?L+(R?0:pW(e)):T+(B?pH(e):0)
}}
e=e||event;var t=e.type!='mouseout',l=this
if(e.type=='click'){if(l.o.u)location.href=l.o.u;return}
k=ns6?e.relatedTarget:t?e.fromElement:e.toElement
while(k){if(k==l)return;k=up5?k.parentNode:k.parentElement}
M(l,t);if(t){U(l,l.o.p);if(l.o.p)S(l.o.p,G(l,1),G(l),0,0,l)}
}
doc=document;ie=doc.all;ns4=doc.layers;up5=doc.getElementById?doc.getElementsByTagName('div'):0;ns6=up5&&!ie;op7=window.opera
function E(i){return up5?up5[i]:ie[i]}
function cL(v,w,x){
 if(up5){x=doc.createElement('div');x.id=v;x.style.position='absolute';doc.body.appendChild(x)}
  else{doc.body.insertAdjacentHTML('BeforeEnd','<div id='+v+' style="position:absolute"></div>');x=ie[v]}
 x.style.width=w;x.ID=v;return x
}
doc.onmousemove=function(e){BlaTek.X=ie?event.clientX:e.pageX;BlaTek.Y=ie?event.clientY:e.pageY}

var k,l,on,BlaTek={B:0,O:0,D:0,Z:0,I:0,U:0,globalItem:{},globalPanel:{},isHidden:1,hideDelay:300,waitDelay:4000,zIndex:1,APC:1,p:{},P:[],R:0,
Panel:function(n,C){return B(this.p[n]={i:[],Item:function(U,T,C,Z){return B(this.i[this.i.length]={u:U,t:T?re(T):'',z:Z?re(Z):0,expand:function(P){this.p=P}},BlaTek.globalItem,C)}},this.globalPanel,C)},
show:function(n,x,y,b){S(n,x,y,b)},showLT:function(n,x,y,b){S(n,x,y,b?b:1,1)},showRT:function(n,x,y,b){S(n,x,y,b?b:2,1)},showLB:function(n,x,y,b){S(n,x,y,b?b:3,1)},showRB:function(n,x,y,b){S(n,x,y,b?b:4,1)},
showByElement:on=function(n,x,y,e,b){var L=e.offsetLeft,T=e.offsetTop;while(e.offsetParent){e=e.offsetParent;L+=e.offsetLeft;T+=e.offsetTop};S(n,x+L,y+T,b)},
showByImg:function(n,x,y,i,b){on(n,x,y,doc.images[i],b)},pW:function(p){return p.offsetWidth},pH:function(p){return p.offsetHeight},
showByCursor:function(n,x,y,b){x+=this.X+(ie?this.C.L():0);y+=this.Y+(ie?this.C.Too():0);S(n,x,y,b)},
block:function(n){this.p[n].b=1},unblock:function(n){this.p[n].b=0},
h1:function(n,a){

var T,Er,k,e=E(n)
eval(up5?'try{k=e.filters}catch(Er){}':'k=e.filters')
if(k)for(T in k)if(~T.indexOf('Trans'))eval(up5?'try{k[T].Apply()}catch(Er){}':'k[T].Apply()')

with(E(n).style){visibility='hidden';/*left=top=-999;if(!a&&ie&&up5)display='none'*/}this.p[n].v=0

if(k)for(T in k)if(~T.indexOf('Trans'))eval(up5?'try{k[T].Play()}catch(Er){}':'k[T].Play()')

},
h:function(n,a){with(this)if(p[n].fi&&!p[n].b&&p[n].v){h1(n,a);E(n).style.zIndex=zIndex}},
hide:function(a){with(this){for(k in p)h(k,a);P=[];I=zIndex;isHidden=1;if(!a&&this.onafterhide)onafterhide()}},
C:new function(){
function A(){with(doc)return ie?body.scrollWidth:documentElement.offsetWidth}
function L(){with(doc)return ie?body.scrollHeight:documentElement.offsetHeight}
function l(){return ie?doc.body.scrollTop:pageYOffset}
function a(){return ie?doc.body.scrollLeft:pageXOffset}
function D(){return ie?K()!=s():O()<A()}
function Y(){return O()!=i()}
function N(){return E('bltnss')}
function i(){return ie?doc.body.offsetWidth-(doc.body.clientLeft*2):innerWidth}
function s(){return ie?doc.body.offsetHeight-(doc.body.clientTop*2):innerHeight}
function O(){return ie?doc.body.clientWidth:N().offsetWidth}
function K(){return ie?doc.body.clientHeight:s()-(D()?(Y()?i()-O():s()-L()):0)}

return{THiN:K, Too:l, P:O,L:a,N:D}}
};if(ns4)return;Declare_bMenu(BlaTek);cM();bMenu=BlaTek}
function nool(){}bMenu={show:nool,showLT:nool,showRT:nool,showLB:nool,showRB:nool,showByElement:nool,showByImg:nool,showByCursor:nool,hide:nool}