// Title: Tigra Menu PRO
// Description: Tigra Menu PRO is flexible menu solution for commercial
//	applications offering high reliability and wide browsers support.
//	See URL for complete feature list.
// URL: http://www.softcomplex.com/products/tigra_menu_pro/
// Version: 3.0d
// Date: 03-12-2002 (mm-dd-yyyy)
// Feedback: feedback@softcomplex.com
// Notes: This version of script is not allowed for user applications.
//	Please register at official site and get your legal copy.

function scrieItem(Item)
{ for (var i=0;i<G.length;i++)
 	{document.write('<div id="m'+this.A.id+'i'+this.id+G[i]+'" style="position:absolute;left:'+Item.left+'px;top:'+Item.top+'px;width:'+Item.width+'px;height:'+Item.height+'px;visibility:hidden;z-index:'+this.H*2+';" class="m'+this.A.id+'l'+this.H+G[i]+'o"><div class="m'+this.A.id+'l'+this.H+G[i]+'i">'+(typeof(this.B[0])=='object'?this.B[0][i]:this.B[0])+'</div></div>');
	this.C[G[i]] = w.ElemId('m'+this.A.id+'i'+this.id+G[i]);
	}
 document.write('<div id="m'+this.A.id+'i'+this.id+'i" style="position:absolute;left:'+Item.left+'px;top:'+Item.top+'px;width:'+Item.width+'px;height:'+Item.height+'px;visibility:hidden;z-index:'+(this.H*2+1)+';"><a href="'+(this.B[1]!=null&&typeof(this.B[1])!='string'&&this.B[1][0]!=null?this.B[1][0]:this.B[1])+'"'+(this.B[1]!=null&&typeof(this.B[1])!='string'&&this.B[1][1]!=null?' target="'+this.B[1][1]+'"':'')+' onclick="return F['+this.A.id+'].onclick('+this.id+');" onmouseout="F['+this.A.id+'].onmouseout('+this.id+');" onmouseover="F['+this.A.id+'].onmouseover('+this.id+');" onmousedown="F['+this.A.id+'].onmousedown('+this.id+');"><img src="'+this.A.mnuPos['pixel_path']+'" width="'+Item.width+'" height="'+Item.height+'" border="0"'+(this.B[1]!=null&&typeof(this.B[1])!='string'&&this.B[1][2]!=null?' alt="'+this.B[1][2]+'"':'')+'></a></div>');
 this.link=w.ElemId('m'+this.A.id+'i'+this.id+'i')
}

function Viz1(V)
{if (!this.H && V=='hidden') V='mout';
 if (V==this.V) return;
 if (this.V=='hidden') this.link.visibility='show';
 else this.C[this.V].visibility='hide';
 if (V=='hidden') this.link.visibility='hide';
 else this.C[V].visibility='show';
 this.V=V
}

function Viz2(V,U)
{if (!this.H && V=='hidden' && !U) V='mout';
 if (V==this.V) return;
 if (this.V=='hidden') this.link.style.visibility='visible';
 else this.C[this.V].style.visibility='hidden';
 if (V=='hidden') this.link.style.visibility='hidden';
 else this.C[V].style.visibility='visible';
 this.V=V;
}

var w,F=[]; G=['mout','mover','mdown'];

function PozDim()
{this.Lat=window.innerWidth!=null?function(){return window.innerWidth}:function(){return document.body.clientWidth};
 this.Ina=window.innerHeight!=null?function(){return window.innerHeight}:function(){return document.body.clientHeight};
 this.pozX=window.pageXOffset!=null?function(){return window.pageXOffset}:function(){return document.body.scrollLeft};
 this.pozY=window.pageYOffset!=null?function(){return window.pageYOffset}:function(){return document.body.scrollTop};
 this.ElemId=document.all?function(i){return document.all[i]}:function(i){return document.getElementById(i)};
 this.poz= SetPozDim;
 this.alin = S;
}

function S() {for(var i=0;i<F.length;i++) if(F[i].g) F[i].alin()}

function SetPozDim()
{var S0,D0;
 if (this.width != (S0=this.Lat()))  {this.width=S0; D0=true}
 if (this.height != (S0=this.Ina())) {this.height=S0; D0=true}
 if (this.scrolX!=(S0=this.pozX())) {this.scrolX=S0; D0=true}
 if (this.scrolY!=(S0=this.pozY())) {this.scrolY=S0; D0=true}
 if (D0)
 	{if (this.x) clearTimeout(this.x);
	 this.x=setTimeout('w.alin()', 200)
	 }
 window.setTimeout('w.poz()', 50)
}

