var timer;var TagOpen;var TagClose;
var onmenu="";var timer;var flagLoad=0;
var menu_0 = new Array();var menu_1 = new Array();
var menu_2 = new Array();var menu_3 = new Array();
var menuname= new Array();
var __lonmenu='no';
var coord = new Array();
var n;
var ie;
function check(){
n = (document.layers) ? 1:0;
ie = (document.all) ? 1:0;
flagLoad = 1;
var browser=((n || ie) && parseInt(navigator.appVersion)>=4);
//window.open("http://www.il.if.ua/news/aiesec.html","AIESEC","width=300,height=320,resizable=no,scrollbars=yes,screenX=480,screenY=70");
}

coord[0] = new Array (30,90);
coord[1] = new Array (28,188);
coord[2] = new Array (150,105);
coord[3] = new Array (70,105);
badcoord = new Array(10,90,190,280);

menuname[0] = "menufirst";
menuname[1] = "menusecond";
menuname[2] = "menuthird";
menuname[3] = "menufourth";
//menu_0[0]= new menuLink("характеристика продукції","/cgi-bin/index?action=show&kind=dial&lang=ukr&sub=bydova", "_self" );
//menu_0[1]= new menuLink(".............","#", "_self" );
//menu_0[2]= new menuLink("...... . ........... ..........","#", "_self" );
menu_1[0]= new menuLink("характеристика продукції","/cgi-bin/index.cgi?action=show&kind=product&lang=ukr&sub=xarprod", "_self" );
menu_1[1]= new menuLink("кран козловий КЖ 15-32-8-У1","/cgi-bin/index.cgi?action=show&kind=product&lang=ukr&sub=k1", "_self" );
menu_1[2]= new menuLink("кран козловий електричний ККС 12,5 - 32","/cgi-bin/index.cgi?action=show&kind=product&lang=ukr&sub=k2", "_self" );
menu_1[3]= new menuLink("кран козловий електричний ККС - 16/12,5 - 32","/cgi-bin/index.cgi?action=show&kind=product&lang=ukr&sub=k3", "_self" );
menu_1[4]= new menuLink("кран козловий електричний тельферний","/cgi-bin/index.cgi?action=show&kind=product&lang=ukr&sub=k4", "_self" );
//menu_1[5]= new menuLink("","/cgi-bin/index?action=show&kind=prod&lang=ukr&sub=complex", "_self" );
menu_1[5]= new menuLink("кран мостовий електричний однобалочний опорний КМЕ - 3,2.4,8","/cgi-bin/index.cgi?action=show&kind=product&lang=ukr&sub=k5", "_self" );
menu_1[6]= new menuLink("опалубочна система для будівництва","/cgi-bin/index.cgi?action=show&kind=product&lang=ukr&sub=o", "_self" );
menu_1[7]= new menuLink("лебідка електрична маневрова ЛМ - 50","/cgi-bin/index.cgi?action=show&kind=product&lang=ukr&sub=l", "_self" );
menu_1[8]= new menuLink("лебідка електрична спеціальна ЛЕ-063","/cgi-bin/index.cgi?action=show&kind=product&lang=ukr&sub=l1", "_self" );
menu_1[9]= new menuLink("металоконструкції","/cgi-bin/index.cgi?action=show&kind=product&lang=ukr&sub=m", "_self" );
menu_1[10]= new menuLink("вироби по індивідуальному замовленню","/cgi-bin/index.cgi?action=show&kind=product&lang=ukr&sub=v", "_self" );
menu_1[11]= new menuLink("підйомник","/cgi-bin/index.cgi?action=show&kind=product&lang=ukr&sub=p", "_self" );
menu_1[12]= new menuLink("євроконтейнер","/cgi-bin/index.cgi?action=show&kind=product&lang=ukr&sub=e", "_self" );
//menu_1[3]= new menuLink(".'....... CallBack","http://www.il.if.ua/phtml/?chapter=callback", "_self" );
//menu_1[4]= new menuLink("......... ......","http://www.il.if.ua/phtml/?chapter=ph4", "_self" );
//menu_1[5]= new menuLink("......... .......","http://www.il.if.ua/phtml/?chapter=phaccess", "_self" );
//menu_1[6]= new menuLink("........ isetup","http://www.il.if.ua/phtml/?chapter=isetup", "_self" );
//menu_1[7]= new menuLink("........... .......... SkyPlanet","http://www.il.if.ua/phtml/?chapter=skyplanet", "_self" );
//menu_1[8]= new menuLink("Radioethernet","http://www.il.if.ua/support/ethernet", "_blank" );
//menu_1[9]= new menuLink("....... . Internet","http://www.il.if.ua/support/security", "_blank" );
//menu_3[0]= new menuLink("Beer-club", "http://www.il.if.ua/clubs/beer", "_self");
//menu_3[1]= new menuLink("Music-club", "http://www.il.if.ua/music", "_self" );
//menu_3[2]= new menuLink("Intellect-club", "http://intellect.il.if.ua", "_self" );
//menu_2[0]= new menuLink("Web-mail", "https://webmail.il.if.ua", "_blank");
//menu_2[1]= new menuLink("Web-shop", "http://www.shop.if.ua/", "_self");
//menu_2[1]= new menuLink("..... ....-...........", "http://www.il.if.ua/business/base", "_self");
//menu_2[2]= new menuLink("............", "http://www.il.if.ua/phtml/?chapter=documents", "_self");
//menu_2[3]= new menuLink("....", "http://www.il.if.ua/pub/soft", "_self");

