//2002Ilya Muzukin Orange v1.3s
var ns ;var ie ;var n6;var op;var W;
function BrowserCheck() {
	ns=document.layers;
	ie=document.all;
	op=window.opera;
	if(!ie&&document.getElementById){ns=false;n6=true;};
	if(ns||n6||op){W=window.innerWidth-16}else{W=document.body.offsetWidth-20;}
}
function TIMoveTo(x,y)
{
if(this.itemCount<1) return;
this.xpos=x;this.ypos=y;this.css.left=x;this.css.top=y;
}
function TIGet(id)
{
if(id==this.id) return this;
for(var i=0;i<this.itemCount;i++)
{
It=this.items[i].Get(id);
if(It!=null) return It;
}
return null;
}
function TIA(id,parid,name,link,target,image,im2,iw,ih)
{
It=new TreeItem(id,parid,name,link,target,image,im2,iw,ih);
this.Add(It);
}
function TIAdd(N)
{
var T=this;
N.Opened=false;
It=T.Get(N.parid);
if(N.parid==T.id)
{
N.width=T.width;
N.bckColor=T.bckColor;
N.selBckColor=T.selBckColor;
N.fntColor=T.fntColor;
N.fntSize=T.fntSize;
N.iHeight=T.iHeight;
N.imWidth=T.imWidth;
if(N.iw>T.mW&&this.align=="vert") T.mW=N.iw
if(N.ih>T.mH&&this.align!="vert") T.mH=N.ih;
N.arrIm=T.arrIm;N.arrIm1=T.arrIm1;
N.selFntColor=T.selFntColor;
T.items[T.itemCount]=N;N.d=T.d;
N.parentItem=T;
N.bSize=T.bSize;
N.face=T.face;
N.onm=T.onm;N.i=T.i;N.b=T.b;N.u=T.u;
N.bColor=T.bColor;
N.visibility="hidden";
T.itemCount++;
return;
}
if(It!=null) {It.Add(N);return;}
}