function menu(mnuItems,mnuPos)
{this.mnuItems=mnuItems;
 this.mnuPos=mnuPos;
 this.T=[];
 this.I=[];
 this.v=[];
 this.q=0;
 this.hide=t;
 this.onclick=clic;
 this.onmouseout=mOut;
 this.onmouseover=mOver;
 this.onmousedown=mDown;
 this.y=O;
 this.alin=setAlin;
 if(!w) {w=new PozDim(); w.poz()}
 this.id=F.length;
 F[this.id]=this;
 for (var i=0; i<this.mnuItems.length; i++) new E0 (i,this,this);
 var X=0,Y=0,n=Number.POSITIVE_INFINITY,p=Number.POSITIVE_INFINITY;
 for(var i=0; i<this.I.length; i++)
   {X=Math.max(X,this.I[i].y('left')+this.I[i].y('width'));
	Y=Math.max(Y,this.I[i].y('top')+this.I[i].y('height'));
	n=Math.min(n,this.I[i].y('left'));
	p=Math.min(p,this.I[i].y('top'));
	}
 this.v.top=0;
 this.v.left=0;
 this.v.width=X-n;
 this.v.height=Y-p;
 this.g=true;
 this.alin();
}

function t()
{if(!this.k||this.q||!this.e)return;
 this.e.u(0);
 this.e=null
}

function setAlin()
{this.v.top=this.v.left=0;
 if (this.mnuPos.align=='center') this.v.left=Math.round((w.width-this.v.width)/2);
 else if (this.mnuPos.align=='right') this.v.left=w.width-this.v.width;
 if (this.mnuPos.valign=='center') this.v.top=Math.round((w.height-this.v.height)/2);
 else if (this.mnuPos.valign=='bottom') this.v.top=w.height-this.v.height;
 if (this.mnuPos.scroll=='horizontal'||this.mnuPos.scroll=='both') this.v.left+=w.scrolX;
 if (this.mnuPos.scroll=='vertical'||this.mnuPos.scroll=='both') this.v.top+=w.scrolY;
 for (var i=0;i<this.I.length;i++)
 	{this.I[i].o('hidden',true); this.I[i].M(true); this.I[i].o('mout')}
}

function O(W) {return this.v[W]?this.v[W]:0}
function clic(id){return(this.T[id].B[1]?true:false)}
function mOut(id){this.q--;this.k=setTimeout('F['+this.id+'].hide();',this.mnuPos.hide_delay[this.T[id].H])}
function mOver(id){this.q++;clearTimeout(this.k);this.k=null;this.T[id].l();this.e=this.T[id]}
function mDown(id){this.T[id].o('mdown')}

function E0(D,E,A)
{this.D = new String(D);
 this.E = E;
 this.A = A;
 this.B0= this.D.split('_');
 this.H = this.B0.length-1;
 var f='';
 for (var i=0; i<=this.H; i++) f+='['+(Number(this.B0[i])+(i?3:0))+']';
 eval('this.B=this.A.mnuItems'+f);
 if (!this.B) return;
 this.id=this.A.T.length;
 this.A.T[this.id]=this;
 E.I[E.I.length]=this;
 if(document.layers) {this.write=H0; this.o=Viz1; this.y=C0}
 else {this.write=scrieItem; this.o=Viz2; this.y=s}
 this.u=L0;
 this.l=Z;
 this.M=mitem_reposition;
 this.P0=[];
 this.C=[];
 this.write(this.M(false));
 this.V='hidden';
 this.I=[];
 var a=this.B.length-3;
 for(var i=0; i<a; i++) new E0(this.D+'_'+i,this,this.A)
}

