/* MuestraBanner()   -->   DESPLIEGA BANNERS, Recibe como parametro:  ID, Archivo, Link, Width, Height  */function MuestraBanner(ID, Archivo, Link, Width, Height, Ventana) {     var myRe = /.[sS][wW][fF]/;      var EsFlash = myRe.test(Archivo);      if (EsFlash){        document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ');        document.write(' codebase="http://active.macromedia.com/flash4/cabs/swflash.cab#version=4,0,0,0" ');        document.write(' id="' + ID + '" width="' + Width +'" height="' + Height +'"> ');        document.write(' <param name="movie" value="' +  Archivo + '"> ');        document.write(' <param name="quality" value="high"> ');        document.write(' <embed name="' + ID + '"  src="' + Archivo + '" quality="high" ');        document.write(' width="' + Width +'" height="' + Height +'"  type="application/x-shockwave-flash" ');        document.write(' pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">');             document.write('</embed></object><BR>');     }     else {        var Liga = Trim(Link);       if ( (Liga == undefined) ||  (Liga == null) || (Liga.length == 0) || (Liga.toUpperCase()  == "NO") )            document.write('<IMG  src="' + Archivo + '"><BR>');       else{            var Nueva = Trim(Ventana);            var target= "";                          if ( (Nueva  == undefined) ||  (Nueva  == null) || (Nueva.length == 0) || (Nueva.toUpperCase()  == "SI") )  //  Si llega vac\u00EDo el campo o dice SI, abro ventana nueva                   var target= "target=\"_blank\"";                               document.write('<A href="' + Link + '" ' +  target + '>');             document.write('<IMG  src="' + Archivo + '"></A><BR>');        }   } }/* version anterior de MuestraBanner, NO LA USO*/function MuestraBannerO (ID, Archivo, Link, Width, Height ) {     var myRe = /.[sS][wW][fF]/;      var EsFlash = myRe.test(Archivo);      if (EsFlash){        document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ');        document.write(' codebase="http://active.macromedia.com/flash4/cabs/swflash.cab#version=4,0,0,0" ');        document.write(' id="' + ID + '" width="' + Width +'" height="' + Height +'"> ');        document.write(' <param name="movie" value="' +  Archivo + '"> ');        document.write(' <param name="quality" value="high"> ');        document.write(' <embed name="' + ID + '"  src="' + Archivo + '" quality="high" ');        document.write(' width="' + Width +'" height="' + Height +'"  type="application/x-shockwave-flash" ');        document.write(' pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">');             document.write('</embed></object><BR>');     }     else {        var Liga = Trim(Link)       if ( (Liga == undefined) ||  (Liga == null) || (Liga.length == 0) || (Liga.toUpperCase()  == "NO") )            document.write('<IMG  src="' + Archivo + '"><BR>');       else{            document.write('<A href="' + Link + '"  target="_blank">');             document.write('<IMG  src="' + Archivo + '"></A><BR>');        }   } }/*  Compartir()   --> ENVIA LINK y TITULO  A COMPARTIR,  Recibe Red Social y Link  */function Compartir(Red) {     u=location.href;      t=document.title;          if (Red == "Facebook"){        window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'conparte','toolbar=0,status=0,width=650,height=450');     } else if(Red == "Twitter"){         window.open('http://twitter.com/home/?status='+ encodeURIComponent(t) + '%20' + encodeURIComponent(u),'comparte','toolbar=0,status=0,width=650,height=450');     }       return false;}/*  mostrardiv() y cerrar()   --> MUESTRA Y OCULTA TEXTO,  Recibe el id del DIV  */function mostrardiv(id) {div = document.getElementById(id);div.style.display = 'block';}function cerrar(id) {div = document.getElementById(id);div.style.display='none';}function Fecha(){      var fecha = new Date();      var nSem = fecha.getDay();      var Dia = fecha.getDate();      var nMes = fecha.getMonth();      var Ano = fecha.getYear();      switch(nMes){	case 0:  Mes = "Enero"; break;	case 1:  Mes = "Febrero"; break;	case 2:  Mes = "Marzo"; break;	case 3:  Mes = "Abril"; break;	case 4:  Mes = "Mayo"; break;	case 5:  Mes = "Junio"; break;	case 6:  Mes = "Julio"; break;	case 7:  Mes = "Agosto"; break;	case 8:  Mes = "Septiembre"; break;	case 9:  Mes = "Octubre"; break;	case 10: Mes = "Noviembre"; break;	case 11: Mes = "Diciembre"; break;       }	   if (Ano < 1900)     Ano = Ano+1900    document.write(Mes+' '+Dia+', '+Ano);    }/*   replaceChars --> REMPLAZA CARACTERES RAROS EN UN NOMBRE  (Se usa para armar "area o secci\u00F3n en la que estamos dentro del sitio" y enviar como par\u00E1metro a CERTIFICA ) */function replaceChars(entry) {	// letras originales  var oldChars=new Array("\u00E1","\u00E9","\u00ED","\u00F3","\u00FA","\u00F1"," ","\u00C1","\u00C9","\u00CD","\u00D3","\u00DA","\u00D1","-","/",",",";",".",":","&","$","\u00BF","?","\u00A1","!","(",")","'"); 	// letras nuevas    var newChars=new Array("a","e","i","o","u","n","_","A","E","I","O","U","N","_","_","","","","","y","","","","","","","","","",""); //  letras nuevas   temp = "" + Trim(entry);   if  (temp.length >50) {       temp = "" + Trim(temp.substring(0,50));   }   totalChars = oldChars.length;    // loop para buscar cada caracter a cambiar   for(i = 0; i < totalChars; i++){	// mientras encuentre alguno de los caracteres a cambiar	while (temp.indexOf(oldChars[i])>-1)	{		//pos = posicion de la coincidencia		pos=temp.indexOf(oldChars[i]);		// toma del principio hasta la primera coincidencia, a\u00F1ade el caracter de reemplazo, y toma el resto de cadena		temp = "" + (temp.substring(0, pos) + newChars[i] + temp.substring((pos + oldChars[i].length), temp.length));	}    }	return temp;}/* Trim(), TrimLeft() y TrimRight() --> QUITA ESPACIOS. Recibe como par\u00E1metro la cadena y la regresa sin espacios:*/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;  		 }