img1=new Image();img1.src="/img/about.gif";
img1a=new Image();img1a.src="/img/about_a.gif";
img2=new Image();img2.src="/img/responses.gif";
img2a=new Image();img2a.src="/img/responses_a.gif";
img3=new Image();img3.src="/img/vacancy.gif";
img3a=new Image();img3a.src="/img/vacancy_a.gif";
img4=new Image();img4.src="/img/products.gif";
img4a=new Image();img4a.src="/img/products_a.gif";
img5=new Image();img5.src="/img/articles.gif";
img5a=new Image();img5a.src="/img/articles_a.gif";
img6=new Image();img6.src="/img/faq.gif";
img6a=new Image();img6a.src="/img/faq_a.gif";
img7=new Image();img7.src="/img/contacts.gif";
img7a=new Image();img7a.src="/img/contacts_a.gif";

function SetSize()
{
	if (navigator.appName == 'Opera') {clHeight=document.body.clientHeight;} else {clHeight=document.documentElement.clientHeight;}
	vl = document.getElementById('Vertical');
	vl.style.height = clHeight + 'px';
}
function hover(line,state)
{
if (state==1)
{
eval ('document.images["img'+line+'"].src=img'+line+'a.src');
} else
{
eval ('document.images["img'+line+'"].src=img'+line+'.src');
}
}

function ActiveField(line,state)
{
	field1 = document.getElementById('f1');
	field2 = document.getElementById('f2');
	field3 = document.getElementById('f3');
	field = document.getElementById('f'+line);
	if (state==1)
	{
		field.style.borderColor = '#7C8CA8';
	} else
		{
			field.style.borderColor = '#252A33';
		}
}

function ChangePrice(state)
{
	ps = document.getElementById('PriceSelector');
	p1 = document.getElementById('Price1');
	p2 = document.getElementById('Price2');
	if (state==1)
	{
		p1.style.display = 'block';
		p2.style.display = 'none';
		ps.innerHTML = '<strong>Öåíû íà òîâàðû</strong> / <a href="javascript: void(0);" onClick="ChangePrice(2);">öåíû íà óñëóãè</a>';
	} else
		{
		p1.style.display = 'none';
		p2.style.display = 'block';
		ps.innerHTML = '<strong>Öåíû íà óñëóãè</strong> / <a href="javascript: void(0);" onClick="ChangePrice(1);">öåíû íà òîâàðû</a>';
		}
}

function checkEmpty (val){
	if (val=="" || val.search(/[^\s]+/)==-1) {
		return false;
	}
	return true;
}

function RestoreColor()
	{
	document.MessageForm.name.style.background="#000000";	
	document.MessageForm.contacts.style.background="#000000";	
	document.MessageForm.content.style.background="#000000";	
	}

function SubmitMessage()
{
	sm=true;
	if (!checkEmpty(document.MessageForm.name.value)) 
		{
	document.MessageForm.name.style.background="#7C8CA8";
	sm=false;	
		}
	if (!checkEmpty(document.MessageForm.contacts.value)) 
		{
	document.MessageForm.contacts.style.background="#7C8CA8";
	sm=false;	
		}
	if (!checkEmpty(document.MessageForm.content.value)) 
		{
	document.MessageForm.content.style.background="#7C8CA8";
	sm=false;	
		}
	if (sm==true) {document.MessageForm.submit();}		
}