function validacion_registro () {  if(document.registro.asoc_docum.value == "")   {    alert('No ha ingresado el Documento del asociado');	document.registro.asoc_docum.focus();	return false;   }  if(document.registro.asoc_nomcom.value == "")   {    alert('No ha ingresado el Nombre del asociado');	document.registro.asoc_nomcom.focus();	return false;   }    if(document.registro.asoc_cetb.value == "")   {    alert('No ha ingresado el Codigo de la ETB');	document.registro.asoc_cetb.focus();	return false;   }     if(document.registro.asoc_dir.value == "")   {    alert('No ha ingresado la Direccion');	document.registro.asoc_dir.focus();	return false;   }     if(document.registro.asoc_tel.value == "")   {    alert('No ha ingresado el Telefono');	document.registro.asoc_tel.focus();	return false;   }   if ((document.registro.asoc_mail.value == '')|| (document.registro.asoc_mail.value.indexOf('@') == -1) || (document.registro.asoc_mail.value.indexOf('.') == -1) )   {    alert('No ha ingresado el Correo o Debe rectificarlo');	document.registro.asoc_mail.focus();	return false;   }    if(document.registro.asoc_axt_id.value == "")   {    alert('No ha seleccionado el Tipo de Asociado');	document.registro.asoc_axt_id.focus();	return false;   }    document.registro.bandera.value =1;  return true; }function foco_nombre () {  if (document.registro.asoc_docum.value != "")   document.registro.asoc_nomcom.focus();  alert(); }function MM_openBrWindow(theURL,winName,features) {  window.open(theURL,winName,features);}function escribir_numero_form(numero) {   document.calendario.dia_seleccion.value=numero;   campo_destino=document.calendario.campo.value;      dia_seleccion=document.calendario.dia_seleccion.value;   mes_seleccion=document.calendario.mes_seleccion.value;   ano_seleccion=document.calendario.ano_seleccion.value;   fecha=dia_seleccion+"/"+mes_seleccion+"/"+ano_seleccion   eval("opener.document.form1." + campo_destino).value=fecha;   window.close(); }function abrir_calendario_form(campo) {  window.open('fechas_emergentes.php?campo='+campo,'calendario','width=210,height=250'); } function centrar(){    iz=(screen.width-document.body.clientWidth) / 2;    de=(screen.height-document.body.clientHeight) / 2;    moveTo(iz,de);}function imprSelec(nombre){  var ficha = document.getElementById(nombre);  var ventimp = window.open(' ', 'popimpr');  ventimp.document.write( ficha.innerHTML );  ventimp.document.close();  ventimp.print( );  ventimp.close();} function validar_contrasena() {  if (document.frm_cambio_contrasena.usuario.value == "")   {    alert('No ha ingresado su Documento');	document.frm_cambio_contrasena.usuario.focus();   }  else   {    if(document.frm_cambio_contrasena.contrasena.value == "")     {   	  alert('No ha ingresado la Actual Contraseña');	  document.frm_cambio_contrasena.contrasena.focus();     }    else	 {      if(document.frm_cambio_contrasena.new_contrasena.value == "")       {   	    alert('No ha ingresado la nueva Contraseña');	    document.frm_cambio_contrasena.new_contrasena.focus();       }	  else	   {		 if(document.frm_cambio_contrasena.new_contrasena.value == "")		 {		  alert('No ha ingresado la confirmación de la Contraseña');		  document.frm_cambio_contrasena.new_contrasena.focus();		 }		else          {          if(document.frm_cambio_contrasena.new_contrasena.value != document.frm_cambio_contrasena.conf_contrasena.value)           {	        alert('Es diferente el nuevo password a su confirmación');	        document.frm_cambio_contrasena.conf_contrasena.focus();	       }		  else		   {			var contrasena=document.frm_cambio_contrasena.new_contrasena.value;			if (contrasena.length<6)			 {			  alert ("Tamaño invalido de contraseña, (debe tener minimo 6 caracteres)");			  document.frm_cambio_contrasena.new_contrasena.focus();			 }			else			 document.frm_cambio_contrasena.submit();			            }		 }	   }	 }   } }  function validar_contrasena_fontebo() {   missinginfo="";   if (document.olvido.cedula.value == "")    {     missinginfo = 'No ha ingresado el Numero de Identificacion';     document.olvido.cedula.focus();	 alert(missinginfo);    }   else    {	 if ((document.olvido.mail.value == "")|| (document.olvido.mail.value.indexOf('@') == -1) || (document.olvido.mail.value.indexOf('.') == -1) )	  {       missinginfo = 'Rectifique su direccion electronica';       document.olvido.mail.focus();	   alert(missinginfo);	  }	 else	  {		   document.olvido.submit();	  }	}  }function validar() {   missinginfo="";   if (document.olvido.cedula.value == "")    {     missinginfo = 'No ha ingresado el Numero de Identificacion';     document.olvido.cedula.focus();	 alert(missinginfo);    }   else	 document.olvido.submit(); }function validacion_quejas() {  //////  if (document.quejas.nombre.value == "")   {    alert('No ha ingresado su nombre');    document.quejas.nombre.focus();    return false;   }  //////  if ((document.quejas.mail.value == "")|| (document.quejas.mail.value.indexOf('@') == -1) || (document.quejas.mail.value.indexOf('.') == -1) )   {    alert ("No ha ingresado su correo electronico o debe rectificarlo");	document.quejas.mail.focus();    return false;   }  /////  if (document.quejas.telefono.value == "")   {    alert('No ha ingresado su numero telefonico');    document.quejas.telefono.focus();    return false;   }  /////  if (document.quejas.empresa.value == "")   {    alert('No ha ingresado el nombre de su empresa');    document.quejas.empresa.focus();    return false;   }  /////  if (document.quejas.relaciones_adecco.value == "")   {    alert('No ha seleccionado la relacion que tiene con Fontebo');    document.quejas.relaciones_adecco.focus();    return false;   }  /////  if (document.quejas.area.value == "")   {    alert('No ha seleccionado el area a la que se dirige su mensaje');    document.quejas.area.focus();    return false;   }  /////  if (document.quejas.clase.value == "")   {    alert('No ha seleccionado la clase de mensaje que envia');    document.quejas.clase.focus();    return false;   }  /////  if (document.quejas.tema.value == "")   {    alert('No ha seleccionado el tema del mensaje');    document.quejas.tema.focus();    return false;   }  /////  if (document.quejas.comentario.value == "")   {    alert('No ha ingresado su comentario');    document.quejas.comentario.focus();    return false;   }  /////  return true;}var pong;function makeArray(n){  this.length = n;  for (i=1;i<=n;i++){    this[i]=0;  }  return this;}function displayDate() {  var this_month = new makeArray(12);  this_month[0]  = "enero";  this_month[1]  = "febrero";  this_month[2]  = "marzo";  this_month[3]  = "abril";  this_month[4]  = "mayo";  this_month[5]  = "junio";  this_month[6]  = "julio";  this_month[7]  = "agosto";  this_month[8]  = "septiembre";  this_month[9]  = "octubre";  this_month[10] = "noviembre";  this_month[11] = "diciembre";  var this_day_e = new makeArray(7);  this_day_e[0]  = "domingo";  this_day_e[1]  = "lunes";  this_day_e[2]  = "martes";  this_day_e[3]  = "miércoles";  this_day_e[4]  = "jueves";  this_day_e[5]  = "viernes";  this_day_e[6]  = "sábado";  var today = new Date();  var day   = today.getDate();  var month = today.getMonth();  var year  = today.getYear();  var dia = today.getDay();    if (year < 1000) {       year += 1900; }  return( " " + this_day_e[dia] + ", " + day + " de " + this_month[month] + " " + year);}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];}}