function TIWriteDiv()
{preload(this.vname+".iob",this.arrIm);preload(this.vname+".iob1",this.arrIm1);preload(this.vname+".imb",this.img2);preload(this.vname+".ima",this.image);
if(this.itemCount<1) return false;
document.write("<DIV ID='"+this.vname+"'>");
for(var i=0;i<this.itemCount;i++)
{ci=this.items[i];
ref=ci.name;if(ci.b)ref="<b>"+ref+"</b>";if(ci.i)ref="<i>"+ref+"</i>";if(ci.u) ref="<u>"+ref+"</u>";
im="";im1="";cl="";scl="";im2="";ime="";
cl=" color='"+ci.fntColor+"'";scl=" color='"+ci.selFntColor+"'";
if(ci.image!=""){im1="<img name='"+ci.vname+"ic' src='";ime="' width='"+ci.imWidth+"' height='"+this.iHeight+"' border=0>";}
if(ci.itemCount>0&&ci.arrIm!=""){im="<img name='"+ci.vname+"im' src='"+ci.arrIm+"' height='"+this.iHeight+"' width='"+this.iHeight+"' border=0>";im2="<img name='"+ci.vname+"im' src='"+ci.arrIm1+"' height='"+this.iHeight+"' width='"+this.iHeight+"' border=0>";}
t1="<table border='0' width='"+ci.iw+"' cellspacing='0' height='"+ci.ih+"' cellpadding='0'><tr><td width ="+ci.imWidth+">"+im1;te=ime+"</td><td width= '"+ci.iw+"' ><font ";tc=" size='"+ci.fntSize+"' face='"+ci.face+"'>";t2="</font></td><td width="+this.iHeight+">";t3="</td></tr></table>";
ci.normText=t1+ci.image+te+cl+tc+"<div id='"+ci.vname+"t' >"+ref+"</div>"+t2+im+t3;
ci.selText=t1+ci.img2+te+scl+tc+ref+t2+im2+t3;
document.write("<DIV ID='"+ci.vname+"i' >"+ci.normText+"</DIV>");
if(ie){ci.ilayer=document.all[ci.vname+"i"];ci.tlayer=document.all[ci.vname+"t"];}
if(n6){ci.ilayer=document.getElementById(ci.vname+"i");
ci.tlayer=document.getElementById(ci.vname+"t");
var tl=ci.tlayer.style;
tl.color=ci.fntColor;tl.fontFamily=this.face;
tl.fontSize=6+2*ci.fntSize+"pt";
};
if(ns)ci.ilayer=eval("document."+this.vname+".document."+ci.vname+"i");
}
document.write("</DIV>");
for(var i=0;i<this.itemCount;i++)
{
this.items[i].WriteDiv();
}
if(ie){this.layer=document.all[this.vname];this.css=this.layer.style;}
if(n6){this.layer=document.getElementById(this.vname);this.css=this.layer.style;}
if(ns){this.layer=eval("document."+this.vname);this.css=this.layer;}
return false;
}
function TIEventInit()
{
var oinit=true;
 for(var i=0;i<this.itemCount;i++)
 {
 this.items[i].EventInit();
 }
for(var i=0;i<this.itemCount;i++){
var style=this.items[i].ilayer;
if(oinit)this.layer.onmouseout=new Function("e",this.vname+".outHandler(e);return false;");
oinit=false;
style.onmouseover=new Function(this.vname+".moveHandler("+i+");return false;");
style.onmousedown=new Function(this.vname+".downHandler("+i+");return false;");
if(ns)style.captureEvents(Event.MOUSEDOWN | Event.MOUSEMOVE | Event.MOUSEUP);
}
}
function TIWriteCSS()
{
var dx;
var dy;
var bCol=(ns)?"layer-background-color:" : "background-color:";
var d=this.d;var b=this.bSize;
this.width=Math.max(this.width,this.mW);
this.iHeight=Math.max(this.iHeight,this.mH);
var xs=b;var ys=b;
for(var i=0;i<this.itemCount;i++)
{
var N=this.items[i];
N.iw=(N.iw)? N.iw:this.width;
N.ih=(N.ih)? N.ih:this.iHeight;
if(this.align=="vert") {ys+=d+N.ih;xs=this.width+b+d;if(N.iw<this.width)N.iw=this.width;} else {xs+=d+N.iw;ys=this.iHeight+b+d;if(N.ih<this.iHeight)N.ih=this.iHeight;};
}
ys+=b-d;xs+=b-d;
this.tH=ys; this.tW=xs;
if(this.itemCount>0){
if(this.parentItem==null)document.write("<STYLE TYPE='text/css'><!--");
document.write("#"+this.vname+" {position:absolute;width:"+xs+"px;left:"+this.xpos+"px;top:"+this.ypos+"px;height:"+ys+"px;clip:rect(0,"+xs+","+ys+",0);visibility: "+this.visibility+";"+bCol+this.bColor+"; cursor: hand; z-index:5;}"); 
xs=b;ys=b;
for(var i=0;i<this.itemCount;i++)
{
var N=this.items[i];N.xs=xs;N.ys=ys;
document.write("#"+N.vname+"i {position:absolute;"+bCol+N.bckColor+";top:"+ys+"px;left:"+xs+"px"+";width:"+N.iw+"px;height:"+N.ih+"px; z-index:1;}"); 
if(this.align=="vert") {ys+=d+N.ih} else {xs+=d+N.iw};
N.WriteCSS();
}
if(this.parentItem==null)document.write("--></STYLE>");
}
}
function TIShow(o)
{
this.focus=-1;
if(this.itemCount<1) return;
if(o==1)
{
this.css.visibility=(ns)? "show":"visible";
}
else
{
for(var i=0;i<this.itemCount;i++)this.items[i].Show(0);
this.css.visibility=(ns)? "hide":"hidden";
}
}
function TIToggle(mod)
{
this.Opened=mod;
var t=this;var c1=t.bckColor;var c2=t.selBckColor;
if(ie||n6)
{
im=document.images;
if(im[t.vname+"im"])im[this.vname+"im"].src=(mod)? t.iob1.src:t.iob.src;
if(im[t.vname+"ic"])im[this.vname+"ic"].src=(mod)? t.imb.src:t.ima.src;
t.ilayer.style.backgroundColor=(mod)? c2 : c1;
t.ilayer.style.background=(mod)? c2:c1;
t.tlayer.style.color=(mod)? t.selFntColor:t.fntColor; 
}
if(ns)
{
var txt=(mod)? t.selText:t.normText;
t.ilayer.document.bgColor=(mod)? c2 : c1;
t.Write(txt);
}
}
function TIMove(i)
{
if(this.itemCount<1)return;var t=this;
if(t.onm)t.onm(i);
t.active=true;pI=t.parentItem;ti=t.items[i];ts=t.items[t.selected];
if(pI!=null){pI.active=true;pI.focus=-1;}
ts.active=true;
k=0;j=1;if(this.align=="vert"){k=1;j=0;}
var nxpos=t.xpos+k*t.width+ti.xs;
var nypos=t.ypos+j*t.iHeight+ti.ys;
if(nxpos+ti.tW>W) nxpos=nxpos-(t.width+ti.width);
ti.MoveTo(nxpos,nypos);ts.Show(0);ti.Show(1);ts.Toggle(false);ti.Toggle(true);status=ti.link;
t.selected=i;t.focus=i;
}

