
/*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*
 *																*
 *	Funcion: Valida campos vacíos								*
 *	Fecha: 03-Febrero-06										*
 *																*
 *	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*/
	 
	   function fValida(ObjForm) {
	     var i,j=0;
         var mensaje= '';
	     var p= new Array();	   
	     
	     for(i=0;i<ObjForm.length;i++) {
	       if (ObjForm.elements[i].value == '') {
		       mensaje += '- ' + ObjForm.elements[i].name + '\n';
			   p[j]='';
			   p[j] += ObjForm.elements[i].name;
			   j+=1;
		   }
	     }
		 
	     if (mensaje != '') {
           alert('Faltan los siguientes campos:  \n\n'+mensaje+'\n\n');
	       eval('document.forms[0].'+p[0]+'.focus();');
		   return false;
	     }	
		 else return true;
		 
	   }
	   
/*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*
 *																*
 *	Funcion: Asigna un valor a un hidden						*
 *	Fecha: 14-Febrero-06										*
 *																*
 *	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*/
 
       function fAsigna(ObjName,ObjVal) {
	      eval('document.forms[0].'+ObjName+'.value = '+ObjVal+';');
	   }

/*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*
 *																*
 *	Funcion: Asigna un valor a un hidden						*
 *	Fecha: 14-Febrero-06										*
 *																*
 *	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*/

	   function _onCentral ( f ) {
	        if ( fValidaObligatorios ( f ) ) {
		         f.Password.value = calcM(f.Password.value); 
			     f.submit();
/*				      if ( _onsubmitv( f ) ) {
						   f.submit();
		              }*/
		    }
	   }

/*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*
 *																*
 *	Funcion: Asigna un valor a un hidden						*
 *	Fecha: 14-Febrero-06										*
 *																*
 *	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*/
 
       function _onCentral_1 ( e , f ) {
   
         if( window.event ) { // IE
	         keynum = e.keyCode
         }
         else 
             if(e.which) { // Netscape/Firefox/Opera
	            keynum = e.which
	         }

         if ( keynum == '13' ) {
               _onCentral( f );
         }

       }

/*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*
 *																*
 *	Funcion: Cambia el estatus y el valor de radio buttons		*
 *	Fecha: 15-Febrero-06										*
 *																*
 *	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*/

	   function fCambiaValor(valor,ObjForm) {
	      var i;

		  switch (valor) {
		    case '600013.html': /* Casos.cfm */
                  ObjForm.opcion[0].checked  = false;
  	              ObjForm.opcion[0].disabled = true;
		          ObjForm.opcion[1].checked  = true;
			      ObjForm.opcion[1].disabled = false;
				  break;
			case '600009.html': /* Comentarios.cfm */
                  ObjForm.opcion[0].checked  = false;
  	              ObjForm.opcion[0].disabled = true;
		          ObjForm.opcion[1].checked  = true;
			      ObjForm.opcion[1].disabled = false;
				  break;
			case '600007.html': /* Temactual.cfm */
                  ObjForm.opcion[0].checked  = true;
  	              ObjForm.opcion[0].disabled = false;
		          ObjForm.opcion[1].checked  = false;
			      ObjForm.opcion[1].disabled = true;
				  break;
			default: /* Temas.cfm */
                  ObjForm.opcion[0].checked  = true;
  	              ObjForm.opcion[0].disabled = false;
		          ObjForm.opcion[1].checked  = false;
			      ObjForm.opcion[1].disabled = false;
		  }

       }

/*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*
 *																*
 *	Funcion: Hace un redireccionamiento con submit a una página *
 *			 específica de acuerdo al un valor de la forma.  	*
 *	Fecha: 15-Febrero-06										*
 *																*
 *	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*/

       function fManda(ObjForm) {
	      var pag = '';
		  var i;
		  
	      for(i=0;i<ObjForm.opcion.length;i++) {
		     if (ObjForm.opcion[i].checked) {
			   if (ObjForm.opcion[i].value == 'lista') {
			     switch(ObjForm.paginamenu.value) {
				   case '600002.html':
 				        pag = '600004.html'; /* Listado de Temas */
				        break;
				   case '600009.html':
				        pag = '600009.html'; /* Listado de Comentarios */
						break;
				   case '600013.html':
				        pag = '600013.html'; /* Listado de Casos */
						break;
				 }
			   }
		       else
		            pag = ObjForm.paginamenu.value;
			 }		
		  }		

	        ObjForm.action = pag;
			ObjForm.submit();
	   }	   

