//rollover
function on(xx,yy)
{
document.all[xx].src="img/"+yy+"_1.gif";
}
function off(xx,yy)
{
document.all[xx].src="img/"+yy+"_0.gif";
}

//menurollover
function on1(xx,yy)
{
document.all[xx].src="img/menuitem_"+yy+"_1.gif";
}
function off1(xx,yy)
{
document.all[xx].src="img/menuitem_"+yy+"_0.gif";
}

function on2(xx,yy)
{
document.all[xx].className=yy;
}
function off2(xx,yy)
{
document.all[xx].className=yy;
}

//dropright menu
var occupied_header = new Array();
var occupied_menu = new Array();
for(i=1;i<=7;i++) 
{
occupied_header[i] = 0;
occupied_menu[i] = 0; 
}
function CreateLayer(text, id, t, l) 
{
  if(document.layers)
{
  var str="<LAYER ID=smenu" + id + " TOP=" + t + " LEFT=" + l + " onmouseover=\"occupied_menu[" + id + "]=1;\" onmouseout=\"Turn('" + id + "',0);occupied_menu[" + id + "]=0;\" VISIBILITY=hide>" + text + "</LAYER>";
  document.write(str);
}
else if(document.all)
{
  var strng="<div id=smenu" + id + " style=\"position:absolute;top:" + t + ";left:" + l + ";visibility:hidden;width:100;filter:alpha(opacity=80);z-index:50;\" onmouseover=\"occupied_menu[" + id + "]=1;\" onmouseout=\"Turn('" + id + "',0);occupied_menu[" + id + "]=0;\">" + text + "</div>";
  document.write(strng);
}
}
 
function Turn(id, mode) {
if(document.layers || document.all) {
if(mode)
eval("setTimeout(\"On(" + id + ", " + mode + ");\",50)");
else {
eval("setTimeout(\"Off(" + id + ", " + mode + ");\",50)");
}
}
}

function On(id, mode)
{
if(occupied_header[id])
if(document.all)
eval("smenu" + id).style.visibility = 'visible';
else if(document.layers)
eval("document.layers['smenu" + id + "']").visibility = "show";
}
 
function Off(id, mode)
{
if(!occupied_menu[id] && !occupied_header[id])
if(document.all)
eval("smenu" + id).style.visibility = 'hidden';
else if(document.layers)
eval("document.layers['smenu" + id + "']").visibility = "hide";
}

txt = new Array();

