<!--
//Menu scrips v 2.4. (c) Mike Popov 2001, m_popov@mail.ru.
//Tested for Internet Explorer 4-5.5, Netscape Navigator 4-6, Opera 4-5.
var base=65;
MenuWidth=new Array(3);
MenuHeight=new Array(3);
var x,y,menu_x;
var detectMenu=false;

//Function for image changing.
function chIm(imgDocID,imgObjName) {
     if (document.images) 
          document.images [imgDocID]. src = eval(imgObjName + ".src")                      
};

//Making pull down menu
function MakeMenu(Number,TextMenu,m_width,m_height,menu_color,menu_border) {
  if (IE||NN||NN6||OPERA) {
	MenuHeight[Number]=m_height;
	MenuWidth[Number]=m_width;

	if (IE||OPERA||NN6) {
		document.write('<span id="Menu'+Number+'" class=menu onMouseOut="detect('+Number+','+m_width+','+m_height+')" style="POSITION:absolute;width:'+m_width+'px;height:'+m_height+'px;TOP:-'+(m_height+30)+'px">');
	}
	if (NN) {
		document.write('<layer id="Menu'+Number+'" class=menu onMouseOut="detect('+Number+','+m_width+','+m_height+')" left="0" height="0" top="0" clip="0,5,'+(m_width+5)+','+(m_height+10)+'" visibility=hide>');
	}
	document.write('<img src="/d.gif" width=1 height=5><table cellspacing=0 cellpadding=0 border=0><tr><td>');
	document.write('<table cellspacing=0 cellpadding=1 border=0 width='+m_width+' height='+m_height+'><tr><td align=center bgcolor='+menu_border+'><table width='+(m_width-2)+' height='+(m_height-2)+' bgcolor='+menu_color+' cellspacing=0 cellpadding=0 border=0>');
	document.write('<tr><td align=center valign=middle><table width='+(m_width-10)+' height='+(m_height-10)+' cellspacing=0 cellpadding=0 border=0><tr><td valign=top>'+TextMenu+'</td></tr></table></td></tr></table></td></tr></table></td>');
	document.write('<td width=5 valign=bottom><table width=5 height='+(m_height-5)+' cellspacing=0 cellpadding=0 border=0 background="/bg12.gif"><tr><td>&nbsp;</td></tr></table></td></tr><tr><td colspan=2 align=right><table height=5 width='+m_width+' cellspacing=0 cellpadding=0 border=0 background="/bg12.gif"><tr><td valign=top><img src="/bg12.gif" width=2 height=2></td></tr></table></td></tr></table>');
	if (NN) {
		document.write('</layer>');
		document.layers['Menu'+Number].top=-m_height-30;
	}
	if (NN||NN6) {
		window.captureEvents(Event.MOUSEMOVE);
		window.onmousemove=displayCoords;
	}
	if (IE||NN6||OPERA) {
		document.write('</span>');
	}
  }
}

//Reading mouse position for Netscape.
function displayCoords(e) {
	x=e.pageX;
	y=e.pageY;
}

//Spying for mouse over event from menu.
function detect(N,w,h) {
var do_hide=false;
	if (NN||NN6) {
            window.captureEvents(Event.MOUSEMOVE);
            window.onmousemove=displayCoords;
		if (NN) do_hide=(detectMenu&&(x<menu_x||x>menu_x+w-2||y<base+5||y>base+h+8));
		if (NN6) do_hide=(detectMenu&&(x<menu_x+4||x>menu_x+w||y<base+2||y>base+h+8));
	}
	else if (IE||OPERA) { 
	      x=event.clientX;
	      y=event.clientY;
		if (IE) do_hide=(detectMenu&&(x<menu_x+2||x>menu_x+w+5||y<base+2||y>base+h+10));
		if (OPERA) do_hide=(detectMenu&&(x<menu_x+2||x>menu_x+w+5||y<base||y>base+h+10));
	}
	if (do_hide&&(IE||NN||NN6||OPERA)){
		detectMenu=false;
		Menu(N,menu_x,-h-11);
	}
}

//Showing menu with number N
function MenuShow(N) {
	this.window.scroll(0,0);
   if (!detectMenu){
	if (NN||NN6) {
            window.captureEvents(Event.MOUSEMOVE);
            window.onmousemove=displayCoords;
	}
      if (NN) document.layers['Menu'+N].visibility="show";
	if (IE||OPERA) { 
		x=event.clientX;
	}
	menu_x=x-MenuWidth[N]/2;
	sc_wt=screen.width-11;
	if (menu_x+MenuWidth[N]>sc_wt) menu_x=sc_wt-MenuWidth[N];
	Menu(N,menu_x,base);
	detectMenu=true;
   }  
}

//Show the menu with number N in x,y position
function Menu(N,x,y) {
	if (NN6||OPERA) {
           	document.getElementById('Menu'+N).style.top=y;
            document.getElementById('Menu'+N).style.left=x;
	}
	if (NN) {
            document.layers['Menu'+N].top=y;
     	      document.layers['Menu'+N].left=x;
	}
	if (IE) { 
		document.all('Menu'+N).style.top=y;
		document.all('Menu'+N).style.left=x; 
	}
}
//-->