/*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*
 *																*
 *	Funcion: Hace un redireccionamiento con submit a una página *
 *			 específica.										*
 *	Fecha: 15-Febrero-06										*
 *																*
 *	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*/
 
       function fRedirecciona(pag,ObjForm) {
	      var vExt = '.html';
		  
          if(fValida(ObjForm)) {
	         if (ObjForm.opc.value != '-')
		         ObjForm.action = (parseInt(pag) + 2) + vExt;
		     else
		         ObjForm.action = pag + vExt;
				 
		     ObjForm.submit();
		  }
		  else
		      return false;
	   }
 
 /*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*
 *																*
 *	Funcion: Pasa el focus al objeto especificado				*
 *	Fecha: 15-Febrero-06										*
 *																*
 *	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*/
 
      function fFocus(ObjName) {
	    eval('document.forms[0].'+ObjName+'.focus();');
	  }

 /*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*
 *																*
 *	Funcion: Controla si se quiere eliminar o modificar un   	*
 *			 registro del listado de temas.						*
 *	Fecha: 15-Febrero-06										*
 *																*
 *	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*/
	  
      function fEliModif(pag,id) {
	      if (id < 0 && pag == '600006.html') {
	  	     alert('Error. No se puede eliminar el Tema Actual!.');
		  }
		  else {
		      if (id < 0)
		  	     id = id * (-1);
		      if (pag == '600006.html') {
		          if (confirm("¿Alia estas segura querer eliminar este registro?")) {
	                  document.forms[0].action    = pag;
		              document.forms[0].opc.value = id;
		              document.forms[0].submit();
		          }
			  }
			  else {
	                  document.forms[0].action    = pag;
		              document.forms[0].opc.value = id;
		              document.forms[0].submit();	
			  }
		  }	  
	  }  	  
	  
 /*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*
 *																*
 *	Funcion: Pasa el focus a un elemento de la una lista.    	*
 *	Fecha: 15-Febrero-06										*
 *																*
 *	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*/
 
      function fFocusList(ObjForm) {
	      ObjForm.lstema_2.options[0].selected = true;
      }
	

 /*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*
 *																*
 *	Funcion: Regresa la posición de un elemento de una lista.	*
 *	Fecha: 15-Febrero-06										*
 *																*
 *	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*/
 
      function fpos(pos,ObjForm) {
	     var valor;
	   
	     for(i=0;i<ObjForm.lstema_1.options.length;i++) {
	        if (ObjForm.lstema_1.options[i].value == pos) {
		        valor = i;
		   	    break;
		    }
	     }
	   
	     return valor;
	  }
	
 /*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*
 *																*
 *	Funcion: Intercambia entre listas los valores pasando de 	*
 *			 una lista a otra un elemento.						*
 *	Fecha: 15-Febrero-06										*
 *																*
 *	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*/
 	
      function flista(ObjForm) {
	     //Obtiene la posicion del option que va a pasar
	     var oOpcion  = document.createElement("option");
	     var texto    = ObjForm.lstema_2.options[0].text;
	     var valor    = ObjForm.lstema_2.options[0].value;
	     var pos;
	  
         ObjForm.lstema_2.options.length = 0;
	  
	     ObjForm.lstema_2.options.add(oOpcion);
	     oOpcion.innerText = ObjForm.lstema_1.options[ObjForm.lstema_1.selectedIndex].text;
	     oOpcion.value     = ObjForm.lstema_1.options[ObjForm.lstema_1.selectedIndex].value;

         pos = fpos(ObjForm.lstema_1.options[ObjForm.lstema_1.selectedIndex].value,ObjForm);

         ObjForm.lstema_1.options[pos].value = valor;
         ObjForm.lstema_1.options[pos].text  = texto;
	  
	  } 
	  
 /*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*
 *																		*
 *	Funcion: Asigna valores y redirecciona a editar los comentarios 	*
 *			 una lista a otra un elemento.								*
 *	Fecha: 16-Febrero-06												*
 *																		*
 *	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*/

      function fEdita(iVT,iVC,pag) {
         document.forms[0].opc.value = iVT;
         document.forms[0].com.value = iVC;
	     document.forms[0].action    = pag;
	     document.forms[0].submit();
      }

 /*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*
 *																*
 *	Funcion: Almacena un grupo de valores del objeto check box 	*
 *			 para habilitar como activo dicho comentario.		*
 *	Fecha: 16-Febrero-06										*
 *																*
 *	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*/	  
	  
      function fValores(iVT,ObjForm,pag) {
         var i;
	     ObjForm.hda.value = '';
	  
	     if (iVT > 0) {
	       for(i=0;i<ObjForm.length;i++) {
               if (ObjForm.elements[i].type == 'checkbox') {
		           if (ObjForm.elements[i].checked) {
			   	      if (ObjForm.hda.value != '')
				          ObjForm.hda.value += ',' + ObjForm.elements[i].value;
				      else
				          ObjForm.hda.value = ObjForm.elements[i].value;
				   }
		       }	
	       }
		   ObjForm.action = pag;
		   ObjForm.submit();
         }
	     else {
	        alert('Acción No Válida!.');
         }
      }	  
	  
 /*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	 *
 *																 *
 *	Funcion: Verifica el máximo en caracteres que puede capturar *
 *			 el usuario en un text area							 *
 *	Fecha: 21-Febrero-06										 *
 *																 *
 *	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	 */
 
      function fMax(ObjForm) {
          var tm = ObjForm.value.length;

		  if (tm > 300)
		  	  ObjForm.value = ObjForm.value.substring(0,300);
		  else 
		   	  r = 300 - tm;
      }
	  
 /*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*
 *																*
 *	Funcion: Habilita objetos de la forma					 	*
 *	Fecha: 21-Febrero-06										*
 *																*
 *	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*/
 
      function fHabilita(ObjForm,iVC,cVN) {
	    eval("document.forms[0].p_"+iVC+".disabled = false; document.forms[0].p_"+iVC+".style.background = '#FFFFFF'; document.forms[0].p_"+iVC+".focus();");
	    eval("document.forms[0].r_"+iVC+".disabled = false; document.forms[0].r_"+iVC+".style.background = '#FFFFFF'; ");
	    ObjForm.gt.disabled = false;
        ObjForm.usr.value   = '';
	    ObjForm.usr.value   = cVN;
	    for(i=0;i<ObjForm.length;i++) {
             if(ObjForm.elements[i].type == 'checkbox') {
		    	if (ObjForm.elements[i].value != iVC) {
			        ObjForm.elements[i].checked  = false;
			        ObjForm.elements[i].disabled = true;
			    } // cierra el if
		     } // cierra el if
	    } // cierra el for
	  }
	  
 /*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*
 *																*
 *	Funcion: Deshabilita objetos de la forma					*
 *	Fecha: 21-Febrero-06										*
 *																*
 *	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*/
 
      function fDeshabilita(ObjForm) {
        ObjForm.usr.value = '-';
	    ObjForm.gt.disabled = true;
	     for(i=0;i<ObjForm.length;i++) {
           switch (ObjForm.elements[i].type) {
		    case ('checkbox'):
			      ObjForm.elements[i].checked  = false;
			      ObjForm.elements[i].disabled = false;
		    break;
		    case ('text'):
		   	      ObjForm.elements[i].disabled = true;
			      ObjForm.elements[i].style.background = '#D5DEF9';
	 	    break;
		    case 'textarea':
		    	  ObjForm.elements[i].disabled = true;
			      ObjForm.elements[i].style.background = '#D5DEF9';
		    break;				
	       } // cierra el case
	     } // cierra el for
      }	  
	  
 /*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*
 *																*
 *	Funcion: Verifica que almenos un checkbox este activado		*
 *	Fecha: 21-Febrero-06										*
 *																*
 *	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*/
 	  
      function fDetermina(ObjForm) {
          var i,lVRegresa = false;
	   
	      for(i=0;i<ObjForm.length;i++) {
              if(ObjForm.elements[i].type == 'checkbox') {
		         if (ObjForm.elements[i].checked) {
                     lVRegresa = true;
			    	  break;
			     }
		      }
	      }
	      return lVRegresa;
      }
	  
 /*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*
 *																*
 *	Funcion: Verifica que el caso que este activado llene todos	*
 *			 los campos que se requieren.						*
 *	Fecha: 21-Febrero-06										*
 *																*
 *	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*/
 
      function fValidaTextArea(ObjForm) {
          var i,j = 0;
	      var msg = '';
	      var cam = new Array();
	   
	      for(i=0;i<ObjForm.length;i++) {
	         if (!(ObjForm.elements[i].disabled)) {
		        if(ObjForm.elements[i].value == '') {
			       msg += ObjForm.elements[i].name;
			       cam[j] ='';
			       cam[j] += ObjForm.elements[i].name;
			       j+=1; 
			    }
			    else {
                    switch (ObjForm.elements[i].type) {
		               case ('checkbox'):
					         ObjForm.opc.value = '';
			                 iVC = ObjForm.elements[i].value;
						     ObjForm.opc.value = iVC;
 		               break;
		               case ('text'):
					         ObjForm.pre.value = ObjForm.elements[i].value;
	 	               break;
		               case 'textarea':
					         ObjForm.res.value = ObjForm.elements[i].value;
		               break;
	                } // cierra el case
		        } // cierra el else
	         } // cierra el if
	      } // cierra el for

	      if (msg != '') {
	          alert('Falta llenar dato(s) del caso No.'+iVC+'');
		      eval('document.forms[0].'+cam[0]+'.focus()');
	          return false;
	      }
	      else 
	          return true;
      }
	  
 /*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*
 *																*
 *	Funcion: Verifica que el caso que este activado llene todos	*
 *			 los campos que se requieren.						*
 *	Fecha: 21-Febrero-06										*
 *																*
 *	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*/
 
       function fObj(ObjForm,iVC,cVN) {
          var i = 0;
          var j;
	   
	      j = fDetermina(ObjForm); // true- checked   false - no checked
	      if (j) fHabilita(ObjForm,iVC,cVN);
          else fDeshabilita(ObjForm);
      }

 /*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*
 *																*
 *	Funcion: Sólo manda a una página en específico sin valor    *
 *	Fecha: 21-Febrero-06										*
 *																*
 *	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*/
 
      function fSubmite(ObjPag) {
	      document.forms[0].action = ObjPag;
		  document.forms[0].submit();
	  }
	  
	  
 /*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*
 *																*
 *	Funcion: Valida que sea mail válido						    *
 *	Fecha: 30-Marzo-06											*
 *																*
 *	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*/

      function fMail(ObjC,ObjName , f) {
         var filter=/^[A-Za-z_\-\.]+[A-Za-z0-9_\.]*@[A-Za-z0-9_-]+\.[A-Za-z0-9_.]+[A-za-z]$/;
         var lBandera = true;
	         lBandera = filter.test(ObjC);
		  
		     if (!(lBandera)) {
		        alert('Proporciona una dirección de correo válida!.');
			    eval('f.'+ObjName+'.focus();');
			    eval('f.'+ObjName+'.select();');				
			    return false;
		     }
		  
	     return lBandera;
      }	  

 /*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*
 *																*
 *	Funcion: Calcula le edad de acuerdo a una fecha	válida	    *
 *	Fecha: 31-Marzo-06											*
 *																*
 *	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*/
	  
      function fEdad(fecha){ 

          //calculo la fecha de hoy 
          hoy = new Date() 
          //alert(hoy) 

          //calculo la fecha que recibo 
          //La descompongo en un array 
          var array_fecha = fecha.split("/") 
          //si el array no tiene tres partes, la fecha es incorrecta 
          if (array_fecha.length!=3) 
             return false 

          //compruebo que los ano, mes, dia son correctos 
          var ano 
          ano = parseInt(array_fecha[2]); 
          if (isNaN(ano)) 
             return false 

          var mes 
          mes = parseInt(array_fecha[1]); 
          if (isNaN(mes)) 
             return false 

          var dia 
          dia = parseInt(array_fecha[0]); 
          if (isNaN(dia)) 
             return false 

		  //compruebo que sea una fecha válida
		  switch(mes) {
		    case 1:  // Enero - 31
			     if(!(parseInt(dia) >= 1 && parseInt(dia) <= 31))
				    return false;
			break;
			case 2:  // Febrero - 28 ó 29 (Cada 4 años)
			     if(parseInt(ano) % parseInt(4) == 0) {
				     if(!(parseInt(dia) >= 1 && parseInt(dia) <= 29))
				        return false;
				 }
				 else {
				     if(!(parseInt(dia) >= 1 && parseInt(dia) <= 28))
					    return false;
				 }
			break;
		    case 3:  // Marzo - 31
			     if(!(parseInt(dia) >= 1 && parseInt(dia) <= 31))
				    return false;
			break;
		    case 4:  // Abril - 30
			     if(!(parseInt(dia) >= 1 && parseInt(dia) <= 30))
				    return false;			
			break;
		    case 5:  // Mayo - 31
			     if(!(parseInt(dia) >= 1 && parseInt(dia) <= 31))
				    return false;
			break;
		    case 6:  // Junio - 30
			     if(!(parseInt(dia) >= 1 && parseInt(dia) <= 30))
				    return false;			
			break;
		    case 7:  // Julio - 31
			     if(!(parseInt(dia) >= 1 && parseInt(dia) <= 31))
				    return false;			
			break;
		    case 8:  // Agosto - 31
			     if(!(parseInt(dia) >= 1 && parseInt(dia) <= 31))
				    return false;			
			break;
		    case 9:  // Septiembre - 30
			     if(!(parseInt(dia) >= 1 && parseInt(dia) <= 30))
				    return false;
			break;
		    case 10:  // Octubre - 31
			     if(!(parseInt(dia) >= 1 && parseInt(dia) <= 31))
				    return false;
			break;
		    case 11:  // Noviembre - 30
			     if(!(parseInt(dia) >= 1 && parseInt(dia) <= 30))
				    return false;			
			break;
		    case 12:  // Diciembre - 31
			     if(!(parseInt(dia) >= 1 && parseInt(dia) <= 31))
				    return false;			
			break;
		  }
		   
          //si el año de la fecha que recibo solo tiene 2 cifras hay que cambiarlo a 4 
          if (ano<=99) 
             ano +=1900 

          //resto los años de las dos fechas 
          edad=hoy.getYear()- ano - 1; //-1 porque no se si ha cumplido años ya este año 

          //si resto los meses y me da menor que 0 entonces no ha cumplido años. Si da mayor si ha cumplido 
          if (hoy.getMonth() + 1 - mes < 0) //+ 1 porque los meses empiezan en 0 
             return edad 
          if (hoy.getMonth() + 1 - mes > 0) 
             return edad+1 

          //entonces es que eran iguales. miro los dias 
          //si resto los dias y me da menor que 0 entonces no ha cumplido años. Si da mayor o igual si ha cumplido 
          if (hoy.getUTCDate() - dia >= 0) 
             return edad + 1 
      
          return edad 
      } 
	  
 /*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*
 *																*
 *	Funcion: Valida que sea mail válido						    *
 *	Fecha: 01-Abril-06											*
 *	Programa: 200025.html										*
 *	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*/
 	  
	  function fDatos(ObjForm) {
	  
	       /* Valida que el mail sea válido */
           if(!(fMail(ObjForm.Email.value,'Email'))) return false;
		   
           /* Inidica si el nickname se va a validar */
           if(ObjForm.hdn.value != ObjForm.Nick_Name.value)
              ObjForm.hdv.value = '1';
		   
	       var cVFecha = ObjForm.Dob_Day.value+'/'+ObjForm.Dob_Month.value+'/'+ObjForm.Dob_Year.value;
		   var iVEdad  = fEdad(cVFecha);
		   
		   /* Valida que sea mayor de edad */
		   if(!(iVEdad)){
		      alert('Indica una fecha válida.');
			  ObjForm.Dob_Day.focus();
			  return false;
		   }
		   else {
		      if(parseInt(iVEdad) < 18) {
			     alert('Disculpa, debes de ser mayor de edad.');
				 ObjForm.Dob_Day.focus();
				 return false;
			  } 
		   }
		 
		 ObjForm.hdf.value = cVFecha;
		 return true;
      }	  
	  
 /*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*
 *																*
 *	Funcion: Redirecciona a una página específica			    *
 *	Fecha: 21-Abril-06											*
 *	Programa: LM6000100.html									*
 *	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*/
 
     function f01(ObjForm,ObjPag,Par1,Par2,Par3) {
		 ObjForm.action     = ObjPag;
		 ObjForm.par1.value = Par1;
		 ObjForm.par2.value = Par2;
		 ObjForm.par3.value = Par3;
		 ObjForm.submit();
	 }
 
  /*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*
 *																*
 *	Funcion: Redirecciona a una página específica			    *
 *	Fecha: 21-Abril-06											*
 *	Programa: LM6000100.html									*
 *	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*/
 
     function f02(ObjForm,ObjPag,Par1,Par2,Par3,Par4,Par5) {
		 ObjForm.action     = ObjPag;
		 ObjForm.par1.value = Par1;
		 ObjForm.par2.value = Par2;
		 ObjForm.par3.value = Par3;
		 ObjForm.par4.value = Par4;
		 ObjForm.par5.value = Par5;
		 ObjForm.submit();
	 }

 /*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*
 *																*
 *	Funcion: Valida que en caso de seleccionar sólo algunos 	*
 *           amigos este selccionado ya sea mínimo un contacto 	*
 *           o un grupo.										*
 *	Fecha: 26-Abril-06										    *
 *																*
 *	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*/	   
 
       function fValidaGrupoContacto(ObjForm,par1,par2,par3) {
	      var i=0;
		  var radvalor;
          var sel_1='',sel_2='';
//alert('1');
		  // Obtenemos el valor del nivel del blog
		  for (i=0;i<par3.length;i++) {
		     if (par3[i].checked)
		         radvalor = par3[i].value;
		  }

//alert('2');	  
		  // Verificamos que el valor del radio sea diferente de 3 en caso contrario para checar 
		  // si grupo o contacto tienen información válida.
		  if (radvalor != 3) return true;
		  else {
		        // Contacto
                for(i=0;i<par1.options.length;i++) {
				   if (par1.options[ i ].selected && par1.options[i].text != 'AMIGOS & CONTACTOS') {
				       if (sel_1 != '')
					       sel_1 = sel_1 + ',' + par1.options[ i ].value;
					   else
					       sel_1 = par1.options[ i ].value;
				   }
			    }
//alert('3');				
                // Grupo
                for(i=0;i<par2.options.length;i++) {
				   if (par2.options[ i ].selected && par2.options[i].text != 'GRUPOS') {
				       if (sel_2 != '')
					       sel_2 = sel_2 + ',' + par2.options[ i ].value;
					   else
					       sel_2 = par2.options[ i ].value;
				   }
			    }
//alert('4');
				if(sel_1 != '') return true;
				else {
				  if (sel_2 != '') return true;
				  else {
				     alert('Selecciona al menos un contacto o un grupo.');
				     ObjForm.Contacto.focus();
				     return false;
				  }
				}
             return true;
		  }
	   } 
	   
 /*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*
 *																*
 *	Funcion: Verifica que la cadena contenga sólo letras		*
 *	Fecha: 30-Mayo-06										    *
 *																*
 *	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*/
 
       function _isLetra ( c ) {
         var lM = "ABCDEFGHIJKLMNÑOPQRSTUVWXYZÁÉÍÓÚ "; 
	     var lm = "abcdefghijklmnñopqrstuvwxyzáéíóú ";
           return( ( lM.indexOf( c ) != -1 ) || ( lm.indexOf( c ) != -1 ) )	 
       }
	   
 /* *	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*
 *																*
 *	Función: Verifica que la cadena contenga el caracter que 	*
 *			 mandamos por parámetro								*
 *	Fecha: 05-Enero-07											*
 *																*
 *	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*/
 
       function _isCaracter ( v , c ) {
	     return ( v.indexOf( c ) != -1 )
	   }	   

 /*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*
 *																*
 *	Funcion: Verifica que la cadena contenga sólo números		*
 *	Fecha: 30-Mayo-06										    *
 *																*
 *	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*/
    
       function _isNumero( c ) {
          return ((c >= "0") && (c <= "9"))
       }

 /*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*
 *																*
 *	Funcion: Función que valida sólo alfanumericos				*
 *	Fecha: 30-Mayo-06										    *
 *																*
 *	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*/
 
       function _SoloLetrasYNumeros( s ) {
         var c = '';
           for (i = 0; i < s.length; i++) {   
              c = s.charAt(i);
               if (! (_isLetra(c) || _isNumero(c) ) )
                return false;
           }
	     return true;
       }

 /* *	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*
 *																*
 *	Función: Valida que tenga la cadena contenga el caracter 	*
 *			 que mandamos por parámetro							*
 *	Fecha: 05-Enero-07											*
 *																*
 *	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*/	   
	   function _SoloCaracter ( v , r ) {
         var c = '';
           for (i = 0; i < v.length; i++) {   
              c = s.charAt(i);
               if (! (_isCaracter( c , r ) ) )
                return false;
           }
	     return true;
	   }

 /*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*
 *																*
 *	Funcion: Función que valida sólo letras     				*
 *	Fecha: 30-Mayo-06										    *
 *																*
 *	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*/
 
       function _SoloLetras( s ) {
         var c = '';
           for (i = 0; i < s.length; i++) {   
              c = s.charAt(i);
               if ( ! ( _isLetra ( c  ) ) )
                return false;
           }
	     return true;
       }	   

 /*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*
 *																*
 *	Funcion: Función que valida sólo números      				*
 *	Fecha: 30-Mayo-06										    *
 *																*
 *	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*/
 
       function _SoloNumeros( s ) {
         var c = '';
           for (i = 0; i < s.length; i++) {   
              c = s.charAt(i);
               if ( ! ( _isNumero ( c  ) ) )
                return false;
           }
	     return true;
       }	   
	   
 /*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*
 *																*
 *	Funcion: Manda los nombres de campos a validar				*
 *	Fecha: 30-Mayo-06										    *
 *																*
 *	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*/
    
      function _onvalida(s) {

         var msg = '';
	     var i,j = 0;
	     var p   = new Array();
         if ( fValidaObligatorios( s ) ) {
	         for (i=0; i < s.length; i++) {
		        if (s.elements[i].name == "Nombre" || s.elements[i].name == "Apellido_Paterno" || s.elements[i].name == "Apellido_Materno")
	              if ( ! (_SoloLetras(s.elements[i].value) ) ) {
			        p[j] = '';
				    p[j] = s.elements[i].name;
				    msg += '- ' + s.elements[i].name + '\n';
				    j += 1;
			      }
		     }
		  
		     if ( msg != '' ) {
		       alert('\n Los sisguiente(s) campo(s) contienen caracteres especiales, sólo permiten letras : \n\n' + msg + '\n\n');
			   eval('s.'+p[0]+'.focus();');
			   eval('s.'+p[0]+'.select();');
			   return false;
		     }
			 else return true;
	     }
	     else return false;
		 
//		 return true;
      }
   
      function _onsubmitv ( form ) {
         var isOk = true;
//		 alert('entró _onsubmitv');
         form.Password.value = calcM(form.Password.value);
//         form.js.value = "1.3";
         return isOk;
      }

      function _onsubmitv_2(form) {
         var isOk = true;
		 form.Temp.value         = form.Password.value;
         form.Password.value     = calcM(form.Password.value);
		 form.Confirmacion.value = calcM(form.Confirmacion.value);
/*		 alert('Password: '+form.Password.value);
		 alert('Confirmacion: '+form.Confirmacion.value);
    	 alert('Temp: '+form.Temp.value);*/
//         form.js.value = "1.3";
         return isOk;
      } 	  
   
 /*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*
 *																*
 *	Funcion: Compara dos cadenas								*
 *	Fecha: 31-Mayo-06										    *
 *																*
 *	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*/
 
      function _oncompara( b , c ) {
        return ( b == c )
      }   
	  
 /*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*
 *																*
 *	Funcion: Compara dos cadenas								*
 *	Fecha: 31-Mayo-06										    *
 *																*
 *	*	* 	*	*	*	*	*	*	*	*	*	*	*	*	*	*/
 
	  function _onchecked ( b ) {
        return ( b.checked )
      }

 /*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*
 *																*
 *	Funcion: Abre la ventana del código postal por primera vez  *
 *	Fecha: 05-Junio-06										    *
 *																*
 *	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*/
 	 
     function _onwindow( s ) {
         var preview;
	     //var url = "/cgi-bin/pasaport.sh/html/cp2.html?iVidA="+escape(s.idA.value)+"&SLSPais="+escape(s.Pais.value)+"&SLSEstado="+escape(s.Estado.value);
	     var url = "/cgi-bin/pasaport.sh/html/cp2.html?iVidA="+escape(s.idA.value)+"&SLSPais="+escape(s.Pais.value);
	     preview = window.open(url, "Postal","left=50,top=10,width=800,height=500");
     }
	 
 /*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*
 *																    *
 *	Funcion: Cambia los valores a la pantalla padre desde el hijo   *
 *	Fecha: 05-Junio-06										        *
 *															        *
 *	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*/ 
 
 	 function fCambiaVal ( s ) {
	     // Igualamos el valor del combo a true dependiendo de la opción del listado en la herramienta
	     		 
		 /*for ( i = 0 ; i < self.opener.document.registro.Estado.options.length ; i++ ) {
		 
		    if ( s.SLSEstado.value == self.opener.document.registro.Estado.options[i].value )
			     self.opener.document.registro.Estado.options[i].selected = true;
		 }*/
		 // Igualamos el valor del código postal a la forma de registro
		 self.opener.document.registro.CP.value    = s.cp.value;
		 self.opener.document.registro.campo.value = "1";
		 self.window.close();
	 }
	 
 /*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*
 *																    *
 *	Funcion: Iguala el valor a un text y el valor es po parámetro   *
 *	Fecha: 05-Junio-06										        *
 *															        *
 *	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*/
 
     function fCambia ( ObjVal )  {
	   document.forms[0].cp.value = ObjVal;
	 }

 /*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*
 *																    *
 *	Funcion: Muestra y Oculta el objeto div en un html              *
 *	Fecha: 09-Junio-06										        *
 *															        *
 *	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*/
 	 
     function showHide ( targetName , valor , s ) {
	   
	 var cVar_1 = '',cVar_2 = '',cVar_3 = '', cVar_4 = '';
	 
		if ( valor == "México" || valor == "USA" ) {
  	         s.action = '';
		     s.campo.value = '';
		     s.submit();
	    }
		else {

           if ( document.getElementById ) { // NS6+
                target   = document.getElementById(targetName);
			    target_2 = document.getElementById('Estado_SLS');
				target_3 = document.getElementById('OtroEstado');
				target_4 = document.getElementById('zip');
           } 
		   else 
		      if ( document.all ) { // IE4+
                   target   = document.all[targetName];
			       target_2 = document.all['Estado_SLS'];
			       target_3 = document.all['OtroEstado'];
				   target_4 = document.all['zip'];
              }
		    
		   if ( valor == "Otro") {
			    cVar_1 = 'inline';
		        cVar_2 = 'none';
				cVar_3 = 'inline';
				cVar_4 = 'none';
		   }
		   else {
			    cVar_1 = 'none';
		        cVar_2 = 'none';
				cVar_3 = 'inline';
				cVar_4 = 'none';
		   } // end del else de otro			  
			          
              if ( target ) {
                   target.style.display = cVar_1;
              }

              if ( target_2 ) {
                   target_2.style.display = cVar_2;
              }
		   
		      if ( target_3 ) {
                   target_3.style.display = cVar_3;
              }
			  
			  if ( target_4 ) {
			       target_4.style.display = cVar_4;
			  }
		   
		   if ( valor == "Otro") {
		        s.Estado.id  = "";
				s.Otro.value = "";
		        s.Otro.id    = "obl";
				s.Edo.value  = "";
		        s.Edo.id     = "obl";
		        s.Otro.focus();
		   }
		   else {
		        s.Estado.id  = "";
				s.Otro.value = "";
		        s.Otro.id    = "";
				s.Edo.value  = "";
		        s.Edo.id     = "obl";
		        s.Edo.focus();		   
		   
		   
		   } // end del else de otro	

        } // si es igual a otro
		
     }

     function showHide_2 ( targetName , valor , s ) {

         if ( document.getElementById ) { // NS6+
                var a = document.getElementById(targetName);
				var b = document.getElementById('zip');
         } 
		 else 
		    if ( document.all ) { // IE4+
                   var a = document.all[targetName];
				   var b = document.all['zip'];
            }
			
	     if ( valor == 'Otro' ) {
			  s.Otro.value    = "";
		      s.Otro.id       = "obl";
		      a.style.display = 'inline';
			  b.style.display = 'none';
			  s.Otro.value    = "";
		      s.Otro.id       = "obl";
		 } else {   
		      if ( valor == "México" || valor == "USA" ) {
			       s.campo.value = '';
			       b.style.display = 'inline';
			  }
			  else
			       b.style.display = 'none';
			  s.Otro.value    = "";
		      s.Otro.id       = "";
		      a.style.display = 'none';
	     }

     }	 
	 
 /*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*
 *																    *
 *	Funcion: Valida a los usuarios nuevos e identifica el username  *
 *			 como válido.											*
 *	Fecha: 11-Junio-06										        *
 *															        *
 *	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*/
 
      function _onNick ( s ) {
        if ( s.Nick.value != '' ) {
		
	       var url='';
           for ( i = 0 ; i < s.length ; i++ ) {
		      if ( s.elements[ i ].id == 'obl' ) {
			      switch ( s.elements[ i ].name ) {
		            case 'Nombre':
				           if ( url != '' ) url += '&' + s.elements[ i ].name + '=' + escape ( s.elements[ i ].value ); else url = s.elements[ i ].name + '=' + escape ( s.elements[ i ].value );
				    break;
		            case 'Apellido_Paterno':
				           if ( url != '' ) url += '&' + s.elements[ i ].name + '=' + escape ( s.elements[ i ].value ); else url = s.elements[ i ].name + '=' + escape ( s.elements[ i ].value );
				    break;
		            case 'Apellido_Materno':
				           if ( url != '' ) url += '&' + s.elements[ i ].name + '=' + escape ( s.elements[ i ].value ); else url = s.elements[ i ].name + '=' + escape ( s.elements[ i ].value );
				    break;
		            case 'Dia':
				           if ( url != '' ) url += '&' + s.elements[ i ].name + '=' + escape ( s.elements[ i ].value ); else url = s.elements[ i ].name + '=' + escape ( s.elements[ i ].value );
				    break;
		            case 'Mes':
				           if ( url != '' ) url += '&' + s.elements[ i ].name + '=' + escape ( s.elements[ i ].value ); else url = s.elements[ i ].name + '=' + escape ( s.elements[ i ].value );
				    break;
		            case 'Anio':
				           if ( url != '' ) url += '&' + s.elements[ i ].name + '=' + escape ( s.elements[ i ].value ); else url = s.elements[ i ].name + '=' + escape ( s.elements[ i ].value );
				    break;
		            case 'Pais':
				           if ( url != '' ) url += '&' + s.elements[ i ].name + '=' + escape ( s.elements[ i ].value ); else url = s.elements[ i ].name + '=' + escape ( s.elements[ i ].value );
				    break;
		            case 'Otro':
				           if ( url != '' ) url += '&Pais=' + escape ( s.elements[ i ].value ); else url = s.elements[ i ].name + '=' + escape ( s.elements[ i ].value );
				    break;
		            case 'Estado':
				           if ( url != '' ) url += '&' + s.elements[ i ].name + '=' + escape ( s.elements[ i ].value ); else url = s.elements[ i ].name + '=' + escape ( s.elements[ i ].value );
				    break;
		            case 'Edo':
				           if ( url != '' ) url += '&Estado=' + escape ( s.elements[ i ].value ); else url = s.elements[ i ].name + '=' + escape ( s.elements[ i ].value );
				    break;
		            case 'CP':
				           if ( url != '' ) url += '&' + s.elements[ i ].name + '=' + escape ( s.elements[ i ].value ); else url = s.elements[ i ].name + '=' + escape ( s.elements[ i ].value );
				    break;
		            case 'Nick':
				           if ( url != '' ) url += '&' + s.elements[ i ].name + '=' + escape ( s.elements[ i ].value ); else url = s.elements[ i ].name + '=' + escape ( s.elements[ i ].value );
				    break;
			      }
		      }
		   }
		   window.frames['control'].location.href='/cgi-bin/pasaport.sh/html/usuarios_n.html?'+url+'&idA='+s.idA.value;
	    }
		else {
		      alert('Ingrese un Nick a evaluar!.');
			  s.Nick.focus();
		}
     }
	 
 /*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*
 *																    *
 *	Funcion: Pone el foco en el objeto que se le indique            *
 *	Fecha: 17-Junio-06										        *
 *															        *
 *	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*/	 
	 
      function _onFocus ( s ) {
//        alert('entro a _onFocus');
           if ( document.getElementById ) { // NS6+
                target   = document.getElementById( s );
           } 
		   else 
		      if ( document.all ) { // IE4+
                target   = document.all[ s ];
              }
		
		   if ( target ) {
		        if ( ! ( target.disabled ) )
		             target.focus();
		   }
      }

 /*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*
 *																    *
 *	Funcion: Redirecciona a nua página específica                   *
 *	Fecha: 17-Junio-06										        *
 *															        *
 *	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*/
 
      function _onR ( s , u , z , numpag ) {
	  
	      //alert("enbloga te agradece tu participación");
		  
		  // var i = trim(s.irPag.value);
		  
		  var i = _Trim(s.irPag.value);

          //alert(i);
		   
		  //i = trim(i);

		  
	      if(_isNumerico( i ) == false) {
             s.irPag.focus();
            return; 
	      }
		  
		  // alert("Es un número");
		  
		  /*
		  if (trim( i ) == '' ) {
			  alert('Ingrese un número de página válido');
			 s.irPag.focus();
			 return;			  
		  }
		  */
		  
		  if ( parseInt ( i ) > numpag || parseInt( i ) <= 0 ) {
		     alert('No Existe la Pagina');
			 s.irPag.focus();
			 return;
		  }
		  else 
		      if ( z == '1' ) {
			     // alert (" redireccionamiento 1 ");
		         document.location.href = '/paginas/enbloga/' + u + '/red/LM' + u + '_' + i + '.html';
			  }	 
			  else {
		         document.location.href = '/paginas/enbloga/' + u + '/red/LM' + u + '_' + i + 'V.html';			  
			  }	 
		  
	  }

	  
	  