txt[2] ="<table width=190border=0 cellspacing=0 cellpadding=0>"+
"<tr>"+
"<td width=16 height=70  valign=top>"+
"<table width=16 height=100% cellpadding=0 cellspacing=0 border=0>"+
"<tr>"+
"<td width=16 height=24><img src=img/dmenuimg01.gif width=16 height=24></td>"+
"</tr>"+
"<tr>"+
"<td background=img/dmenubg01.gif style=\"background-position:right; background-repeat:repeat-y\">&nbsp;</td>"+
"</tr>"+
"<tr>"+
"<td width=16 height=6 align=right valign=bottom><img src=img/dmenuc01.gif width=3 height=6></td>"+
"</tr>"+
"</table></td>"+
"<td width=172 valign=top>"+
"<table width=100% cellpadding=0 cellspacing=0 border=0>"+
"<tr>"+
"<td width=172 height=3><img src=img/dmenubg04.gif width=172 height=3></td>"+
"</tr>"+
"<tr>"+
"<td width=172 height=21 background=img/dmenuoff1.gif valign=middle align=left style=\"padding-left:10\" id=dmenu05 onmouseover=\"on2('dmenu05','dmenuon1');return true\" onmouseout=\"off2('dmenu05','dmenuoff1');return true\" onclick=\"document.location='asp_main.shtml'; return true\"><b class=swhite>- <a href=asp_main.shtml class=menulink title=\"Общая информация\">Общая информация</a></b></td>"+
"</tr>"+
"<tr>"+
"<td width=172 height=21 background=img/dmenuoff2.gif valign=middle align=left style=\"padding-left:10\" id=dmenu06 onmouseover=\"on2('dmenu06','dmenuon2');return true\" onmouseout=\"off2('dmenu06','dmenuoff2');return true\" onclick=\"document.location='asp_params.shtml'; return true\"><b class=swhite>- <a href=asp_params.shtml class=menulink title=\"Тех. характеристики\">Тех. характеристики</a></b></td>"+
"</tr>"+
"<tr>"+
"<td width=172 height=22 background=img/dmenuoff3.gif valign=middle align=left style=\"padding-left:10\" id=dmenu07 onmouseover=\"on2('dmenu07','dmenuon3');return true\" onmouseout=\"off2('dmenu07','dmenuoff3');return true\" onclick=\"document.location='asp_usedregion.shtml'; return true\"><b class=swhite>- <a href=asp_usedregion.shtml class=menulink title=\"Область применения\">Область применения</a></b></td>"+
"</tr>"+
"<tr>"+
"<td width=172 height=3><img src=img/dmenubg02.gif width=172 height=3></td>"+
"</tr>"+
"</table>"+
"</td>"+
"<td width=3 valign=top>"+
"<table width=3 height=100% cellpadding=0 cellspacing=0 border=0>"+
"<tr>"+
"<td width=3 height=18 valign=top><img src=img/dmenuc02.gif width=3 height=18></td>"+
"</tr>"+
"<tr>"+
"<td background=img/dmenubg03.gif><img src=img/dmenubg03.gif width=3></td>"+
"</tr>"+
"<tr>"+
"<td width=3 height=5 valign=bottom><img src=img/dmenuc03.gif width=3 height=5></td>"+
"</tr>"+
"</table>"+
"</td>"+
"</tr></table>";





txt[3] ="<table width=190 border=0 cellspacing=0 cellpadding=0>"+
"<tr>"+
"<td width=16 height=49 valign=top>"+
"<table width=16 height=100% cellpadding=0 cellspacing=0 border=0>"+
"<tr>"+
"<td width=16 height=24><img src=img/dmenuimg01.gif width=16 height=24></td>"+
"</tr>"+
"<tr>"+
"<td background=img/dmenubg01.gif style=\"background-position:right; background-repeat:repeat-y\">&nbsp;</td>"+
"</tr>"+
"<tr>"+
"<td width=16 height=6 align=right valign=bottom><img src=img/dmenuc01.gif width=3 height=6></td>"+
"</tr>"+
"</table></td>"+
"<td width=172 valign=top>"+
"<table width=100% cellpadding=0 cellspacing=0 border=0>"+
"<tr>"+
"<td width=172 height=3><img src=img/dmenubg04.gif width=172 height=3></td>"+
"</tr>"+
"<tr>"+
"<td width=172 height=21 background=img/dmenuoff1.gif valign=middle align=left style=\"padding-left:10\" id=dmenu08 onmouseover=\"on2('dmenu08','dmenuon1');return true\" onmouseout=\"off2('dmenu08','dmenuoff1');return true\" onclick=\"document.location='ATL2U.shtml'; return true\"><b class=swhite><a href=ATL2U.shtml class=menulink title=\"АТЛ-2У\">АТЛ-2У</a></b></td>"+
"</tr>"+
"<tr>"+
"<td width=172 height=22 background=img/dmenuoff3.gif valign=middle align=left style=\"padding-left:10\" id=dmenu09 onmouseover=\"on2('dmenu09','dmenuon3');return true\" onmouseout=\"off2('dmenu09','dmenuoff3');return true\" onclick=\"document.location='ATL4U.shtml'; return true\"><b class=swhite><a href=ATL4U.shtml class=menulink title=\"АТЛ-4У\">АТЛ-4У</a></b></td>"+
"</tr>"+
"<tr>"+
"<td width=172 height=3><img src=img/dmenubg02.gif width=172 height=3></td>"+
"</tr>"+
"</table>"+
"</td>"+
"<td width=3 valign=top>"+
"<table width=3 height=100% cellpadding=0 cellspacing=0 border=0>"+
"<tr>"+
"<td width=3 height=18 valign=top><img src=img/dmenuc02.gif width=3 height=18></td>"+
"</tr>"+
"<tr>"+
"<td background=img/dmenubg03.gif><img src=img/dmenubg03.gif width=3></td>"+
"</tr>"+
"<tr>"+
"<td width=3 height=5 valign=bottom><img src=img/dmenuc03.gif width=3 height=5></td>"+
"</tr>"+
"</table>"+
"</td>"+
"</tr></table>";