function menuLink(title,url,lTarget)
{
this.title=title;
this.url=url;
this.lTarget=lTarget;
}
function menuMaker(numberMenu, menuWidth)
{
  TagOpen = "<div";
    TagClose = "<\/div>";
    
    quantity=eval("menu_"+numberMenu+".length");
    menuTags=TagOpen+" id=\""+menuname[numberMenu]+"\"><table width =\""+menuWidth+"\"  border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td width =\""+menuWidth+"\" bgcolor=\"white\"><table width=\""+menuWidth+"\" border=\"0\" cellspacing=\"1\" cellpadding=\"1\" >";
    for (i=0;i<quantity;i++)
    {
    menuTags+="<tr><td bgcolor=\"#386CA4\" class=\"pmenu\"><a class=\"pmenu\" href=\"";
    menuTags+=eval("menu_"+numberMenu+"["+i+"].url");
    menuTags+="\" target=\"";
    menuTags+=eval("menu_"+numberMenu+"["+i+"].lTarget");
    menuTags+="\" onmouseover=\"menu(\'"+numberMenu+"\')\" onmouseout=\"CreateHide()\">";
    menuTags+=eval("menu_"+numberMenu+"["+i+"].title");
    menuTags+="<\/a><\/td><\/tr>\n";
    }
    menuTags+="<\/td><\/tr><\/table><\/td><\/tr><\/table>"+TagClose;
    return (menuTags);
    }
    
    ///////////////////////////////////////////////////////////////////////////////////////////////////
    function makeMenu(obj){
	n = (document.layers) ? 1:0;
	    this.css=(n) ? eval('document.'+obj):eval('document.all.'+obj+'.style')					
	        this.ref=(n) ? eval('document.'+obj+'.document'):eval('document');		
		    this.height=(n) ? this.ref.height:eval(obj+'.offsetHeight')
			this.x=(n)? this.css.left:this.css.pixelLeft;this.y=(n)? this.css.top:this.css.pixelTop;							
			    this.hideIt=b_hideIt;	this.showIt=b_showIt; this.vis=b_vis; this.moveIt=b_moveIt											
				return this
				}
				
				function b_showIt(){
				if (timer)
				{clearTimeout(timer)}
				this.css.visibility="visible";
				}
				
				function CreateHide()
				{
				timer=setTimeout("HideAll()",370);
				}
				
				function HideAll()
				{
				for(i=0;i<oTop.length;i++){
				oTop[i].hideIt();
				}
				}
				
				
				function menu(__onmenu){
				var centerPage;
				if (n) {centerPage = window.innerWidth/2;}
				else
				   {centerPage = document.body.clientWidth/2;}
				   if (__lonmenu!='no')
				   //{timer=setTimeout("oTop[__lonmenu].hideIt()",350);}
				   {oTop[__lonmenu].hideIt();}
				   for(i=0;i<oTop.length;i++){
				   if (centerPage>340){oTop[i].moveIt((centerPage - coord[i][0]),coord[i][1]);}
				   else {oTop[i].moveIt(badcoord[i],coord[i][1]);}
				   }
				   oTop[__onmenu].showIt();
				   __lonmenu = __onmenu;
				   
				   }
				   function b_hideIt(){this.css.visibility="hidden"}
				   function b_vis(){if(this.css.visibility=="hidden" || this.css.visibility=="hide") return true;}
				   function b_moveIt(x,y){this.x=x; this.y=y; this.css.left=this.x; this.css.top=this.y}
				   
				   
				   function init(){
				    oTop=new Array()
					oTop[0]=new makeMenu('menufirst')
					    oTop[1]=new makeMenu('menusecond')
						oTop[2]=new makeMenu('menuthird')
						    oTop[3]=new makeMenu('menufourth')
						    
						    }
						    //function wjava(){
						    //er="<Script language=\"JavaScript\" src=\"http:\/\/www.unasoft.com.ua\/top10.php\"></SCRIPT>";
						    //return er;
						    //}
						    
