var isDOM,isIE,isNN4,isOpera,isIE4;if (navigator.userAgent.indexOf('Opera')!=-1) isOpera=1;if (document.getElementById) isDOM=1;if (document.all && !isOpera) isIE=1;if (document.layers) isNN4=1;if (!isDOM && document.all) isIE4=1;var tm;var activesubmenu="";var visibleMenus=new Array(10);//------------------------------------------------------------------function getPosObj(n, e) {	if (isNN4) {		this.x=e.pageX;		this.y=e.pageY;		this.w=this.h=0;		return;	}	var obj=document.getElementById(n);	this.x=obj.offsetLeft;	this.y=obj.offsetTop;	this.w=obj.offsetWidth;	this.h=obj.offsetHeight;	while((obj=obj.offsetParent)!=null && obj.tagName!='BODY') {		this.x+=obj.offsetLeft;		this.y+=obj.offsetTop;		if(!isNaN(parseInt(obj.border))  ) 		{		this.x+=parseInt(obj.border);		this.y+=parseInt(obj.border);		}			}	}//////////////////////////==================================================================//\u0413\u043B\u0430\u0432\u043D\u044B\u0439 \u043E\u0431\u044A\u0435\u043A\u0442//////////////////////////==================================================================function Navigator(varName){//this.parent=ParentElement;// \u041C\u0435\u0442\u043E\u0434\u044Bthis.render=rendrer;this.renderSubMenus=renderSubMenus;this.addNode=addNode;this.hidenodes=hidenodes;// \u0421\u0432\u043E\u0439\u0441\u0442\u0432\u0430this.nodes=new Array();this.defaultStyle='NavigatorLevel1';this.styles=new Array();//\u041E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u0435this.styles[0]=new nodeStyle('NavigatorLevel1',160);this.styles[1]=new nodeStyle('SubMenu',160);this.styles[2]=new nodeStyle('SubMenu',160);this.styles[3]=new nodeStyle('SubMenu',160);this.styles[4]=new nodeStyle('SubMenu',160);this.styles[5]=new nodeStyle('SubMenu',160);this.styles[6]=new nodeStyle('SubMenu',160);this.tabs=new Array();this.tabs[0]=168;this.tabs[1]=300;this.tabs[2]=366;this.tabs[3]=366;this.variableName=varName;this.top=30;this.activeNode='';this.CurrentNode='';this.mode=0;this.expandTo='left'}//\u041E\u0442\u0440\u0438\u0441\u043E\u0432\u043A\u0430 \u0432\u0435\u0440\u0445\u043D\u0435\u0433\u043E \u043C\u0435\u043D\u044Efunction rendrer(){ var i,j,node,className,str,objName,Evt; str="";	className=this.styles[0].className;if (this.mode==0 || this.mode==2){str+='<TABLE width="160"  CLASS='+className+' CELLSPACING=0 CELLPADDING=0>\n'; for (i = 0; i < this.nodes.length; i++)   {	node=this.nodes[i];	objName=this.variableName+".nodes["+i+"]";	if (node.nodes.length>0)			{			Evt= 'onmouseover="'+objName+'.showsub()"  onmouseout="'+objName+'.hide()" ';		  			    ExpIcon=""			}	else {Evt=' ' ;			ExpIcon='';}				if (node.image!='')	{	str+='<TR  ><TD id=root'+node.divid+'   '+Evt+'  Style="'+node.Style+'">';	str+='<TABLE WIDTH=100%  CLASS=RightTitle><TR><TD WIDTH=110 >';	str+='<A HREF='+node.href+'   CLASS="RightTitle" >'+node.text+'</A>';					str+='</TD><TD><IMG WIDTH=35 HEIGHT=32  STYLE="border:1px solid #3A72C0" align=middle SRC="'+node.image+'"></TD></TR></TABLE>';	}	else	{			str+='<TR  STYLE="'+node.Style+'"  ><TD id=root'+node.divid+' CLASS='+className+'   '+Evt+'  STYLE="'+node.Style+'"   >';		if (ExpIcon!='') {			str+='<TABLE WIDTH=100% ><TR><TD WIDTH=90% >';		}				str+='<A HREF='+node.href+' CLASS='+className+' Style='+node.Style+' >'+node.text+'</A>'	;		if (ExpIcon!='') {					str+='</TD><TD ALIGN=RIGHT STYLE="font-size:8pt">'+ExpIcon+'</TD></TR>';			str+='</TABLE>';			}			}	str+='</TD></TR> \n';	str+=this.styles[0].postHTML;  }	str+='</TABLE>\n';}else // \u0413\u043E\u0440\u0438\u0437\u043E\u043D\u0442\u0430\u043B\u044C\u043D\u043E\u0435 \u043C\u0435\u043D\u044E{str+='<TABLE   CELLSPACING=0 CELLPADDING=0> <TR>\n'; for (i = 0; i < this.nodes.length; i++)   {	str+=this.styles[0].preHTML;	node=this.nodes[i];	objName=this.variableName+".nodes["+i+"]";	if (node.nodes.length>0)			{			Evt= 'onmouseover="'+objName+'.showsub()"  onmouseout="'+objName+'.hide()" ';		  				}	else {Evt=' ' ;}	str+='<TD id=root'+node.divid+'  CLASS='+className+'   '+Evt+'  Style="'+node.Style+'">';	str+='<A HREF='+node.href+' CLASS='+className+' Style="'+node.Style+'" >'+node.text+'</A>'	str+='</TD> \n';	str+=this.styles[0].postHTML;  }	str+='</TR></TABLE>\n';}  document.write(str);//  window.alert(str);//\u041E\u0442\u0440\u0438\u0441\u043E\u0432\u043A\u0430 \u043F\u043E\u0434\u043C\u0435\u043D\u044Efor (i = 0; i < this.nodes.length; i++)  {objName=this.variableName+".nodes["+i+"]";this.renderSubMenus(this.nodes[i],i,objName)} }    //----------------------------------------------------------------------//\u0420\u0435\u043D\u0434\u0435\u0440\u0438\u043D\u0433 \u043F\u043E\u0434\u043C\u0435\u043D\u044E//----------------------------------------------------------------------function renderSubMenus(node,ind,objName){	var className,j,str="",subobjName,top,left,pNd,evt;	className=this.styles[node.level+1].className;//	window.alert(className);//	  	if (node.nodes.length>0)	{	       //window.alert( node.nodes.length+" "+node.text);	       	 pNd=node.parent;//\u0432\u044B\u0447\u0438\u0441\u043B\u0435\u043D\u0438\u0435 \u0432\u0435\u0440\u0445\u043D\u0435\u0439 \u0433\u0440\u0430\u043D\u0438\u0446\u044B	 top=node.navigator.top+20*node.index;	 while (pNd!=null)	     {	      top=top+20*pNd.index;	      pNd=pNd.parent;	     }	   left=node.navigator.tabs[node.level];  	    str+='<DIV id=\''+node.divid+'\' STYLE="position:absolute;visibility:hidden;left:'+ left+';width:200;top:'+top+'"  onmouseover="'+objName+'.setActive()" onmouseout="'+objName+'.hide()">\n'; 	  	str+='<TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0 width="100%"  CLASS='+className+' >\n';			for (j = 0; j< node.nodes.length; j++)   				{			subobjName=objName+'.nodes['+j+']';			if (node.nodes[j].nodes.length>0)				{//				 onmouseout="'+objName+'.hide()"   onmouseover="'+objName+'.setActive()"				Evt= ' onmouseover="'+subobjName+'.showsub();this.style.backgroundColor=\'#80B8FF\'"  onmouseout="'+subobjName+'.hide();this.style.backgroundColor=\'#EDF7FF\';"  ';		  					}			else 			{			Evt='onmouseover="this.style.backgroundColor=\'#80B8FF\'"  onmouseout="this.style.backgroundColor=\'#EDF7FF\';"'}			str+='<TR  CLASS='+className+'>\n<TD id=root'+node.nodes[j].divid+' '+Evt+' WIDTH="100%" CLASS='+className+' +STYLE="'+node.nodes[j].Style+'" ><A   HREF='+node.nodes[j].href+' CLASS='+className+' STYLE="'+node.nodes[j].Style+'">'+node.nodes[j].text+'</A></TD></TR> \n';			}		str+='</TABLE></DIV>\n' ;		document.write(str);		for (j = 0; j< node.nodes.length; j++)   			{			subobjName=objName+'.nodes['+j+']';	     	this.renderSubMenus(node.nodes[j],ind+"_"+j,subobjName)		}	}}//----------------------------------------------------------------function hidenodes(){var i,node;//if (divid=="") return(0);//window.alert('hide'+visibleMenus.toString()+" act="+activesubmenu);for (i=0;i<this.nodesToHide.length;i++){	debug('hidenode'+this.nodesToHide[i].divid);	node=this.nodesToHide[i];	if (node!=null)		{		var div=document.getElementById(node.divid);		div.style.visibility="hidden";		div.style.display="none";		this.nodesToHide[i]=null;		}} }//--------------------------------------------------------------------------------------------------------------------------------function debug(funcName){return;oxxx2=document.getElementById("xxx2");//src=event.srcElement;var xxx=document.getElementById('xxx');//xxx.value=funcName+" "+visibleMenus.toString()+" act="+activesubmenu+" tag "+src.tagName;oxxx2.innerHTML=funcName+"<BR>"+oxxx2.innerHTML;//+src.tagName+" id="+src.id+"<BR>";}//--------------------------------------------------//\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0443\u0437\u0435\u043B//---------------------------------------------------------function addNode(pNode,href,text){if (pNode!=null)	{	pNode.nodes[pNode.nodes.length]=new Node(pNode,href,text,pNode.nodes.length,this);	this.CurrentNode=pNode.nodes[pNode.nodes.length];	}else	{	this.nodes[this.nodes.length]=new Node(null,href,text,this.nodes.length,this);	this.CurrentNode=this.nodes[this.nodes.length];	}		}//--------------------------------------------------------------------------------------------------------------------------------//---------------------------------------------------------------------------------------------------------------------------------------------------------------------//\u0423\u0437\u0435\u043B \u043D\u0430\u0432\u0438\u0433\u0430\u0442\u043E\u0440\u0430//---------------------------------------------------------------------------------------------------------------------------------------------------------------------function Node(pNode,href,text,index,nav){var pNd,str="",str2="",i=0;this.href=href; //cc\u044B\u043B\u043A\u0430this.text=text; //\u0442\u0435\u0441\u043A\u0442this.nodes=new Array(); //\u043F\u043E\u0434\u0447\u0438\u043D\u0435\u043D\u043D\u044B\u0435 \u0443\u0437\u043B\u044Bthis.index=index;pNd=pNode;//\u0412\u044B\u0447\u0438\u0441\u043B\u0435\u043D\u0438\u0435 \u0438\u043C\u0435\u043D\u0438 \u0441\u043B\u043E\u044Fwhile (pNd!=null){	str=str+"_"+pNd.index;	str2=str2+".nodes["+pNd.index+"]";	pNd=pNd.parent;	i=i+1;}this.divid=nav.variableName+str+"_"+index;this.objName=nav.variableName+str2+'.nodes['+index+']';if (pNode==null){ this.level=0}else{this.level=pNode.level+1;}this.parent=pNode; //\u0440\u043E\u0434\u0438\u0442\u0435\u043B\u044C\u0441\u043A\u0438\u0439 \u0443\u0437\u0435\u043Bthis.navigator=nav;this.hidetm=0;this.visible=false;this.Style='';this.image='';//window.alert("New NODE!"+this.href);//\u041C\u0435\u0442\u043E\u0434\u044Bthis.hide=hide;this.setActive=setActive;this.showsub=showsub;this.hideNow=hideNow;}// -------------------------------------------------function setActive(){var i;//debug("cleartm hidetm="+this.hidetm);window.clearTimeout(this.hidetm);if (!this.visible) 	{	this.showsub();	}if (this.parent!=null)	{	debug("setact parent"+this.parent.objName);	this.parent.setActive();	}	this.navigator.activeNode=this.objName;debug("setActive "+this.divid)}//---------------------------------------------------------------function hide(){var i;i=0;//window.alert(this.objName)this.hidetm=window.setTimeout(this.objName+".hideNow()",250);//this.hideNow();debug("hidenode 700 ms"+this.objName+" "+this.divid+"hidetm="+this.hidetm);if (isOpera || isIE) {event.cancelBubble=true;}}//--------------------------------------------------------function hideNow(){var i;if (this.visible)	{//\u043D\u0435  \u0441\u043A\u0440\u044B\u0432\u0430\u0435\u0442 \u0440\u043E\u0434\u0438\u0442\u0435\u043B\u044C\u0441\u043A\u0438\u0439 \u0443\u0437\u0435\u043B \u0435\u0441\u043B\u0438 \u0432\u0438\u0434\u043D\u044B \u0434\u043E\u0447\u0435\u0440\u043D\u0438\u0435	if (this.nodes.length>0)		{		for (i=0;i<this.nodes.length;i++)			{			if (this.nodes[i].visible) {return 0;}			}	}	var div=document.getElementById(this.divid);	div.style.visibility="hidden";//	div.style.display="none";	this.visible=false;	debug("hideNow "+this.objName+" "+this.divid)	if (this.parent!=null )		{if (this.navigator.activeNode!=this.parent.objName)		{			this.parent.hideNow();			}		}		}}//-----------------------------------------------------------------------function showsub(){window.clearTimeout(this.hidetm);//this.setActive();var Pos=new getPosObj('root'+this.divid,window.event);var div=document.getElementById(this.divid);//mode 1 \u0433\u043E\u0440\u0438\u0437\u043E\u043D\u0442\u0430\u043B\u044C\u043D\u043E\u0435 \u043C\u0435\u043D\u044E \u0432\u043F\u0440\u0430\u0432\u043E//mode 2 \u0432\u0435\u0440\u0442. \u043C\u0435\u043D\u044E \u0432\u043B\u0435\u0432\u043Eif (this.level==0 && this.navigator.mode==1){	div.style.left=Pos.x;	div.style.top=Pos.y+Pos.h;}else if (this.navigator.mode==2){	div.style.left=Pos.x-200;	div.style.top=Pos.y;}else{	div.style.left=Pos.x+Pos.w;	div.style.top=Pos.y;}div.style.visibility="visible";this.visible=true;debug("show("+this.objName+" "+this.divid+")");}//=====================================================// \u0421\u0432\u043E\u0439\u0441\u0442\u0430 \u043A\u0430\u0436\u0434\u043E\u0433\u043E \u0443\u0440\u043E\u0432\u043D\u044F \u043D\u0430\u0432\u0438\u0433\u0430\u0442\u043E\u0440\u0430//=====================================================function nodeStyle(className,width){this.className=className;this.Style='';this.width=width;this.preHTML='';this.postHTML='';}