txt[4] ="<table width=190border=0 cellspacing=0 cellpadding=0>"+
"<tr>"+
"<td width=16 height=91  valign=top>"+
"<table width=16 height=100% cellpadding=0 cellspacing=0 border=0>"+
"<tr>"+
"<td width=16 height=24><img src=img/dmenuimg01.gif width=16 height=24></td>"+
"</tr>"+
"<tr>"+
"<td background=img/dmenubg01.gif style=\"background-position:right; background-repeat:repeat-y\">&nbsp;</td>"+
"</tr>"+
"<tr>"+
"<td width=16 height=6 align=right valign=bottom><img src=img/dmenuc01.gif width=3 height=6></td>"+
"</tr>"+
"</table></td>"+
"<td width=172 valign=top>"+
"<table width=100% cellpadding=0 cellspacing=0 border=0>"+
"<tr>"+
"<td width=172 height=3><img src=img/dmenubg04.gif width=172 height=3></td>"+
"</tr>"+
"<tr>"+
"<td width=172 height=21 background=img/dmenuoff1.gif valign=middle align=left style=\"padding-left:10\" id=dmenu01 onmouseover=\"on2('dmenu01','dmenuon1');return true\" onmouseout=\"off2('dmenu01','dmenuoff1');return true\" onclick=\"document.location='asp_workmode.shtml'; return true\"><b class=swhite>- <a href=asp_workmode.shtml class=menulink title=\"Режимы работы\">Режимы работы</a></b></td>"+
"</tr>"+
"<tr>"+
"<td width=172 height=21 background=img/dmenuoff2.gif valign=middle align=left style=\"padding-left:10\" id=dmenu02 onmouseover=\"on2('dmenu02','dmenuon2');return true\" onmouseout=\"off2('dmenu02','dmenuoff2');return true\" onclick=\"document.location='asp_functions.shtml'; return true\"><b class=swhite>- <a href=asp_functions.shtml class=menulink title=\"Функции\">Функции</b></a></td>"+
"</tr>"+
"<tr>"+
"<td width=172 height=21 background=img/dmenuoff2.gif valign=middle align=left style=\"padding-left:10\" id=dmenu03 onmouseover=\"on2('dmenu03','dmenuon2');return true\" onmouseout=\"off2('dmenu03','dmenuoff2');return true\" onclick=\"document.location='asp_interface1.shtml'; return true\"><b class=swhite>- <a href=asp_interface1.shtml class=menulink title=\"Интерфейс\">Интерфейс</a></b></td>"+
"</tr>"+
"<tr>"+
"<td width=172 height=22 background=img/dmenuoff3.gif valign=middle align=left style=\"padding-left:10\" id=dmenu04 onmouseover=\"on2('dmenu04','dmenuon3');return true\" onmouseout=\"off2('dmenu04','dmenuoff3');return true\" onclick=\"document.location='asp_nastr1.shtml'; return true\"><b class=swhite>- <a href=asp_nastr1.shtml class=menulink title=\"Настройки\">Настройки</a></b></td>"+
"</tr>"+
"<tr>"+
"<td width=172 height=3><img src=img/dmenubg02.gif width=172 height=3></td>"+
"</tr>"+
"</table>"+
"</td>"+
"<td width=3 valign=top>"+
"<table width=3 height=100% cellpadding=0 cellspacing=0 border=0>"+
"<tr>"+
"<td width=3 height=18 valign=top><img src=img/dmenuc02.gif width=3 height=18></td>"+
"</tr>"+
"<tr>"+
"<td background=img/dmenubg03.gif><img src=img/dmenubg03.gif width=3></td>"+
"</tr>"+
"<tr>"+
"<td width=3 height=5 valign=bottom><img src=img/dmenuc03.gif width=3 height=5></td>"+
"</tr>"+
"</table>"+
"</td>"+
"</tr></table>";

