var ns = (navigator.appName == 'Netscape');
var ie = (navigator.appName == 'Microsoft Internet Explorer');
var ns4 = (ns && parseInt(navigator.appVersion) >= 4 && parseInt(navigator.appVersion)<5);
var ie4 = (ie && parseInt(navigator.appVersion) >= 4);
var ie5 = (ie4 && navigator.appVersion.indexOf("MSIE 5.")!=-1);
var ns5 = (ns && parseInt(navigator.appVersion) >= 5);
var oper = (window.opera != null);

if (ns4) window.onresize = rsz;

function rsz() {
document.location=document.location;
}

function open_win(url,option) {
	window.open(url,"",option);
}

var timer=0,active="";


items1 = new Array (
"Вывески","viveski.htm",
"Объемные буквы","bukvi.htm",
"Информационные стенды","stend.htm",
"Гравировка","graver.htm",
"Таблички","tabl.htm",
"Оформление выставок","vist.htm",
"Реклама на автомобилях","auto.htm",
"Оформление витрин","vitrina.htm",
"Штендеры","shtenders.htm",
"Плоттерная резка","rezka.htm",
"Свето-динамическое оформление","sdo.htm",
"Широкоформатная печать","pechat.htm",
"Оформление АЗС","azs.htm",
"Производство","proizvodstvo.htm");


items2 = new Array (
"Адрес / Схема проезда","adres.htm");


items3 = new Array (
"О компании","index.htm",
"Вакансии","vakansii.htm",
"Наши клиенты","klient.htm",
"Вопрос - ответ","faq.htm");


items4 = new Array (
"Важные новости","news.htm",
"Информация для клиентов","index.htm");




function CreateMenu(x,y,p)
{
var s,lt,lyr,w=199,c;
s="";
var items = eval("items"+p)
if (ns4) {lt="LAYER";} else {lt="DIV";}
lyr="menu"+p;
if (ns4) { s+='<'+lt+' id='+lyr+' z-index='+p+' left='+x+' top='+y+' width='+w+' visibility=hide onmouseover="UpShow(\''+lyr+'\')" onmouseout="UpClose(\''+lyr+'\')">';}
else { s+='<'+lt+' id='+lyr+' style="VISIBILITY: hidden; Z-INDEX: '+p+'; POSITION: absolute; LEFT: '+x+'px; TOP: '+y+'px; WIDTH: '+w+'px;" onmouseover="UpShow(\''+lyr+'\');" onmouseout="UpClose(\''+lyr+'\');">';}
s+="<table border=0 cellspacing=0 cellpadding=0 bgcolor=#ffffff>";
s+="<tr><td colspan=3 bgcolor=#000000><img src='image/spacer.gif' width="+w+" height=1></td></tr>";
s+="<tr><td bgcolor=#000000><img src='image/spacer.gif' width=1 height=1></td><td><img src='image/spacer.gif' width="+(w-2)+" height=3><br>";
c=Math.floor(items.length/2);
for (var i=0;i<c;i++) {
s+="&nbsp; <a href="+items[i*2+1]+" class='panellink'>&#149; "+items[i*2]+"</a><br>";
//s+="<img src='images/spacer.gif' width=1 height=2><br>";
}
s+="<img src='images/spacer.gif' width=1 height=6></td><td bgcolor=#000000><img src='image/spacer.gif' width=1 height=1></td></tr>";
s+="<tr><td colspan=3 bgcolor=#000000><img src='image/spacer.gif' width="+w+" height=1></td></tr>";
s+='</table>';
s+='</'+lt+'>\n';
document.write(s);
}


function LShow(ly){
	if (ie4){ document.all[ly].style.visibility='visible';
	} else if(ns4){ document.layers[ly].visibility='show';
	document.banner.clip.height = 0;
	} else if(oper || ns5) { document.getElementById(ly).style.visibility='visible';}
}

function UpShow(ly){
	if (timer) clearTimeout(timer);
	if (active) LHide(active);
	active=ly;
	LShow(ly);
}

function UpClose(ly){
	if (timer) clearTimeout(timer);
	timer = setTimeout("LHide('"+ly+"');",250); 
}

function LHide(ly){
	if(ie4){ document.all[ly].style.visibility='hidden';
	} else if(ns4){ document.layers[ly].visibility='hide';
	document.banner.clip.height = 120;
	} else if(oper|| ns5){ document.getElementById(ly).style.visibility='hidden';}
}

function gourl(url)
{
var n_url,p,pos=url.indexOf("*");
	if (pos<0) {document.location=url;}
	else { 
		n_url=url.substring(0,pos);
		p=url.substring(pos+1);
//		alert(n_url+","+p);
		open_win(n_url,p);
	}
}

CreateMenu(329,125,1);
CreateMenu(529,125,2);
CreateMenu(129,125,3);
CreateMenu(229,125,4);
