	function validate_custinfo() //validate customer information
	{
		if (document.custinfo_form.first_name.value == "" || document.custinfo_form.first_name.value.length<3)
		{
			alert("Введите поле Имя, фамилия (или название организации)");
			return false;
		}
		if (document.custinfo_form.country.value == "0")
		{
			alert("Выберете Страну");
			return false;
		}
		if (document.custinfo_form.city.value == "" || document.custinfo_form.first_name.value.length<3)
		{
			alert("Введите поле Город");
			return false;
		}
		if (document.custinfo_form.zip.value == "" || document.custinfo_form.first_name.value.length<3)
		{
			alert("Введите поле Почтовый индекс");
			return false;
		}
		if (document.custinfo_form.address.value == "" || document.custinfo_form.first_name.value.length<3)
		{
			alert("Введите поле Адрес доставки");
			return false;
		}
		if (document.custinfo_form.phone.value == "" || document.custinfo_form.first_name.value.length<3)
		{
			alert("Введите поле Телефон");
			return false;
		}
		return true;
	}


	function validate_contacts() //validate customer information
	{
		if (document.frmContact.name.value == "")
		{
			alert("Введите поле Имя, фамилия");
			return false;
		}
		if (document.frmContact.phone.value == "")
		{
			alert("Введите Телефон");
			return false;
		}
		if (document.frmContact.question.value == "")
		{
			alert("Введите Вопрос");
			return false;
		}
		return true;
	}
	
	
	
	function validate_work_form() 
	{
		if (document.frmContact.name.value == "")
		{
			alert("Введите название");
			return false;
		}
		if (document.frmContact.image.value == "")
		{
			alert("Необходимо загрузить файл");
			return false;
		}
		if (document.frmContact.op.checked == false)
		{
			alert("Необходимо согласиться с условиями");
			return false;
		}
		return true;
	}


function submitenter(myfield,e)
{
var keycode;
if (window.event) keycode = window.event.keyCode;
else if (e) keycode = e.which;
else return true;

if (keycode == 13)
   {
   myfield.form.submit();
   return false;
   }
else
   return true;
}

function removesearchtext(){
	document.getElementById('SearchField').value = '';
	document.getElementById('SearchField').focus();
}
function setsearchtext(){
if(!document.getElementById("SearchField").value){
		document.getElementById('SearchField').value = 'Поиск по ключевым словам...';
	}
}