CreateLayer(txt[2], 2, 231, 179);
CreateLayer(txt[3], 3, 261, 179);
CreateLayer(txt[4], 4, 291, 179);


//form content check

function checkform()
{

	var errcode = 0;
	
	if (document.all['zkolvo'].value==null || document.all['zkolvo'].value==0)
	{

	 errcode=2;
	
	}
	
	if (document.all['zfio'].value==null || document.all['zfio'].value==0)
	{

	  errcode = errcode+3;
	}
	
	if (document.all['zmail'].value==null || document.all["zmail"].value==0)
	{
	
	  errcode = errcode+4;
	}
	
   



 if (errcode==2)
	{
		document.all['zkolvotxt'].className='redd';
		alert ("Количество каналов записи не указано!");
    }
 if (errcode==3)
	{
		document.all['zfiotxt'].className='redd';
		alert ("Ф.И.О. получателя не указано!");
    }

 if (errcode==4)
	{
		document.all['zmailtxt'].className='redd';
		alert ("E-mail получателя не указан!");
    }


	 if (errcode==5)
	{
		document.all['zfiotxt'].className='redd';
		document.all['zkolvotxt'].className='redd';
		alert ("Количество каналов записи, Ф.И.О. получателя не указаны!");
    }

	 if (errcode==6)
	{
		document.all['zmailtxt'].className='redd';
		document.all['zkolvotxt'].className='redd';
		alert ("Количество каналов записи и E-mail получателя не указаны!");
    }

	 if (errcode==7)
	{
		document.all['zmailtxt'].className='redd';
		document.all['zfiotxt'].className='redd';
		alert ("Ф.И.О. и E-mail получателя не указаны!");
    }

    if (errcode==9)
	{
		document.all['zmailtxt'].className='redd';
		document.all['zfiotxt'].className='redd';
		document.all['zkolvotxt'].className='redd';
		alert ("Количество каналов записи, Ф.И.О. и E-mail получателя не указаны !");
    }

if (errcode > 1)
{
return false;
}
else 
zakaz.submit();

}

// form 2 content check
function checkqform()
{

	var errcode = 0;
	
	if (document.all['qname'].value==null || document.all['qname'].value==0)
	{

	 errcode=2;
	
	}
	
	if (document.all['qmail'].value==null || document.all['qmail'].value==0)
	{

	  errcode = errcode+3;
	}
	
	if (document.all['qmess'].value==null || document.all["qmess"].value==0)
	{

	  errcode = errcode+4;
	}
	
   



 if (errcode==2)
	{
		document.all['qnametxt'].className='redd';
		alert ("Имя не указано!");
    }
 if (errcode==3)
	{
		document.all['qmailtxt'].className='redd';
		alert ("E-Mail не указан!");
    }

 if (errcode==4)
	{
		document.all['qmesstxt'].className='redd';
		alert ("Сообщение пустое!");
    }


	 if (errcode==5)
	{
		document.all['qnametxt'].className='redd';
		document.all['qmailtxt'].className='redd';
		alert ("Имя и E-Mail не указаны!");
    }

	 if (errcode==6)
	{
		document.all['qnametxt'].className='redd';
		document.all['qmesstxt'].className='redd';
		alert ("Имя не указано, сообщение пустое!");
    }

	 if (errcode==7)
	{
		document.all['qmailtxt'].className='redd';
		document.all['qmesstxt'].className='redd';
		alert ("E-mail не указан, сообщение пустое!");
    }

    if (errcode==9)
	{
		document.all['qnametxt'].className='redd';
		document.all['qmailtxt'].className='redd';
		document.all['qmesstxt'].className='redd';
		alert ("Имя и E-Mail не указаны, сообщение пустое!");
    }

if (errcode > 1)
{
return false;
}
else 
ask.submit();
}