/* * * * ** * * * **  * * *	  
* Función : _Trim                                              
* Remueve los espacios.	  
* 21 de Septimbre 2006  	  
* Manrique Montalvo	  
**********************************************************/
	  
	  

function _Trim( str ) {
var resultStr = "";

resultStr = TrimLeft(str);
resultStr = TrimRight(resultStr);

return resultStr;
}



function TrimLeft( str ) {
var resultStr = "";
var i = len = 0;
// Return immediately if an invalid value was passed in
if (str+"" == "undefined" || str == null) 
return null;
// Make sure the argument is a string
str += "";
if (str.length == 0) 
resultStr = "";
else { 
// Loop through string starting at the beginning as long as there
// are spaces.
// len = str.length - 1;
len = str.length;

while ((i <= len) && (str.charAt(i) == " "))
i++;
// When the loop is done, we're sitting at the first non-space char,
// so return that char plus the remaining chars of the string.
resultStr = str.substring(i, len);
}
return resultStr;
}







function TrimRight( str ) {
var resultStr = "";
var i = 0;
// Return immediately if an invalid value was passed in
if (str+"" == "undefined" || str == null) 
return null;
// Make sure the argument is a string
str += "";

if (str.length == 0) 
resultStr = "";
else {
// Loop through string starting at the end as long as there
// are spaces.
i = str.length - 1;
while ((i >= 0) && (str.charAt(i) == " "))
i--;

// When the loop is done, we're sitting at the last non-space char,
// so return that char plus all previous chars of the string.
resultStr = str.substring(0, i + 1);
}

return resultStr; 
}
  
	  
	  
	  
	  
	  
	  
	  
 /*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*
 *																    *
 *	Funcion: Cookie								                    *
 *	Fecha: 17-Junio-06										        *
 *															        *
 *	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*/
 	  
      function llamacookie(){
	           parent.document.getElementById('control').Document.location.href='/cgi-bin/enblogaB/html/LM1000410.html';
      }
	  
	  
 /*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*
 *																*
 *	Funcion: Valida que el código postal se haya obtenido bien  *
 *	Fecha: 05-Junio-06										    *
 *																*
 *	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*/
 
     function _onFinal_2 ( s , pag ) {

	    var campo1 = window.parent.frames['caracter'].document.forms['campos'].campo_1.value;
		var campo2 = window.parent.frames['caracter'].document.forms['campos'].campo_2.value;
		
        if ( _onFinal ( s , pag , 3 ) ) {

		    if ( ! ( _oncompara ( campo1 , campo2 ) ) ) {
			    alert('Clave errónea intente nuevamente. Recuerda que es sensible a mayúsculas y minúsculas.');
                window.parent.frames['caracter'].document.campos.letras.focus();
				window.parent.frames['caracter'].document.campos.letras.select();
			}
			else {
			   window.document.frames['vuer'].location.href = '/cgi-bin/pasaport.sh/html/vuer.html?em='+s.Correo.value+'&idA='+s.idA.value+'&cVN='+s.cVN.value
			}
		}
     }
	 

     function _onFinal_3 ( s , pag ) {

	    var campo1 = window.parent.frames['caracter'].document.forms['campos'].campo_1.value;
		var campo2 = window.parent.frames['caracter'].document.forms['campos'].campo_2.value;
		
        if ( _onFinal ( s , pag , 3 ) ) {

		    if ( ! ( _oncompara ( campo1 , campo2 ) ) ) {
			    alert('Clave errónea intente nuevamente. Recuerda que es sensible a mayúsculas y minúsculas.');
                window.parent.frames['caracter'].document.campos.letras.focus();
				window.parent.frames['caracter'].document.campos.letras.select();
			}
			else {
			   window.document.frames['vuer'].location.href = '/cgi-bin/pasaport.sh/html/vuer2.html?em='+s.Correo.value+'&idA='+s.idA.value+'&cVN='+s.cVN.value
			}
		}
     }

 /*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*
 *																*
 *	Funcion: Valida que sea numérico el valor del texto         *
 *	Fecha: 06-Julio-06										    *
 *																*
 *	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*/
 
     function _isNumerico ( s ) {
		 
		if(isNaN(s)) {
			alert('El valor debe ser numérico.');
			return false; 
		}
		
		return true;
   
     }
	 
 /*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*
 *																*
 *	Funcion: Cambia el estatus de los checkbox encontrados en   *
 *			 la forma.											*
 *	Fecha: 31-Agosto-06										    *
 *																*
 *	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*/
 
     function _on_STDT ( s , k ) {
       for ( i = 0 ; i < s.length ; i++ ) {
	     if ( s.elements[ i ].type == 'checkbox' )
		      s.elements[ i ].checked = k;
	   }
     }
	 
 /*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*
 *																*
 *	Funcion: Se lleva los valores								*
 *	Fecha: 31-Agosto-06										    *
 *																*
 *	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*/
 	 
     function _on_DTST ( f ) {
   
       var INV='',PET='';
	   
       for ( i = 0 ; i < f.length ; i++ ) {
	       if ( f.elements[ i ].type == 'checkbox' && f.elements[ i ].checked  ) {
              if ( f.elements[ i ].id == 'I' ) {
			     if ( INV != '' )
				      INV += ',' + f.elements[ i ].value;
				 else
				      INV  = f.elements[ i ].value;
		   	  }
			  else {
			     if ( PET != '' )
				      PET += ',' + f.elements[ i ].value;
				 else
				      PET  = f.elements[ i ].value;			  
			  }
		   }
	   }
	   
	   if ( INV == '' && PET == '' )
	     alert('No existe ningún contacto seleccionado. Intente nuevamente.');
	   else {
	     if (confirm('¿Estas seguro de enviar la invitación a los contactos seleccionados?')) {
	         f.IN.value = INV;
	         f.PE.value = PET;
	         f.submit();
	     }
	   }
     }
