var adresses;
function floats(name)
{
for(var i=0;i<=100;i++)
{
var obj = document.getElementById(name+"_"+i);
if (obj){obj.className='c3';}else{break}
}
}
function unfloats(name)
{
for(var i=0;i<=100;i++)
{
var obj = document.getElementById(name+"_"+i);
if (obj){obj.className='c2';}else{break}
}
}
function showIt(name)
{
 	var obj = getElement("infoBlock");
	obj.innerHTML = name;
 	var obj = getElement("infoBlock1");
	if (obj){
	obj.innerHTML = name;
	}
}
function getElement(name)
{
	if (document.all)
		{
			return document.all[name];
		}
	else	{
			return document.getElementById(name);
		}
}

function checkrequest()
{
	var m = document.forms.request;
	if (m.last_name.value == "" || m.first_name.value == "" || m.mio_name.value == ""|| m.phone.value == "")
	{
			alert("Вы заполнили не все обязательные поля.");
			return false;
	}
			return true;
}

function checkrequest_eng()
{
	var m = document.forms.request;
	if (m.last_name.value == "" || m.first_name.value == "" || m.mio_name.value == ""|| m.phone.value == "")
	{
			alert("You have not filled all obligatory fields.");
			return false;
	}
			return true;
}

function showMe(name,x,y)
{
if (adresses){adresses.close()}
adresses = window.open("","AAAA", "height="+y+",width="+x+",top=100,left=300,scrollbars=no,directories=no,dependent=yes,hotkeys=no,menubar=no,personalbar=no,toolbar=no,status=no","replace");
var k = adresses.document;
k.open("text/html","replace");
k.write("<html><body bgcolor=white topmargin=0 leftmargin=0 marginwidth=0 marginheight=0 onload=\"document.getElementById('hide').style.display='none'\"><style>html,body{color:white;height:100%;margin:0px;padding:0px;font-family: Tahoma;font-size:10px;}td{padding:0px;font-size:11px;overflow:hidden;}img{margin:0px;padding:0px;}</style><table width=100% height=100% cellspacing=0 cellpadding=0><tr><td align=center><a href='javascript:window.close();'><img border=0 vspace=0 hspace=0 align=center src=\""+name+"\"></a></td></tr></table><div id=hide style=\"position:absolute;top:0px;left:0px;width:100%;height:100%background-color:#430000;text-align:center;\"><div style=\"position:relative;top:expression(document.body.clientHeight/2);left:0px;color:white;width:200px;\">Загрузка, подождите пожалуйста...</div></div></html>");
k.close();
adresses.focus();
}

window.onerror = function(){return false;}

function popups (x,y,name)
{
var adresses = window.open("","AAAA", "height="+y+",width="+x+",top=100,left=300,scrollbars=no,directories=no,dependent=yes,hotkeys=no,menubar=no,personalbar=no,toolbar=no,status=yes","replace");
var k = adresses.document;
k.open("text/html","replace");
k.write("<body bgcolor=white topmargin=0 leftmargin=0 marginwidth=0 marginheight=0><style>html,body{color:#4F0000;height:100%;margin:0px;padding:0px;font-family: Tahoma;font-size:10px;}td{padding:0px;font-size:11px;}input {font-size:10px;background-color:white;border:1px dotted black;}img{margin:0px;padding:0px;}</style>");
k.write("<table width=100% height=100%><tr><td align=center><a href='javascript:window.close();'><img border=0 vspace=0 hspace=0 align=center src='"+name+"'></a></td></tr></table>");
k.close();
return false;
}
