
<!-- funcion para validar que la entrada de datos no este vacia  -->
function  validar ()
{
		if ( !document.form1.persona[0].checked && 
           !document.form1.persona[1].checked )
			{ 
		   alert("Debe seleccionar Persona :: Jurídica o Natural ::")        
		   return false; 
		   }                   
		var nombre  = document.form1.nombre.value
		if (nombre == "" || nombre == null) 
   			{
   				window.alert("Le falta introducir su :: Nombre ::")			
   				document.form1.nombre.focus()				
   				return false
   		}
		var apellido  = document.form1.apellido.value
		if (apellido == "" || apellido == null) 
   			{
   				window.alert("Le falta introducir su :: Apellido ::")			
   				document.form1.apellido.focus()				
   				return false
   		}
		
		var password = document.form1.password.value
		if (password == "" || password == null) 
   			{
   				window.alert("Le falta introducir su :: Password :: de 6 a 8 Caracteres")
             	document.form1.password.focus()				
   				return false
   			}
   			
   		/* MOV */
		if (password.length < 6 || password.length > 8) 
   			{
   				window.alert("El :: Password :: debe ser de 6 a 8 Caracteres")
             	document.form1.password.focus()				
   				return false
   			}
   		/* MOV */	
				
		if (password.indexOf("+")>0) 
   			{
   			window.alert("El caracter + no esta permitido en el campo contraseña")
   			document.form1.password.focus()				
   			return false
   			}
		
		/*if (document.form1.custom_ci.value == "vacio") 
   			{
   			alert("Seleccione su :: Nacionalidad en Cedula de Identidad ::")        
		    return false; 
   		}
		var ci  = document.form1.ci.value
		if (ci== "" || ci == null) 
   			{
   				window.alert("Le falta introducir su :: Cedula de Identidad ::")			
   				document.form1.ci.focus()				
   				return false
   		}*/
		var email  = document.form1.email.value
		if (email == "" || email == null) 
   			{
   				window.alert("Le falta introducir su :: E-mail ::")			
   				document.form1.email.focus()				
   				return false
   			}

		if (email.indexOf("@") == -1) 
  		{
   			window.alert("Se le olvido colocar el símbolo @")
   			document.form1.email.focus()				
   			return false						
   		}

		if (email.indexOf(".") == -1) 
   		{
   			window.alert("Le falta completar el dominio, por ejemplo soporte@daycohost.com")
   			document.form1.email.focus()				
   			return false
   			}
		
		
		var pregunta  = document.form1.pregunta.value
		var pregunta_opcional  = document.form1.pregunta_opcional.value
		
		
		if (pregunta == "" || pregunta == null)
		
			{if (pregunta_opcional == "" || pregunta_opcional == null){
   			window.alert("Le falta introducir la  :: Pregunta de Seguridad ::")			
   			document.form1.pregunta_opcional.focus()				
   			return false}
		
		}
		
		var res  = document.form1.respuesta.value
		if (res == "" || res == null) 
   			{
   				window.alert("Le falta introducir la :: Respuesta ::")			
   				document.form1.res.focus()				
   				return false
   		}

		var username = document.form1.username.value
		if (username == "" || username == null) 
   			{
   				window.alert("Le falta introducir su :: User Name :: minimo 6 Caracteres")			
   				document.form1.username.focus()				
   				return false
   			}
	
			

}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->

