function submitForm(){
         var name, address, telefon, re, ree, dataRight=true, message, real;
         re=/([0-9a-zA-Z\.-_]+)@([0-9a-zA-Z\.-_]+)/;

	upr=true;

         real=document.order.realname.value;
         tel=document.order.phone.value;
         mail=document.order.email.value;

if (real.length == 0)
{
            dataRight = false;
            message="Представьтесь, пожалуйста. (Заполните поле - Контактное лицо)";
}
else
{

	if (mail.match(re) == null) {
		message="Неверный или отсутствующий адрес e-mail";
		dataRight = false; }
	
	if(!dataRight)
	{
		if(tel.length == 0)
		{
			if (mail.length == 0 ) {message="Заполните поле [телефон] или [e-mail]";}
		} else
		{
			dataRight = true;
		}
	}

}

            
         if (dataRight == false) 
	{    
	upr=false;
	window.alert(message);
	} 

}


