// JavaScript Document
function Valida(theForm)
{
  if (theForm.campo13.value == "")
  {
    alert("Por favor escriba su Dominio.");
    theForm.campo13.focus();
    return (false);
  }
  if (theForm.campo1.value == "")
  {
    alert("Por favor escriba su Nombre(s).");
    theForm.campo1.focus();
    return (false);
  }
  if (theForm.campo2.value == "")
  {
    alert("Por favor escriba su(s) Apellido Paterno.");
    theForm.campo2.focus();
    return (false);
  }
  if (theForm.capm.value == "")
  {
    alert("Por favor escriba su(s) Apellido Materno.");
    theForm.capm.focus();
    return (false);
  }
  
if (theForm.dir.value == "")
  {
    alert("Por favor escriba su cuenta de Correo Electrónico.");
    theForm.dir.focus();
    return (false);
  }
  
if (theForm.campo9.value == "")
  {
    alert("Por favor escriba su Número de Teléfono.");
    theForm.campo9.focus();
    return (false);
  }
if (theForm.campo13.value == "")
  {
    alert("Por favor escriba su Dominio.");
    theForm.campo13.focus();
    return (false);
  }
if (theForm.tmptxt.value == "")
  {
    alert("Por favor escriba Codigo de la Imagen.");
    theForm.tmptxt.focus();
    return (false);
  }  
return (true);
}

   function Validar(form){ 
    var pos1, pos2, bOk = true; 
    var sDir = document.ClienteNuevo.dir.value; 
    if (sDir == ""){ 
     alert("Por favor ingrese su dirección de correo"); 
     document.ClienteNuevo.dir.focus(); 
     return false; 
    } 
    pos1 = sDir.indexOf('@', 0); 
    pos2 = sDir.indexOf('.', 0); 
    bOk = bOk && (pos1 > 0); 
    bOk = bOk && (pos2 != -1); 
    bOk = bOk && (pos1 < pos2 - 1); 
    bOk = bOk && (pos2 < sDir.length - 1); 
    if (!bOk){ 
     alert("Dirección de correo inválida\nVerifique que no falte @ o .com / .mx"); 
	 document.ClienteNuevo.dir.focus(); 
     return false; 
    } 
   } 

function contac(thaForm)
{
  if (thaForm.nombre.value == "")
  {
    alert("Por favor escriba su(s) Nombre(s).");
    thaForm.nombre.focus();
    return (false);
  }
  if (thaForm.dir.value == "")
  {
    alert("Por favor escriba Dirección de Correo.");
    thaForm.dir.focus();
    return (false);
  }
  if (thaForm.telefono.value == "")
  {
    alert("Por favor escriba su Teléfono.");
    thaForm.telefono.focus();
    return (false);
  }
  if (thaForm.empr.value == "")
  {
    alert("Por favor escriba el nombre de su Empresa.");
    thaForm.empr.focus();
    return (false);
  }
  if (thaForm.comentario.value == "")
  {
    alert("Por favor escriba sus Comentarios.");
    thaForm.comentario.focus();
    return (false);
  }  
  if (thaForm.tmptxt.value == "")
  {
    alert("Por favor Ingrese Código de validación.");
    thaForm.tmptxt.focus();
    return (false);
  }  
return (true);
}

		function enviand(){
			if(document.frmnd.txtcampo1.value==""){
				alert("Correo es Obligatorio");
				frmnd.txtcampo1.focus();
			}
			else if(document.frmnd.txtcomen.value==""){
				alert("Sus Comentarios son de gran importancia");
				frmcompra.txtcomen.focus();
			}
			else
			{
				document.frmnd.submit()
			}
		}

		function frmenvia(){
			if(document.frmusuer.alfausuario.value==""){
				alert("Campo es Obligatorio");
				frmnd.alfausuario.focus();
			}
			else if(document.frmusuer.alfapas.value==""){
				alert("Campo es Obligatorio");
				frmusuer.alfapas.focus();
			}
			else
			{
				document.frmusuer.submit()
			}
		}
		
function contacmail(thaForm)
{
  if (thaForm.nombreamig1.value == "")
  {
    alert("Por favor escriba su(s) Nombre(s).");
    thaForm.nombreamig1.focus();
    return (false);
  }
  if (thaForm.dir.value == "")
  {
    alert("Por favor escriba Dirección de Correo.");
    thaForm.dir.focus();
    return (false);
  }
  if (thaForm.nombreamig2.value == "")
  {
    alert("Por favor escriba su Teléfono.");
    thaForm.nombreamig2.focus();
    return (false);
  }
  if (thaForm.dir1.value == "")
  {
    alert("Por favor escriba el nombre de su Empresa.");
    thaForm.dir1.focus();
    return (false);
  }
return (true);
}


function frmenviamail(){
			if(document.frmenvia.nombreamig1.value==""){
				alert("Campo es Obligatorio");
				frmenvia.nombreamig1.focus();
			}
			else if(document.frmenvia.dir.value==""){
				alert("Campo es Obligatorio");
				frmenvia.dir.focus();
			}
			else
			{
				document.frmenvia.submit()
			}
		}		
		
		
function acttercon(){
	if(document.ClienteNuevo.Term.checked){
		document.ClienteNuevo.botunn.disabled=false;
	}else{
		document.ClienteNuevo.botunn.disabled=true;
		}
}				

	function envia(){
		if(document.frepagos.txtnombre.value==''){
			alert("Campo del Nombre esta Vacio");
			frepagos.frepagos.focus();
		}
		else if(document.frepagos.txtapp.value==''){
			alert("Campo del Apellido Paterno esta Vacio");
			frepagos.txtapp.focus();
		}
		else if(document.frepagos.txtdir.value==''){
			alert("Campo del Correo esta Vacio");
			frepagos.txtdir.focus();
		}		
		else if(document.frepagos.tipobanc.value=='NA'){
			alert("Seleccione el tipo de Banco");
			frepagos.tipobanc.focus();
		}		
		else if(document.frepagos.txtsuc.value==''){
			alert("Campo del Sucursal donde pago esta Vacio");
			frepagos.txtsuc.focus();
		}		
		else if(document.frepagos.txtrefer.value==''){
			alert("No. de Referencia IMPORTANTE");
			frepagos.txtrefer.focus();
		}				
		else if(document.frepagos.dia1.value=='NA'){
			alert("seleccione día en que pago");
			frepagos.dia1.focus();
		}		
		else if(document.frepagos.clmes.value=='NA'){
			alert("seleccione Mes en que pago");
			frepagos.clmes.focus();
		}		
		else if(document.frepagos.txtcoemn.value==''){
			alert("Campo Obligatorio");
			frepagos.clmes.focus();
		}	
		else{
			document.frepagos.submit();
		}			
	}
