function est(d){
	document.getElementById(d).style.visibility="visible";
	}
function net(d){
	document.getElementById(d).style.visibility="hidden";
	}
function show (objstr,nest){
	curObj = objstr;
	curNest = (nest) ? nest : null;
	getStyle(objstr,nest).visibility = "visible";
	active = true;
}
function hide (){
	getStyle(curObj,curNest).visibility = "hidden";
	active = false;
}
function isValidEmail (email)
{
 return (/^([a-z0-9_\-]+\.)*[a-z0-9_\-]+@([a-z0-9][a-z0-9\-]*[a-z0-9]\.)+[a-z]{2,4}$/i).test(email);
}
function checkform()
{
	//alert(document.forms['fo'].name.value);
	var err='';
	if(document.forms['fo'].name.value=="")
	{
		err+='Не заполнено поле имя.';
	}
	if(document.forms['fo'].email.value=="")
	{
		err+=' Не заполнен e-mail отправителя.';
	}else if(!isValidEmail (document.forms['fo'].email.value))
	{
		err+=' Не верный e-mail отправителя.';
	}
	if(document.forms['fo'].theme.value=="")
	{
		err+=' Не указана тема соощения.';
	}
	if(document.forms['fo'].text.value=="")
	{
		err+=' Отсутствует текст сообщения.';
	}
	if(err!='')
	{
		alert(err);
	}else
	{
		document.forms['fo'].submit();
	}
}

