<!--
function IsNumeric(Texto, Max){
   var ValidChars = "0123456789";
   var IsNumber=true;
   var Char;
 
	for (i = 0; i < Texto.length && IsNumber == true; i++){ 
		Char = Texto.charAt(i); 
		if(i>Max){
			IsNumber = false;
			alert("MAX");
		}
		if (ValidChars.indexOf(Char) == -1){
			IsNumber = false;
		}
	}
	return IsNumber;
   
}

function emailCheck(Email) {
	var emailPat=/^(.+)@(.+)$/
	var specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]"
	var validChars="\[^\\s" + specialChars + "\]"
	var quotedUser="(\"[^\"]*\")"
	var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/
	var atom=validChars + '+'
	var word="(" + atom + "|" + quotedUser + ")"
	var userPat=new RegExp("^" + word + "(\\." + word + ")*$")
	var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$")
	var matchArray=Email.match(emailPat)
	if (matchArray==null) {
		alert("Ingresar email valido ")
		return false
	}
	var user=matchArray[1]
	var domain=matchArray[2]
	if (user.match(userPat)==null) {
		alert("El usuario no parece ser válido")
		return false
	}
	var IPArray=domain.match(ipDomainPat)
	if (IPArray!=null) {
		  for (var i=1;i<=4;i++) {
			if (IPArray[i]>255) {
				alert("Ip invalida")
			return false
			}
		}
		return true
	}
	var domainArray=domain.match(domainPat)
	if (domainArray==null) {
		alert("El dominio no parece ser válido")
		return false
	}
	var atomPat=new RegExp(atom,"g")
	var domArr=domain.match(atomPat)
	var len=domArr.length
	if (domArr[domArr.length-1].length<2 || domArr[domArr.length-1].length>3) {
	   alert("La direccion debe tener un dominio válido")
	   return false
	}
	if (len<2) {
	   var errStr="Hostname incompleto"
	   alert(errStr)
	   return false
	}
	return true;
}

function ResetColor(param) {
	param.style.backgroundColor = "#FFFFFF";
}

function Control1(){
	if(document.form_contacto.Nombre.value == ""){
		alert('No esta indicado el Nombre');
		document.form_contacto.Nombre.focus();
		document.form_contacto.Nombre.style.backgroundColor = "#FF9393";
		return false;
	}
	if(document.form_contacto.Apellido.value == ""){
		alert('No esta indicado el Apellido');
		document.form_contacto.Apellido.focus();
		document.form_contacto.Apellido.style.backgroundColor = "#FF9393";
		return false;
	}
	/*if(document.form_contacto.Telefono.value == ""){
		alert('No esta indicado el Teléfono');
		document.form_contacto.Telefono.focus();
		document.form_contacto.Telefono.style.backgroundColor = "#FF0000";
		return false;
	}*/
	if(!emailCheck(document.form_contacto.Email.value)){
		document.form_contacto.Email.focus();
		document.form_contacto.Email.style.backgroundColor = "#FF9393";
		return false;
	}
	if(document.form_contacto.Comentario.value == ""){
		alert('No esta indicado el Comentario');
		document.form_contacto.Comentario.focus();
		document.form_contacto.Comentario.style.backgroundColor = "#FF9393";
		return false;
	}
}
//-->