function L0(h)
{for(var i=0;i<this.I.length;i++) this.I[i].o('hidden');
 if(h>=this.H)this.o('mout');
 else this.E.u(h)
}
function Z()
{if(this.A.e&&this.H<=this.A.e.H)this.A.e.u(this.A.e.E==this?this.H+1:this.H);
 if(!this.A.e||this.A.e.E!=this)for(var i=0;i<this.I.length;i++)this.I[i].o('mout');this.o('mover')
}
function mitem_reposition(poz)
{if(this.B0[this.H]==0)
	{this.P0.left = this.E.y('left') + (this.B[2]!=null&&this.B[2][0]!=null?this.B[2][0]:this.A.mnuPos.block_left[this.H]);
	 this.P0.top = this.E.y('top') + (this.B[2]!=null&&this.B[2][1]!=null?this.B[2][1]:this.A.mnuPos.block_top[this.H])
	}
 else
 	{this.P0.left = this.E.I[this.B0[this.H]-1].y('left')+(this.B[2]!=null&&this.B[2][0]!=null?this.B[2][0]:this.A.mnuPos.left[this.H]);
	 this.P0.top = this.E.I[this.B0[this.H]-1].y('top')+(this.B[2]!=null&&this.B[2][1]!=null?this.B[2][1]:this.A.mnuPos.top[this.H])
	}
 this.P0.width = (this.B[2]!=null&&this.B[2][2]!=null?this.B[2][2]:this.A.mnuPos.width[this.H]);
 this.P0.height = (this.B[2]!=null&&this.B[2][3]!=null?this.B[2][3]:this.A.mnuPos.height[this.H]);
 if (!poz) return this.P0;
 this.y('left',this.P0.left);
 this.y('top',this.P0.top);
 for (var i=0;i<this.I.length;i++) this.I[i].M(true)
}
function s(W,I0)
{if(!W)return;
 if(this.link.style.pixelLeft)
 	if(W=='left') W='pixelLeft';
	else if(W=='top') W='pixelTop';
		else if(W=='width') W='pixelWidth';
			else if(W=='height') W='pixelHeight';
 if(I0)
 	{for(var i=0;i<G.length;i++) this.C[G[i]].style[W]=I0;
	 this.link.style[W]=I0;
	 return(this.P0[W]=I0)
	 }
 else
 	{var R0=/^(\-?\d+)/;
	 if(R0.exec(this.link.style[W]))return new Number(RegExp.$1)
	 }
}
//var K0='=jgsbnf!xjeui>#1#!ifjhiu>#1#!tsd>#iuuq;00xxx/tpgudpnqmfy/dpn0jogp/iunm#?=0jgsbnf?';
function H0(y)
{for(var i=0;i<G.length;i++)
	{document.write('<layer name="m'+this.A.id+'i'+this.id+G[i]+'" left="'+y.left+'" top="'+y.top+'" z-index="'+this.H*2+'" width="'+y.width+'" height="'+y.height+'" visibility="hide"><table cellpadding="0" cellspacing="0" border="0" width="'+y.width+'" height="'+y.height+'" class="m'+this.A.id+'l'+this.H+G[i]+'o"><tr><td><div class="m'+this.A.id+'l'+this.H+G[i]+'o"><div class="m'+this.A.id+'l'+this.H+G[i]+'i">'+(typeof(this.B[0])=='object'?this.B[0][i]:this.B[0])+'</div></div></td></tr></table></layer>');
	 this.C[G[i]]=document.layers['m'+this.A.id+'i'+this.id+G[i]]
	 }
 document.write('<layer name="m'+this.A.id+'i'+this.id+'i" left="'+y.left+'" top="'+y.top+'" z-index="'+(this.H*2+1)+'" visibility="hide" width="'+y.width+'" height="'+y.height+'"><a href="'+(this.B[1]!=null&&typeof(this.B[1])!='string'&&this.B[1][0]!=null?this.B[1][0]:this.B[1])+'"'+(this.B[1]!=null&&typeof(this.B[1])!='string'&&this.B[1][1]!=null?' target="'+this.B[1][1]+'"':'')+' onclick="return F['+this.A.id+'].onclick('+this.id+');" onmouseout="F['+this.A.id+'].onmouseout('+this.id+');" onmouseover="F['+this.A.id+'].onmouseover('+this.id+');" onmousedown="F['+this.A.id+'].onmousedown('+this.id+');"><img src="'+this.A.mnuPos['pixel_path']+'" width="'+y.width+'" height="'+y.height+'" border="0"'+(this.B[1]!=null&&typeof(this.B[1])!='string'&&this.B[1][2]!=null?' alt="'+this.B[1][2]+'"':'')+'></a></layer>');
 this.link=document.layers['m'+this.A.id+'i'+this.id+'i'];
}

function C0(W,I0)
{if(!W)return;
 if(I0)
 	{this.P0[W]=I0;
	for(var i=0;i<G.length;i++)
		{this.C[G[i]].moveTo(this.P0.left,this.P0.top);
		 this.C[G[i]].resizeTo(this.P0.width,this.P0.height)
		 }
	this.link.moveTo(this.P0.left,this.P0.top);
	this.link.resizeTo(this.P0.width,this.P0.height)
	}
return this.P0[W]
}