function sendform()
{
	//window.setTimeout("alert(document.getElementById('ajax').contentWindow.document.body.innerHTML)",1000);
	var saname = document.getElementById("ptu-form").saname.value;
	var saphone = document.getElementById("ptu-form").saphone.value;
	//var sacode = document.getElementById("ptu-form").sacode.value;
	var sames = document.getElementById("ptu-form").sames.value;
	if (saname.length == 0 || saphone.length == 0 || sames.length == 0 || sames=="Сообщение" || saphone=="Ваш e-mail или телефон" || saname=="Ваше имя"){					//если заполнены не все поля,
		alert('Заполните все поля!');																			//алертим,
		return;																									//выходим
	}
	document.getElementById("ajax").contentWindow.document.forms.ajaxform.saname.value = saname;
	document.getElementById("ajax").contentWindow.document.forms.ajaxform.saphone.value = saphone;
	//document.getElementById("ajax").contentWindow.document.forms.ajaxform.sacode.value = sacode;
	document.getElementById("ajax").contentWindow.document.forms.ajaxform.sames.value = sames;
		
	document.getElementById("ajax").contentWindow.document.forms.ajaxform.submit();
	
}//function sendform()

function returnform()
{
	var aid = Number(document.getElementById("ajax").contentWindow.document.forms.ajaxres.ajaxres.value);
	if (aid == 1)
	{
	
		document.getElementById("ptu-form").saname.value = 	"Ваше имя";
		document.getElementById("ptu-form").saphone.value = "Ваш e-mail или телефон";
		//document.getElementById("ptu-form").sacode.value = 	"";
		document.getElementById("ptu-form").sames.value = 	"Сообщение";
	
		//var sas = Number(new Date);
		
		//document.getElementById("ajfl").src = "/flood/index.php?" + sas;
	
		alert ("Ваше сообщение отправлено");
	
	}
	else {
		
		if (aid == 2)
		{		
			//document.getElementById("ptu-form").sacode.value = 	"";
		
			//var sas = Number(new Date);
		
			//document.getElementById("ajfl").src = "/flood/index.php?" + sas;
		
			alert ("Неверный защитный код");		
		}	
	}
}//function returnform()
