function validateForm(form)
	{
		
		for(i=0; i<document.all.length; i++)
		{
        	if(document.all[i].className == "required" && document.all[i].value == "")
			{
                alert("Вы не заполнили одно или более обязательных полей формы.");
				document.all[i].focus();
     			return false;
       		}
	   }

		if (document.getElementById('email'))
		{
			elem=document.getElementById('email');
			var mt = String(elem.value).match(/\w+([-\+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/);
			if (mt)
			{
				elem.value = mt[0];
			}
			else
			{
				alert ("Неверный формат поля 'Почта'\n");
				elem.focus();
				return false;
			}
		}

		if (document.getElementById('password'))
		{
			if (document.getElementById('s_password').value!=document.getElementById('s_cpassword').value)
			{
				alert ('Поля "Пароль" и "Подтверждение пароля" не совпадают');
				document.getElementById('s_password').focus();
				return false;
			}
		}
		return true;
	}
	
function show_img(img, img_width, img_height){
	window.open(img, 1,'scrollbars=no,resizable=no,status=no,toolbar=no,menubar=no,left=50,top=50, width='+img_width+', height='+img_height);
}	