function TIDown(i)
{
it=this.items[i];var tr=it.target;
if(it.link!=""){
if(it.link.substring(0,11)=="javascript:"){eval(it.link.substring(11,it.link.length));return;}
if(tr==""||tr=="_self")location.href=it.link;else if(tr=="_top") top.location=it.link;else if(tr=="_parent")parent.location=it.link;else if(tr=="_blank") window.open(it.link,"");else {var fr=top.frames[tr];if(fr)fr.location=it.link;else window.open(it.link,"");}

}
}
function TIReset()
{if(this.active)return;
this.items[this.selected].Show(0);
if(this.parentItem!=null){
if(this.parentItem.focus>=0)return;
this.parentItem.active=false;this.parentItem.Reset();}
this.items[this.selected].Toggle(false);
}
function TIWrite(text)
{
var style=this.ilayer;
style.document.open();
style.document.write(text);
style.document.close();
}
function TIMout(e)
{
if(!ns){
if(n6){mx=e.pageX;my=e.pageY;}else{
mx=window.event.clientX;
my=window.event.clientY;if(!op){my+=document.body.scrollTop;mx+=document.body.scrollLeft;}
}
if((mx>this.xpos+1&&mx<this.xpos+this.tW)&&(my>this.ypos+1&&my<this.ypos+this.tH)) return;
}
this.active=false;this.focus=-1;
setTimeout(this.vname+".Reset()",300);
}
function preload(imgObj,imgSrc) {eval(imgObj+' = new Image()');eval(imgObj+'.src = "'+imgSrc+'"');}
function TreeItem(id,parid,name,link,target,image,im2,iw,ih)
{
var t=this;
t.vname="DdMenu"+TreeItem.dmcount;
TreeItem.dmcount++;
t.image=image;
t.img2=(im2)? im2:image;
t.name=name;
t.frname="";
t.id=id;
t.parid=parid;
t.link=link;
t.target=target;
t.items=new Array();
t.itemCount=0;
t.Opened=false;
t.bckColor="#f0f0f0";
t.fntColor="#ffffff";
t.selFntColor="#00ffff";
t.fntSize=2;
t.face="default";
t.selBckColor="#a0a0a0";
t.alinkColor="#ffff00";
t.arrIm="";
t.arrIm1="";
t.xpos=0;
t.ypos=0;
t.selected=0;
t.height=600;
t.mW=0;this.mH=0;
t.width=150;
t.b=false;this.i=false;this.u=false;this.d=1;
t.iHeight=21;
t.imWidth=18;
t.focus=-1;
t.bSize=1;this.iw=iw;this.ih=ih;
t.tW=0;
t.tH=0;
t.onm=null;
t.bColor="#000000";
t.WriteCSS = TIWriteCSS;
t.Show = TIShow;
t.Add = TIAdd;
t.WriteDiv = TIWriteDiv;
t.Get = TIGet;
t.A = TIA;
t.align="vert";
t.moveHandler=TIMove;
t.outHandler=TIMout;
t.downHandler=TIDown;
t.active=false;
t.Reset=TIReset;
t.EventInit=TIEventInit;
t.MoveTo=TIMoveTo;
t.Write=TIWrite;
t.Toggle=TIToggle;
t.normText="";
t.selText=""
eval(this.vname + "=this");
}

TreeItem.dmcount=0;