function validateuser() {


if (document.profile.login.value.length<1) {
		alert("Пожалуйста, введите Ваш логин!");
        document.profile.login.focus();
		return false;
	};        

if (document.profile.password.value.length<1) {
		alert("Пожалуйста, введите Ваш пароль!");
        document.profile.password.focus();
		return false;
	};
      
if (document.profile.confirmpassword.value.length<1) {
		alert("Пожалуйста, введите подтверждение Вашего пароля!");
        document.profile.confirmpassword.focus();
		return false;
	};

if (document.profile.password.value!=document.profile.confirmpassword.value) {
		alert("Пароль и подтверждение пароля не сопадают!");
        document.profile.password.focus();
		return false;
	};

if (document.profile.name.value.length<1) {
		alert("Пожалуйста, введите Ваше Ф.И.О.!");
        document.profile.name.focus();
		return false;
	};
if (document.profile.phone.value.length<1) {
		alert("Пожалуйста, введите номер Вашего телефона!");
        document.profile.email.focus();
		return false;
	};
if (document.profile.email.value.length<1) {
		alert("Пожалуйста, введите Ваш e-Mail адрес!");
        document.profile.email.focus();
		return false;
	};
if(!document.profile.email.value.match(/^[\w]{1}[\w\.\-_]*@[\w]{1}[\w\-_\.]*\.[\w]{2,4}$/i)){ 
        alert("Некоректный e-Mail адрес, проверьте, пожалуйста!");
        document.profile.email.focus();
		return false;
        }; 

if (document.profile.address.value.length<1) {
	alert("Пожалуйста, введите адрес доставки!");
        document.profile.address.focus();
		return false;
	};
return true;
} 



function validateuser_reg() {


if (document.registration_form.name.value.length<1) {
		alert("Пожалуйста, введите Ваше имя!");
        document.registration_form.name.focus();
		return false;
	};

if (document.registration_form.phone.value.length<1) {
		alert("Пожалуйста, введите номер Вашего контактного телефона!");
        document.registration_form.name.focus();
		return false;
	};        
     
if (document.registration_form.email.value.length<1) {
		alert("Пожалуйста, введите Ваш e-Mail адрес!");
        document.registration_form.focus();
		return false;
	};
        
if(!document.registration_form.email.value.match(/^[\w]{1}[\w\.\-_]*@[\w]{1}[\w\-_\.]*\.[\w]{2,4}$/i)){ 
        alert("Некоректный e-Mail адрес, проверьте, пожалуйста!");
        document.registration_form.email.select();
		return false;

}; 


if (document.registration_form.address.value.length<1) {
		alert("Пожалуйста, введите Ваш адрес!");
        document.registration_form.address.focus();
		return false;
	};
      
return true;
} 
