// JavaScript Document

function clearText(thefield){
	if (thefield.defaultValue==thefield.value)
		thefield.value = ""
}

//validador de formulario/////////////////////////////////////////////////////////////////////////
<!--
function validamelo(){
	var theForm = document.form1;
	var emailRE = /^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})+$/;
	var telefonoNN = /^([0-9]{9})+$/;
	var errMsg = "";
	var setfocus = "";
	
	if (theForm['$comentarios'].value == ""){
		errMsg = "Inserte sus comentarios";
		setfocus = "['$comentarios']";
	}
	if (!emailRE.test(theForm['$correo'].value)){
		errMsg = "Inserte su direccion de correo electronico";
		setfocus = "['$correo']";
	}
	if (!telefonoNN.test(theForm['$telefono'].value)){
		errMsg = "Inserte su telefono";
		setfocus = "['$telefono']";
	}
	if (theForm['$empresa'].value == ""){
		errMsg = "Inserte el nombre de la empresa";
		setfocus = "['$empresa']";
	}
	if (theForm['$nombre'].value == ""){
		errMsg = "Inserte su nombre y apellidos";
		setfocus = "['$nombre']";
	}
	
	if (errMsg != ""){
		alert(errMsg);
		eval("theForm" + setfocus + ".focus()");
	}
	//else theForm.action = "sendForm/sendForm.php";
	
	else theForm.submit();
	
	//alert("ppppppppppppppppppppfdsfpdsfpsfpsdfpdpsddpfkpsd"); 
	
	
}


function validamelo_eng(){
	var theForm = document.form1;
	var emailRE = /^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})+$/;
	var telefonoNN = /^([0-9]{9})+$/;
	var errMsg = "";
	var setfocus = "";
	
	if (theForm['$comentarios'].value == ""){
		errMsg = "Insert your comments";
		setfocus = "['$comentarios']";
	}
	if (!emailRE.test(theForm['$correo'].value)){
		errMsg = "Insert your e-mail";
		setfocus = "['$correo']";
	}
	if (!telefonoNN.test(theForm['$telefono'].value)){
		errMsg = "Insert your phone number";
		setfocus = "['$telefono']";
	}
	if (theForm['$empresa'].value == ""){
		errMsg = "Insert your company name";
		setfocus = "['$empresa']";
	}
	if (theForm['$nombre'].value == ""){
		errMsg = "Insert your name and surname";
		setfocus = "['$nombre']";
	}
	
	
	if (errMsg != ""){
		alert(errMsg);
		eval("theForm" + setfocus + ".focus()");
	}
	//else theForm.action = "sendForm/sendForm.php";
	
	else theForm.submit();
	
	//alert("ppppppppppppppppppppfdsfpdsfpsfpsdfpdpsddpfkpsd"); 
	
	
}

function validamelo_pol(){
	var theForm = document.form1;
	var emailRE = /^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})+$/;
	var telefonoNN = /^([0-9]{9})+$/;
	var errMsg = "";
	var setfocus = "";
	
	if (theForm['$comentarios'].value == ""){
		errMsg = "Wstaw temat";
		setfocus = "['$comentarios']";
	}
	if (!emailRE.test(theForm['$correo'].value)){
		errMsg = "Wstaw adres e-mail";
		setfocus = "['$correo']";
	}
	if (!telefonoNN.test(theForm['$telefono'].value)){
		errMsg = "Wstaw numer telefonu";
		setfocus = "['$telefono']";
	}
	if (theForm['$empresa'].value == ""){
		errMsg = "Wstaw nazwe firmy";
		setfocus = "['$empresa']";
	}
	if (theForm['$nombre'].value == ""){
		errMsg = "Wstaw imie i nazwisko";
		setfocus = "['$nombre']";
	}
	
	
	if (errMsg != ""){
		alert(errMsg);
		eval("theForm" + setfocus + ".focus()");
	}
	//else theForm.action = "sendForm/sendForm.php";
	
	else theForm.submit();
	
	//alert("ppppppppppppppppppppfdsfpdsfpsfpsdfpdpsddpfkpsd"); 
	
	
}





