var enProceso = false; // lo usamos para ver si hay un proceso activo
var http = getHTTPObject(); // Creamos el objeto XMLHttpRequest
var temp10=0;
var tempDT=0;
var contenedor;
var nContadorDestacados=0;
var sURLCertifica=String("");

var sURLSitio="www.radioformula.com.mx" //Link de donde se baja el archivo XML

function pagnas(val){
	  document.continua.page.value=val;
	  document.continua.submit();
}


function publicidadOrfeon()
{
	   ventanaPub=open('/publicidad/publicidad.asp','window3','scrollbars=0,width=613,height=549');
}

function estacion()
{
	   ventanaRad=open('/estaciones/estaciones.asp','window3','scrollbars=0,width=400,height=200');
}

function fncProd(pValor){
    document.continua.action="/producto.asp";
    document.continua.cve_orfeon.value=pValor;
	document.continua.submit();

}


function muestra_oculta(nombreCapa){
document.getElementById(nombreCapa).style.display="inline";
}

function ocultar_div(nombreCapa){
document.getElementById(nombreCapa).style.display="none";
muestra_oculta('divGen_1');
} 


function div_muestra_oculta(pNameDiv,pId,pForma){

    var sNameDiv=pNameDiv+"_";

    nDivs=pForma.TotDiv.value;


    for (i=0;i<nDivs;i++){
        var divs = document.getElementById(sNameDiv+i);
        //if(i==pId){
        //        divs.style.display="inline";
        //}else{
                divs.style.display="none";
        //}
    }

    document.getElementById(sNameDiv+pId).style.display="inline";;
} 

nPubRot=0;
temp10=0;
window.clearInterval(temp10);


function publi_rota(){
    div_muestra_oculta('divPub',nPubRot,document.frmDivPbc);

    temp10=setInterval("publi_rota_intervalor()",12000);
}

function publi_rota_intervalor(){
    nPubRot=nPubRot+1;
    if ((nPubRot>document.frmDivPbc.TotDiv.value)||(nPubRot==document.frmDivPbc.TotDiv.value)){

        nPubRot=0;
    }
    div_muestra_oculta('divPub',nPubRot,document.frmDivPbc)
}


function selSeccUltNot(pId){
    location.href="/min284.asp?Utn="+pId
/*    if (document.frmUltNot.idUltSecc.value==-1){
        alert("Seleccione una Categoría");
        return;
    }
    
    document.frmUltNot.action="min284.asp";
    document.frmUltNot.submit();
*/    
}


function displayopenx22(idzona){
// funcion de prueba
   document.write (idzona);
   document.write ("se escribio");
}

function fncPaginaForma(pForma,pPagina){
		        pForma.page.value=pPagina;	    
				pForma.submit();
}
function fncGenero(pValor){
    document.busq.bus_gen.value=pValor
    document.busq.submit();

}

function displayopenx(idzona)
{
   var m3_u = (location.protocol=='https:'?'https://201.148.81.114/openx-2.8.1/www/delivery/ajs.php':'http://201.148.81.114/openx-2.8.1/www/delivery/ajs.php');
   var m3_r = Math.floor(Math.random()*99999999999);
   //var idzona = 1;
   if (!document.MAX_used) document.MAX_used = ',';
   document.write ("<scr"+"ipt type='text/javascript' src='"+m3_u);
   document.write ("?zoneid="+ idzona +"&amp;block=1");
   document.write ('&amp;cb=' + m3_r);
   if (document.MAX_used != ',') document.write ("&amp;exclude=" + document.MAX_used);
   document.write (document.charset ? '&amp;charset='+document.charset : (document.characterSet ? '&amp;charset='+document.characterSet : ''));
   document.write ("&amp;loc=" + escape(window.location));
   if (document.referrer) document.write ("&amp;referer=" + escape(document.referrer));
   if (document.context) document.write ("&context=" + escape(document.context));
   if (document.mmm_fo) document.write ("&amp;mmm_fo=1");
   document.write ("'><\/scr"+"ipt>");
   }
   
function validaDatosEsc(){
		if(IsBlank(document.comentarios.nombre.value)){
			alert("Proporcione su Nombre");
			document.comentarios.nombre.value="";
			document.comentarios.nombre.focus();
			return;
		}
		
		if (!Esmail(document.comentarios.email1.value)){
			alert("Proporcione un Correo válido");
			document.comentarios.email1.value="";
			document.comentarios.email1.focus();
			return;

        }


		if(IsBlank(document.comentarios.sCome.value)){
			alert("Proporcione su Comentario");
			document.comentarios.sCome.value="";
			document.comentarios.sCome.focus();
			return;
		}
		
			sLista="áéíóúüabcdefghijklmñnopqrstuvwxyz1234567890.,;:_ ¿? /¡!*-()%$";


        if (!esCaracterPermitido(sLista,document.comentarios.sCome.value)){
			alert("Sólo se permiten caracteres alfanumericos. No se permite dar Enter");
			document.comentarios.sCome.focus();
        	return;

        }


		document.comentarios.submit();
    
}


function validaDatosReg(){
		if(IsBlank(document.comentarios.nombre.value)){
			alert("Proporcione su Nombre");
			document.comentarios.nombre.value="";
			document.comentarios.nombre.focus();
			return;
		}

		sLista="áéíóúüabcdefghijklmñnopqrstuvwxyzëï' ";
        if (!esCaracterPermitido(sLista,document.comentarios.nombre.value)){
			alert("Sólo se permiten caracteres alfanumericos.");
			document.comentarios.nombre.focus();
        	return;

        }

		
		if (!Esmail(document.comentarios.email1.value)){
			alert("Proporcione un Correo válido");
			document.comentarios.email1.value="";
			document.comentarios.email1.focus();
			return;

        }


		sLista="0123456789abcdefghijklmnopqrstuvwxyz_@.-'";
        if (!esCaracterPermitido(sLista,document.comentarios.email1.value)){
			alert("Sólo se permiten caracteres alfanumericos.");
			document.comentarios.email1.focus();
        	return;

        }



		document.comentarios.submit();
    
}


function fncBusOpcion(pOpcion){
    document.frmBusca.mulPage.value=0;
    document.frmBusca.sBusOpc.value=pOpcion;
    document.frmBusca.submit();
}


function Esmail(Dato){

		CadenaNumeros = new String('@');
		CadenaNumeros1 = new String('.');
		CadenaPuntoComa = new String(';');
		sUltimoCaracter="";
		CadenaComa = new String(',');
		var nContadorPuntoComa=0;
		var nContadorArrobas=0;
		var punto;
		var arroba;
		cadena = new String(Dato);
		for (var i=0; i < cadena.length; i++) {
		sUltimoCaracter=cadena.charAt(i);
		if(cadena.charAt(i)==" "){
		return false;
		}
		if(cadena.charAt(i)==","){
		return false;
		}
		if (CadenaNumeros.indexOf(cadena.charAt(i)) != -1) {
		arroba="true";
		nContadorArrobas=nContadorArrobas+1
		}
		if (CadenaNumeros1.indexOf(cadena.charAt(i)) != -1) {
		punto="true";}
		if (CadenaPuntoComa.indexOf(cadena.charAt(i)) != -1) {
		nContadorPuntoComa=nContadorPuntoComa+1;
		}

		}

        if(nContadorPuntoComa>0||nContadorArrobas>1){

            return false;
        }		

        if (nContadorPuntoComa==0 && TieneCaracteresEspecialesClaves(sUltimoCaracter)){
            return false;

        }
		
		if (arroba=="true" && punto=="true"){
		    return true
		}
    return false;
}



function TieneCaracteresEspecialesClaves(pValor){/* Verifica si el parametro indicado tiene caracteres especiales*/
   var objRegExp = /\W/;
   if(objRegExp.test(pValor)){

	   return true;			
}
	return false;		
}


function fncRotarDes(pId,pIdC,pEjec){


        window.clearInterval(tempDT);
        tempDT=setInterval("CmImgDes("+pId+","+pIdC+")",12000);


}



function fncDstCarga(pId,pIdC){
        sImagen="";
        sResumen="";
        sFuente="";

        //alert(pId)
            //if (pId>=eval("arrEtiquetasDes_"+pIdC+".length")){
            //    pId=0;
            //}

            if (pId>=parseFloat(eval("arrEtiquetasDes_"+pIdC+".length"))){
                pId=0;
            }else{
                                               
                sArr=String(eval("arrEtiquetasDes_"+pIdC+"["+pId+"][0]"));

                sInf=sArr.split("|^|");
                if(sInf.length>0){
                    sImagen=sInf[0];
                }
                if(sInf.length>1){
                    sFuente=sInf[1];
                }            


                sResumen=String(eval("arrEtiquetasDes_"+pIdC+"["+pId+"][1]"));

                if (sImagen!=""){
                    document.images["sImgDT"].src="/images/notas/"+sImagen;
                }
                
                
                if (sFuente!=""){
                    sFuente=sFuente+"&nbsp;"
                }        
                
                document.getElementById("sFueDT").innerHTML = sFuente;
                document.getElementById("sResDT").innerHTML = sResumen;
                
                pId=parseFloat(pId)+1;
                
                if (pId>=parseFloat(eval("arrEtiquetasDes_"+pIdC+".length"))){
                    pId=0;
                }

            }

            fncRotarDes(pId,pIdC,"1");
            



}

function CmImgDes(pId,pIdC){


    if (typeof ("arrEtiquetasDes_"+pIdC) == "undefined"){
        window.clearInterval(tempDT);
        nContadorDestacados=0;

    }else{

        fncDstCarga(pId,pIdC);
    }
}


function CmImgDes2222(pId,pIdC){
    if (typeof ("arrEtiquetasGral_"+pIdC) == "undefined"){
        nContadorDestacados=0;
    }else{
        sImagen="";
        sResumen="";
        sFuente="";
        nContadorDestacados=pIdC;
        if(pIdC==0){
        
            sArr=String(arrEtiquetasDes_0[pId][0]);
            sInf=sArr.split("|^|");
            if(sInf.length>0){
                sImagen=sInf[0];
            }
            if(sInf.length>1){
                sFuente=sInf[1];
            }            
            
            
            sResumen=arrEtiquetasDes_0[pId][1];

        }

        if(pIdC==2){
            sArr=String(arrEtiquetasDes_2[pId][0]);
            sInf=sArr.split("|^|");
            if(sInf.length>0){
                sImagen=sInf[0];
            }
            if(sInf.length>1){
                sFuente=sInf[1];
            } 
            sResumen=arrEtiquetasDes_2[pId][1];

        }
        
        if(pIdC==3){
            sArr=String(arrEtiquetasDes_3[pId][0]);
            sInf=sArr.split("|^|");
            if(sInf.length>0){
                sImagen=sInf[0];
            }
            if(sInf.length>1){
                sFuente=sInf[1];
            }  

            sResumen=arrEtiquetasDes_3[pId][1];

        }
        
        if(pIdC==4){
            sArr=String(arrEtiquetasDes_4[pId][0]);
            sInf=sArr.split("|^|");
            if(sInf.length>0){
                sImagen=sInf[0];
            }
            if(sInf.length>1){
                sFuente=sInf[1];
            }  


            sResumen=arrEtiquetasDes_4[pId][1];

        }
        if(pIdC==5){
            sArr=String(arrEtiquetasDes_5[pId][0]);
            sInf=sArr.split("|^|");
            if(sInf.length>0){
                sImagen=sInf[0];
            }
            if(sInf.length>1){
                sFuente=sInf[1];
            }  

            sResumen=arrEtiquetasDes_5[pId][1];

        }
        if (sImagen!=""){
            document.images["sImgDT"].src="/images/notas/"+sImagen;
        }
        
        
        if (sFuente!=""){
            sFuente=sFuente+"&nbsp;"
        }        
        
        document.getElementById("sFueDT").innerHTML = sFuente;
        
        document.getElementById("sResDT").innerHTML = sResumen;
    }    
}



function CmImg(pId,pIdC){
    if (typeof ("arrEtiquetasGral_"+pIdC) == "undefined"){
    }else{
        sImagen="";
        sResumen=""
        if(pIdC==0){
            sImagen=arrEtiquetasGral_0[pId][0];
            sResumen=arrEtiquetasGral_0[pId][1];

        }

        if(pIdC==2){
            sImagen=arrEtiquetasGral_2[pId][0];
            sResumen=arrEtiquetasGral_2[pId][1];

        }
        if(pIdC==3){
            sImagen=arrEtiquetasGral_3[pId][0];
            sResumen=arrEtiquetasGral_3[pId][1];

        }
        
        if(pIdC==4){
            sImagen=arrEtiquetasGral_4[pId][0];
            sResumen=arrEtiquetasGral_4[pId][1];

        }
        if(pIdC==5){
            sImagen=arrEtiquetasGral_5[pId][0];
            sResumen=arrEtiquetasGral_5[pId][1];

        }
        if (sImagen!=""){
            document.images["sImgFT"].src="/images/fotogaleria/"+sImagen;
        }
        document.getElementById("sResFT").innerHTML = sResumen;
    }    
}


function fncLomas(pId,pIdOpc) {



    contenedor = document.getElementById('contLomas');

    for(m=0;m<4;m++){
        sSEL="";
        if (parseFloat(m)==parseFloat(pIdOpc)){
            sSEL="sel";
        }  
        document.images["imLM_"+m].src="/images/general/lomas/"+sSEL+"lm_"+m+".gif";
    }

        if (!enProceso && http) {

          //document.images["imLM_"+pId].src="/images/general/sellm_"+pId+".gif";

           http.open("GET", "/include/2333.asp?idScc="+pId+"&idOp="+pIdOpc, true);                
           http.onreadystatechange = handleHttpResponse;
           enProceso = true;
           http.send(null);


        }
        


}

function fncAsigImg(pId,pIdRel,pIdCat,pCarpeta,pCampo){

        sSEL="";
        if (parseFloat(pIdRel)==parseFloat(pId)){
            sSEL="sel";
            
            sTituSe="Ver todas las notas"
            if(pIdCat==1)
                sTituSe="Ver Información de Finanzas";
                
            if(pIdCat==2)
                sTituSe="Ver Información de Noticias";
                
            if(pIdCat==3)
                sTituSe="Ver Información de Deportes";
                
            if(pIdCat==4)
                sTituSe="Ver Información de Espectáculos";
                
            if(pIdCat==5)
                sTituSe="Ver Información de Sociedad";
                
            if(pIdCat==50)
                sTituSe="Ver Información de Salud";

            if(pIdCat==6)
                sTituSe="Ver Información de DF";

            if(pIdCat==7)
                sTituSe="Ver Información de Estados";

            if(pIdCat==9)
                sTituSe="Ver Información de Internacional";

            if(pIdCat==26)
                sTituSe="Ver Información de Nacional";

            if(pIdCat==10)
                sTituSe="Ver Información de Política";




            document.getElementById('LigaContULT').innerHTML = "/ <a class='selUltPrograma' href='javascript:selSeccUltNot("+pIdCat+")'>"+sTituSe+"</a> /&nbsp;&nbsp;";


        }  
        document.images["im"+pCampo.toUpperCase()+"_"+pIdRel].src="/images/general/"+pCarpeta+"/"+sSEL+pCampo+"_"+pIdRel+".gif";
        
            
            


}

function fncULT(pId) {



    contenedor = document.getElementById('contULT');

    /*for(m=0;m<6;m++){
        sSEL="";
        if (parseFloat(m)==parseFloat(pId)){
            sSEL="sel";
        }  
        document.images["imLM_"+m].src="/images/general/lomas/"+sSEL+"lm_"+m+".gif";
    }
    
    fncAsigImg(pId,0,0,"ultimas","ul");
    fncAsigImg(pId,26,2,"ultimas","ul");
    fncAsigImg(pId,9,2,"ultimas","ul");
    fncAsigImg(pId,10,2,"ultimas","ul");
    fncAsigImg(pId,7,2,"ultimas","ul");
    fncAsigImg(pId,3,3,"ultimas","ul");
    fncAsigImg(pId,4,4,"ultimas","ul");
    fncAsigImg(pId,5,5,"ultimas","ul");
    fncAsigImg(pId,50,50,"ultimas","ul");
    */


    fncAsigImg(pId,0,0,"ultimas","ul");
    fncAsigImg(pId,26,26,"ultimas","ul");
    fncAsigImg(pId,9,9,"ultimas","ul");
    fncAsigImg(pId,10,10,"ultimas","ul");
    fncAsigImg(pId,7,7,"ultimas","ul");
    fncAsigImg(pId,3,3,"ultimas","ul");
    fncAsigImg(pId,4,4,"ultimas","ul");
    fncAsigImg(pId,5,5,"ultimas","ul");
    fncAsigImg(pId,50,50,"ultimas","ul");


        if (!enProceso && http) {

          //document.images["imLM_"+pId].src="/images/general/sellm_"+pId+".gif";

           http.open("GET", "/include/2444.asp?idScc="+pId, true);                
           http.onreadystatechange = handleHttpResponse;
           enProceso = true;
           http.send(null);


        }
        


}



function verificaEncuesta() {
    sSel=0;
    contenedor = document.getElementById('campoMensaje');
    for(i=0;i<document.frmEncuesta.idResSel.length;i++){
        if(document.frmEncuesta.idResSel[i].checked){
            sSel=document.frmEncuesta.idResSel[i].value;
        }
    }




    if(sSel==0){
        alert("Seleccione una opcion");
        return;
    }else{

        sLista="áéíóúüabcdefghijklmñnopqrstuvwxyz1234567890 ";
        EcNom="";
        if (typeof(document.frmEncuesta.EcNom)!="undefined"){
            
                if(IsBlank(document.frmEncuesta.EcNom.value)){
			            alert("Proporcione su Nombre");
			            document.frmEncuesta.EcNom.value="";
			            document.frmEncuesta.EcNom.focus();
			            return;
	            }

                if (!esCaracterPermitido(sLista,document.frmEncuesta.EcNom.value)){
			            alert("Sólo se permiten caracteres alfanumericos");
			            document.frmEncuesta.EcNom.focus();
        	            return;

                } 
                
                EcNom=document.frmEncuesta.EcNom.value;          
        }

        EcEmail=""

        if (typeof(document.frmEncuesta.EcEmail)!="undefined"){

	            if (!Esmail(document.frmEncuesta.EcEmail.value)){
		                 alert("Proporcione un Correo válido");
			             document.frmEncuesta.EcEmail.value="";
			             document.frmEncuesta.EcEmail.focus();
			             return;
                }
                EcEmail=document.frmEncuesta.EcEmail.value;
        }   

        if (!enProceso && http) {

           //var valor = escape(document.getElementById("idEc").value);
           var url = "/include/43280.asp?idEc="+document.frmEncuesta.idEc.value+"&idRs="+sSel+"&EcNom="+EcNom+"&EcEmail="+EcEmail;
           http.open("GET", url, true);
           http.onreadystatechange = handleHttpResponse;
           enProceso = true;
           http.send(null);
        }
     }
}

function handleHttpResponse2() { 

    if (http.readyState == 4) { 
       if (http.status == 200) { 

          if (http.responseText.indexOf('invalid') == -1) {
             // Armamos un array, usando la coma para separar elementos
             
             //sTexto=unescape(http.responseText);
             sTexto=http.responseText;
             results = sTexto.split(","); 
             document.getElementById("campoMensaje").innerHTML = results[0]; //
             enProceso = false;
          }
       }
    }
}

function handleHttpResponse(){
           
                if (http.readyState == 4) { 
                   if (http.status == 200) { 

                      if (http.responseText.indexOf('invalid') == -1) {
                            sTexto=http.responseText;
                            results = sTexto.split(","); 
                            contenedor.innerHTML = unescape(sTexto);
                            enProceso = false;
                      }
                   }
                }
}

function getHTTPObject() {
    var xmlhttp;
    /*@cc_on
    @if (@_jscript_version >= 5)
       try {
          xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
       } catch (e) {
          try {
             xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
          } catch (E) { xmlhttp = false; }
       }
    @else
    xmlhttp = false;
    @end @*/
    if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
       try {
          xmlhttp = new XMLHttpRequest();
       } catch (e) { xmlhttp = false; }
    }
    return xmlhttp;
}

function fncEscAud(pIdPes,sIdC,pId){
    location.href="/s08650n.asp?ssSec=audio&sIdC="+sIdC+"&idPes="+pIdPes+"&idMul="+pId;
}
function fncVerVid(pIdPes,sIdC,pId){
    location.href="/s08650n.asp?ssSec=video&sIdC="+sIdC+"&idPes="+pIdPes+"&idMul="+pId;
}


 function selProgramacionCarr(){
    window.parent.location.href="/s04410n.asp?sIdC="+document.frmSelCarr.selCarr.value;
 }
 function selProgramacionPer(){
    window.parent.location.href="/s04410n.asp?sIdC="+document.frmSelCarr.selPer.value;
 }

 function selProgramacionPerSF(pPar){
    location.href="/s04410n.asp?sIdC="+pPar;
 }

function teleFormula(){
	if (AC_FL_RunContent == 0) {
		alert("This page requires AC_RunActiveContent.js.");
	} else {
		AC_FL_RunContent(
			'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
			'width', '320',
			'height', '270',
			'src', 'LiveVideo320x240',
			'quality', 'high',
			'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
			'align', 'middle',
			'play', 'true',
			'loop', 'true',
			'scale', 'showall',
			'wmode', 'window',
			'devicefont', 'false',
			'id', 'LiveVideo320x240',
			'bgcolor', '#ffffff',
			'name', 'LiveVideo320x240',
			'menu', 'true',
			'allowFullScreen', 'true',
			'allowScriptAccess','sameDomain',
			'movie', 'LiveVideo320x240',
			'salign', ''
			); //end AC code
	}
}

function _version ()
{
  _version=11;
  if (navigator.userAgent.indexOf('Mozilla/3') != -1){
  _version=10;} 
}

var oas='http://ads.radioformula.com.mx/RealMedia/ads/';
var site = "www.radioformula.com.mx";
var RN = new String (Math.random());
var RNS = RN.substring (2, 11);

function DisplayAds (page, position, width, height)
{
	var oaspage= site + '/' + page +'/1' + RNS +'@' + position;

	if (_version < 11) {
	document.write ('<A HREF="' + oas + 'click_nx.cgi/'+ oaspage + '" TARGET="_top" ><IMG SRC="' + oas + 'adstream_nx.cgi/' + oaspage + '" BORDER="0" WIDTH="' + width + '" HEIGHT="' + height + '"></a>');
	}
	else
	{
		document.write ('<'+'SCRIPT LANGUAGE="JavaScript1.1" SRC="' + oas + 'adstream_jx.cgi/' + oaspage + '">');
		document.write ('\<\!-- --\>');
		document.write ('\<\/SCRIPT\>');
 	   document.write ('\<\!-- --\>');
	}
}




/*Funcion de Fecha para la nueva versión */

function despliegas(variable,ancho,alto,barr) {
if (!barr) v_bar=0; else v_bar=1;
window.open(variable,"Online","scrollbars="+v_bar+",resizable=yes,width="+ancho+",height="+alto);
}


        function validaDatosAV(){
 		    if(IsBlank(document.forms.frmForma.tex_Archivo.value)){
			    alert("Proporcione el nombre del archivo");
			    document.frmForma.tex_Archivo.value="";
			    document.frmForma.tex_Archivo.focus();
			    return;
		    }

            sLista="abcdefghijklmnopqrstuvwxyz_1234567890";

 		    if(!esCaracterPermitido(sLista,document.frmForma.tex_Archivo.value)){
 		        alert("Sólo se permiten caracteres alfanumericos y guion bajo. Por ejemplo: 080908_tpm")
			    document.frmForma.tex_Archivo.focus();
			    return;
		    }

 		    if(document.forms.frmForma.sExt.value==""){
			    alert("Seleccione la extensión del archivo");
			    document.frmForma.sExt.focus();
			    return;
		    }

 		    if(IsBlank(document.forms.frmForma.tex_Titulo.value)){
			    alert("Proporcione el Titulo");
			    document.frmForma.tex_Titulo.value="";
			    document.frmForma.tex_Titulo.focus();
			    return;
		    }


 		    if(IsBlank(document.forms.frmForma.tex_Titulo.value)){
			    alert("Proporcione el Titulo");
			    document.frmForma.tex_Titulo.value="";
			    document.frmForma.tex_Titulo.focus();
			    return;
		    }
		    
 		    if(document.forms.frmForma.tex_Titulo.value.length>230){
			    alert("Sólo puede proporcionar 200 caracteres");
			    document.frmForma.tex_Titulo.value=document.frmForma.tex_Titulo.value.substring(0,200);
			    document.frmForma.tex_Titulo.focus();
			    return;
		    }
		    

 		    if(document.forms.frmForma.rad_VideoVideo.value=="V"&&IsBlank(document.forms.frmForma.tex_imagen.value)){
			    alert("Proporcione el nombre de la imagen");
			    document.frmForma.tex_imagen.value="";
			    document.frmForma.tex_imagen.focus();
			    return;
		    }
		    
		    if (document.forms.frmForma.tex_imagen.value!=""){
		        sLista="abcdefghijklmñnopqrstuvwxyz1234567890.";
 		        if(!esCaracterPermitido(sLista,document.forms.frmForma.tex_imagen.value)){
 		            alert("Sólo se permiten caracteres alfanumericos. Por ejemplo: edgar01.jpg")
			        document.frmForma.tex_imagen.focus();
			        return;
		        }
		        arc_sNombreArchivo=document.frmForma.tex_imagen.value.toLowerCase();
		        arrsNombreArchivo=arc_sNombreArchivo.split(".")
			    if(arrsNombreArchivo.length!=2){
				    alert("El nombre del archivo no es correcto");
			        document.frmForma.tex_imagen.focus();
				    return;
			    }
    			
			    if(IsBlank(arrsNombreArchivo[0])){
				    alert("El nombre del archivo no es correcto");
			        document.frmForma.tex_imagen.focus();
				    return;
			    }

			    if(IsBlank(arrsNombreArchivo[1])){
				    alert("La extesión no es correcta");
			        document.frmForma.tex_imagen.focus();
				    return;
			    }
			    
			    if (arrsNombreArchivo[1]!="jpg" && arrsNombreArchivo[1]!="gif" ){
				    alert("Solo se permiten imagenes con la extensión .jpg o .gif");
			        document.frmForma.tex_imagen.focus();
				    return;
			        
			    }
		    }
            document.frmForma.submit();

        }


function playMedia(mediaURL,rpt,height,width,pAuto) {


var mediaURL,rpt,height,width,pAuto


if (GetBrowser() == "IE")
	playAll(mediaURL,rpt,height,width,pAuto) ;  
else if (GetBrowser() == "unknown")
	embedSource(mediaURL,rpt,height,width,pAuto) ;
else if (navigator.appName.substring(0,5) == "WebTV")
	embedSource(mediaURL,rpt,height,width,pAuto) ;
else
	playAll(mediaURL,rpt,height,width,pAuto) ;
}

function embedSource(mediaURL,rpt,height,width,pAuto) {

    var CodeGen = ""
    var mediaURL,rpt,height,width,pAuto
 		 	
	 CodeGen = '<embed src="' + mediaURL + '"' + '\n' ;
	 CodeGen += ' height=' + height + ' width=' + width + ' autostart="'+pAuto+'"' + '\n'
	 CodeGen += ' LOOP=' + rpt + '>'
    document.write(CodeGen)

}

function playAll(mediaURL,rpt,height,width,pAuto) {
		var CodeGen = "" 
					 	

		CodeGen = '<embed type="application/x-mplayer2" ' + '\n' ;
    	CodeGen += ' pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" ' + '\n' ;
	 	CodeGen += 'Name="Player" ' + 'src="' + mediaURL + '" ' + '\n' ;
	 	CodeGen += 'autoStart='+pAuto+' ' ;
		if ((height == 24) && (width == 299)) 
			CodeGen = CodeGen + 'ShowStatusBar=1 '; 
		if ((height >= 50) && (height <= 75) && (width >= 200)) 
			CodeGen = CodeGen + 'ShowStatusBar=1 '; 
		if ((height > 75) && (width >= 150)) 
			CodeGen = CodeGen + 'ShowStatusBar=0 '; 
		if ((height <= 49) && (width != 299))
			CodeGen += 'ShowStatusBar=0 '; 
		CodeGen += 'enableContextMenu=1 cache=0 ' + '\n' ;
		CodeGen += 'playCount=' + rpt + ' ' ;
		CodeGen += 'volume=-1 ' ;
		CodeGen += 'HEIGHT=' + height + ' WIDTH=' + width + '>'
			
			document.write(CodeGen)
	
}

function GetBrowser()
{
   var agt=navigator.userAgent.toLowerCase();
   if( ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1)) )
       return "IE";
   else if( ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
         && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
         && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1)) )
       return "Netscape";
   else
       return "unknown";
}

function abreFotoGal(pAnio,pGal){
		abreVentana('/fotogaleria/rfg2000.asp?pAnio='+pAnio+"&pGal="+pGal,920,670,0,0,0,0)

}


function fncGeneral(pId){

		abreVentana('/general.asp?idLs='+pId,280,370,0,0,1,0)

}

function abreVentana(pagina,ancho,alto,ptoolbar,pmenubar,pscrollbars,presizable){
		var1="width="+ancho+",height="+alto+",toolbar="+ptoolbar+",location=no,directories=no,status=no,menubar="+pmenubar+",scrollbars="+pscrollbars+",resizable="+presizable
        ventanaOp=window.open(pagina,"Acceso", var1);
        ventanaOp.resizeTo(Width=ancho,Height=alto)
        ventanaOp.focus();
}

function Arreglo(){
  this.length = Arreglo.arguments.length 
  for (var i = 0; i < this.length; i++)
    this[i] = Arreglo.arguments[i]
}

function ventana(val){
     ventanaOP=window.open('/audiovideo/video.asp?Idvideo='+val, 'videowindows3', 'toolbar=0, resizable=0, location=0, status =0, scrollbars=0, top=50, left=120, width=712, height=586');
     ventanaOP.focus();
}

function mostrar(pNomDiv,pId,pPagina){ 
    document.frmAudioVideo.action=pPagina;
    iId=0;
    if(document.frmAudioVideo.Idvideo.value!=""&&document.frmAudioVideo.Idvideo.value!="0"){
            iId=document.frmAudioVideo.Idvideo.value;
            document.frmAudioVideo.Idvideo.value=0;
            self.frames["frmContenido"+iId].location.href=pPagina;
            //document.frmAudioVideo.target="frmContenido"+iId            
            //document.frmAudioVideo.submit();
            ocultar(pNomDiv,iId);

    }

    if (parseFloat(iId)!=parseFloat(pId)){
        document.frmAudioVideo.target="frmContenido"+pId;
        document.frmAudioVideo.Idvideo.value=pId;
        document.frmAudioVideo.submit();
        document.getElementById(pNomDiv+pId).style.display="";        

    }   


} 

function ocultar(pNomDiv,pId){ 
    document.getElementById(pNomDiv+pId).style.display="none"; 

} 

function fecha() {
  var ndia  = new Array("Domingo", "Lunes", "Martes", "Mi&eacute;rcoles", "Jueves", "Viernes", "Sabado");
  var nmes  = new Array('enero', 'febrero', 'marzo', 'abril', 'mayo', 'junio', 'julio', 'agosto', 'septiembre', 'octubre', 'noviembre', 'diciembre');
  var ahora;
  var fecha = new Date();
  var ano   = fecha.getYear();
  var mes   = fecha.getMonth();
  var dia   = fecha.getDay();
  var dian  = fecha.getDate();
  if (ano < 200)
  	{ano += 1900;}		
  /*ahora = ndia[dia] + " " + dian + " de " + nmes[mes] + " de " + ano;*/
  //ahora = nmes[mes] + " " + dian + ", " + ano;
  ahora =  ndia[dia] + ", " + dian + " de " + nmes[mes] + " " + ano;
  //return ahora;
  document.write (ahora);
}

function _version ()
{
  _version=11;
  if (navigator.userAgent.indexOf('Mozilla/3') != -1){
  _version=10;} 
}

var oas='http://ads.radioformula.com.mx/RealMedia/ads/';
var site = "www.radioformula.com.mx";
var RN = new String (Math.random());
var RNS = RN.substring (2, 11);



/*Funcion de para los popup de las estaciones on-line */
	function estforaneas (archivo)
	{
	   open('/radio/' + archivo,'window3','scrollbars=0,width=556,height=445');
	}

	function egrupero() {open("/radio/fgrupero.htm","window2","scrollbars=0,width=550,height=445");}
	function ejuvenil() {open("/radio/fjuvenil.htm","window2","scrollbars=0,width=550,height=445");}
	function epop() {open("/radio/fpop.htm","window2","scrollbars=0,width=550,height=445");}
	function einternacional() {open("/radio/finternacional.htm","window2","scrollbars=0,width=550,height=445");}
	function ejazz() {open("/radio/fjazz.htm","window2","scrollbars=0,width=550,height=445");}
	function emexicana() {open("/radio/fmexicana.htm","window2","scrollbars=0,width=550,height=445");}
	function eoldies() {open("/radio/foldies.htm","window2","scrollbars=0,width=550,height=445");}
	function eromantica() {open("/radio/fromantica.htm","window2","scrollbars=0,width=550,height=445");}
	function edkdas() {open("/radio/fdkdas.htm","window2","scrollbars=0,width=550,height=445");}
	function erock() {open("/radio/frock.htm","window2","scrollbars=0,width=550,height=445");}
	function eradioai() {open("/radio/fradioai.htm","window2","scrollbars=0,width=550,height=445");}
	function elacueva() {open("/radio/flacueva.htm","window2","scrollbars=0,width=550,height=445");}
	function eangeles() {open("/radio/fangeles.htm","window2","scrollbars=0,width=550,height=445");}
	function eclasica() {open("/radio/fclasica.htm","window2","scrollbars=0,width=550,height=445");}
	function etrova() {open("/radio/ftrova.htm","window2","scrollbars=0,width=550,height=445");}

	function abremusica() {
	open("/radio/fgrupero.htm","window2","scrollbars=0,width=550,height=445");
	window.close();
	}
	function abrelocales() {
	open("/radio/f1470.htm","window1","scrollbars=0,width=511,height=385");
	window.close();
	}
	function e970() {open("/radio/f970.htm","window1","scrollbars=0,width=511,height=385");}
	function e1470() {open("/radio/f1470.htm","window1","scrollbars=0,width=511,height=385");}
	function e1500() {open("/radio/f1500.htm","window1","scrollbars=0,width=511,height=385");}
	function e1033() {open("/radio/f103.htm","window1","scrollbars=0,width=511,height=385");}
	function e1041() {open("/radio/f104.htm","window1","scrollbars=0,width=511,height=385");}



function valfecha(valores,pFormato)
{
	FechaArr = valores.split("/");
	if (pFormato=="mm/dd/aaaa"){
		DiaFecha = FechaArr[1];
		MesFecha = FechaArr[0];
		AniFecha = FechaArr[2];
	}

	if (pFormato=="dd/mm/aaaa"){
		DiaFecha = FechaArr[0];
		MesFecha = FechaArr[1];
		AniFecha = FechaArr[2];
	}
	
	if (isNaN(parseInt(DiaFecha, 10))){
		alert("Por favor proporcione la fecha correcta, el dia esta incorrecto, el formato es: "+pFormato);
		return false;
	}
	
	if (isNaN(parseInt(MesFecha, 10))){
		alert("Por favor proporcione la fecha correcta, el mes esta incorrecto, el formato es: "+pFormato);
		return false;
	}
	
	if (isNaN(parseInt(AniFecha, 10))){
		alert("Por favor proporcione la fecha correcta, el año esta incorrecto, el formato es: "+pFormato);
		return false;
	}


	if(NoTieneValoresNumericos(DiaFecha)){
		alert("Por favor proporcione la fecha correcta, el dia esta incorrecto, el formato es: "+pFormato);
		return false;
	}


	if(NoTieneValoresNumericos(MesFecha)){
		alert("Por favor proporcione la fecha correcta, el mes esta incorrecto, el formato es: "+pFormato);
		return false;
	}
	

	if(NoTieneValoresNumericos(AniFecha)){
		alert("Por favor proporcione la fecha correcta, el año esta incorrecto, el formato es: "+pFormato);
		return false;
	}
	
	
	if ((DiaFecha<=0) || (DiaFecha>31)) {
		alert("Por favor proporcione la fecha correcta, el dia esta incorrecto, el formato es: "+pFormato);
		return false;
	}
	
	if ((MesFecha<=0) || (MesFecha>12)) {
		alert("Por favor proporcione la fecha correcta, el mes esta incorrecto, el formato es: "+pFormato);
		return false;
	}

	if ((DiaFecha>30)&&((MesFecha==4)||(MesFecha==6)||(MesFecha==9)||(MesFecha==11))){
		alert("Por favor proporcione la fecha correcta, el día esta incorrecto, el formato es: "+pFormato);
		return false;
	}
	
	if ((DiaFecha>30)&&((MesFecha==4)||(MesFecha==6)||(MesFecha==9)||(MesFecha==11))){
		alert("Por favor proporcione la fecha correcta, el día esta incorrecto, el formato es: "+pFormato);
		return false;
	}
	
	if ((DiaFecha>30)&&((MesFecha==4)||(MesFecha==6)||(MesFecha==9)||(MesFecha==11))){
		alert("Por favor proporcione la fecha correcta, el día esta incorrecto, el formato es: "+pFormato);
		return false;
	}
	
	if ((AniFecha<1900) || (AniFecha>9000)) {
		alert("Por favor proporcione la fecha correcta, el año tiene que ser mayor a 1900 y solo puede contener 4 dígitos, el formato es: "+pFormato);
		return false;
	}
	
	if (((AniFecha % 4)!=0)&&(MesFecha==2)&&(DiaFecha>28)) {
			alert("Por favor proporcione la fecha correcta, el día esta incorrecto, el formato es: "+pFormato);
			return false;
	}
	
	if (((AniFecha % 4)==0)&&(MesFecha==2)&&(DiaFecha>29)) {
			alert("Por favor proporcione la fecha correcta, el día esta incorrecto, el formato es: "+pFormato);
			return false;
	}
	
	return true;
 }

function NoTieneValoresNumericos(pDato){
		pDato=pDato.toLowerCase();
		contador=0;
		sValoresPermitidos="1234567890";
		EsteCaracter="";
		for (var i=0; i < pDato.length; i++) {
			EsteCaracter=pDato.substring(i,i+1);
			EsteCaracter=EsteCaracter.toLowerCase();
			if (sValoresPermitidos.indexOf(EsteCaracter) == -1) {
				return true;
			}

		}


}


function IsBlank(strValor)
{
                strTmp=strValor;
                if (strTmp=="")
                        return true;
                else
                {
                        for(i=0;i<=strTmp.length-1;i++)
                        {
                                if (strTmp.charAt[i]!=" ")
                                {
                                        return false;
                                }
                        }
                }
                return true;
 }



function esCaracterPermitido(pValoresPermitidos,pDato){
		pDato=pDato.toLowerCase();
		contador=0;
		EsteCaracter="";
		for (var i=0; i < pDato.length; i++) {
			EsteCaracter=pDato.substring(i,i+1);
			EsteCaracter=EsteCaracter.toLowerCase();
			if (pValoresPermitidos.indexOf(EsteCaracter) == -1) {
				return false;
			}

		}
		return true;
}

function cambiaPagia(pPagina,pPaginaAux){
	document.frmBuscar.page.value=pPagina
	document.frmBuscar.pageInicio.value=pPaginaAux
	document.frmBuscar.submit();
}

function validaSeccBusqueda(pForma){
        formadts=document.forms[pForma];     

    	if(formadts.sBusOpc2[0].checked==true){

            document.getElementById("escPrama").disabled=true;
            //formadts.escPrama.disabled=true;
            //formadts.escPrama.enabled=false;

	    }else{


            document.getElementById("escPrama").disabled=false;

            //formadts.escPrama.disabled=false;
            //formadts.escPrama.enabled=true;

	    }
}


function validaDatosBusqueda(pForma,pOp){
    if(pForma==""){
        formadts=document.frmSelCarr;  
    }else{
        formadts=document.forms[pForma];     
    }


    if (pOp==1){
        if ((IsBlank(formadts.txt_Busca.value))&&(formadts.txt_fec1.value=="")&&(formadts.txt_fec2.value=="")&&(formadts.escPrama.value=="0")){
		    alert("Proporcione o seleccione una opción");
		    formadts.txt_Busca.focus();
	    	return;
        }
    }
    
    
	if(!esCaracterPermitido("áéíóúüabcdefghijklmnñopqrstuvwxyz1234567890 ",formadts.txt_Busca.value)){
		alert("Sólo se permiten caracteres alfanumericos");
		formadts.txt_Busca.focus();
		return;
	}

    if (pOp==1){

	    if(formadts.txt_fec1.value!=""&&!valfecha(formadts.txt_fec1.value,"dd/mm/aaaa")){
		    formadts.txt_fec1.focus();
		    return;
	    }	

	    if(formadts.txt_fec2.value!=""&&!valfecha(formadts.txt_fec2.value,"dd/mm/aaaa")){
		    formadts.txt_fec2.focus();
		    return;
	    }


	    if(((formadts.txt_fec1.value!="")&&(formadts.txt_fec2.value=="")) || ((formadts.txt_fec1.value=="")&&(formadts.txt_fec2.value!=""))){
    		alert("Proporcione un rango de fechas");
		    formadts.txt_fec1.focus();
		    return;
	    }	

	    
	    sBusOpc2=formadts.sBusOpc2[0].value;
	    if(formadts.sBusOpc2[1].checked){
	        sBusOpc2=formadts.sBusOpc2[1].value;
	    }

	    if(formadts.sBusOpc2[2].checked){
	        sBusOpc2=formadts.sBusOpc2[2].value;
	    }
	    formadts.sBusOpc.value=sBusOpc2;
    }	
	//document.frmSelCarr.action=document.frmSelCarr.sNombrePag.value;
	formadts.target="_parent";
	formadts.action="/buscar.asp";
	formadts.submit();
}

function enviaAV(pID){
    window.top.window.enviaAVDatos(pID);
}

function enviaAVDatos(pID){
    document.frmVA.Idvideo.value=pID;
    document.frmVA.submit();

}

function vrMasSelf(pPagina){
    self.close();
    opener.location.href=pPagina;
}


function vrMasB(pPagina){
    sPagina=pPagina;
    if (document.frmVA.pIdB.value==0){
        vrMasSelf('/rf3000.asp');
    }else{
        vrMasSelf(pPagina+'?pIdB='+document.frmVA.pIdB.value);
    }
}


   function cargaAudio(pNomDiv,pDiv,pId,pPagina){
        document.frmAudioVideo.action=pPagina;

	    valorSM = document.all(pNomDiv).item(pDiv).style.display;  
	    totalDivs = document.all(pNomDiv).length;
        for(i=0;i<totalDivs;i++){
            if (document.all(pNomDiv).item(i).style.display==""&&document.frmAudioVideo.Idvideo.value!=""){
                document.frmAudioVideo.target="frmContenido"+document.frmAudioVideo.Idvideo.value;            
                document.frmAudioVideo.Idvideo.value=0;
                document.frmAudioVideo.submit();
            }

           document.all("IdDiv").item(i).style.display = "none";
    		
        }
        
	    if (valorSM=="none"){
            document.frmAudioVideo.target="frmContenido"+pId;
            document.all(pNomDiv).item(pDiv).style.display = "";
            document.frmAudioVideo.Idvideo.value=pId;
            document.frmAudioVideo.submit();
          }
        
   }
   
   
   
  function fncMultiOpcion(pPagina,pId){
        document.frmMulti.idPes.value=pId;
        document.frmMulti.action=pPagina;
        document.frmMulti.mulPage.value="";
        document.frmMulti.idMul.value="";
        document.frmMulti.submit();
   }
   

   function fncPaginacionBusc(pPagina,pNoPag){
        document.frmBusca.mulPage.value=pNoPag;
        document.frmBusca.action=pPagina;
        document.frmBusca.submit();
    }
       
   function fncPaginacion(pPagina,pIdPes,pNoPag){
        document.frmMulti.mulPage.value=pNoPag;
        document.frmMulti.idPes.value=pIdPes;

        document.frmMulti.action=pPagina;
        document.frmMulti.idMul.value="";
        document.frmMulti.submit();
    }

    function fncMulti(pPagina,pIdPes,pId){
        document.frmMulti.idPes.value=pIdPes;
        document.frmMulti.idMul.value=pId;
        document.frmMulti.action=pPagina;
        document.frmMulti.submit();
    }
    
    
    function playMP3(pURL,pHeight,pWidth,pAutostart){
    
        sPlayer="<object data='/swf/playerwpress.swf?&autostart="+pAutostart+"&soundFile="+pURL+"' type='application/x-shockwave-flash' width='"+pWidth+"' height='"+pHeight+"'>\n";
        sPlayer=sPlayer + "<param value='/swf/playerwpress.swf?&autostart="+pAutostart+"&soundFile="+pURL+"' name='movie'>\n";
        sPlayer=sPlayer + "<param value='high' name='quality'>\n";
        sPlayer=sPlayer + "<param value='true' name='menu'>\n";
        sPlayer=sPlayer + "<param value='transparent' name='wmode'>\n";
        sPlayer=sPlayer + "</object>";
        document.write(sPlayer);
    
    }
    
    
    function fncPodCast(pArchivo){
        location.href='itpc://'+sURLSitio+'/podcast/'+pArchivo+'.xml';    
    }
    
 function Transfiere(oOrigen, oDestino)
   {

    if (oOrigen.value != "")
      {
       oOption = document.createElement("OPTION");
       oDestino.options.add(oOption)
       oOption.innerHTML = oOrigen.options[oOrigen.selectedIndex].innerHTML;
       oOption.value = oOrigen.options[oOrigen.selectedIndex].value;
       oOrigen.remove(oOrigen.selectedIndex);
      }
   }

   
  function transfiereDatos(oOrigen, oDestino)
    {
     vcmbLength = oOrigen.options.length;

     for (i=0; i < oOrigen.options.length; i++)
       {
		if (oOrigen.options[i].selected){
            Transfiere(oOrigen, oDestino)

            i=i-1;
        }
       }

    }  
   
  function transfiereTodas(oOrigen, oDestino)
    {
     vcmbLength = oOrigen.options.length;
     for (i=0; i <= vcmbLength; i++)
       {

        oOrigen.selectedIndex=0;
        Transfiere(oOrigen, oDestino)
       }
    }



 function mueve(pNomForma,pdireccion)
    {
     if ((pNomForma.value != "") &&
         (((pNomForma.selectedIndex != 0) || (pdireccion == 1)) &&
           ((pNomForma.selectedIndex != (pNomForma.options.length - 1)) || (pdireccion == -1))))
       {
        indice = pNomForma.selectedIndex
        aux = pNomForma.options[indice].value   
	    auxinnerText = pNomForma.options[indice].innerHTML
        pNomForma.options[indice].value = pNomForma.options[indice + pdireccion].value
        pNomForma.options[indice + pdireccion].value = aux
        pNomForma.options[indice].innerHTML = pNomForma.options[indice + pdireccion].innerHTML
        pNomForma.options[indice + pdireccion].innerHTML = auxinnerText
        pNomForma.selectedIndex = pNomForma.selectedIndex + pdireccion
       }
    }
   
  function primero(pNomForma)
    {
     if (pNomForma.value != "")
       {
        indice = pNomForma.selectedIndex
        aux = pNomForma.options[indice].value
	    auxinnerText = pNomForma.options[indice].innerHTML
          for (i=indice; i >= 1; i--)
          {
           pNomForma.options[i].value = pNomForma.options[i - 1].value
           pNomForma.options[i].innerHTML = pNomForma.options[i - 1].innerHTML
          }
          
        pNomForma.options[0].value = aux
        pNomForma.options[0].innerHTML = auxinnerText 
        pNomForma.selectedIndex = 0
       } 
    }
    
  function ultimo(pNomForma)
    {

     if (pNomForma.value != "")
       {
        indice = pNomForma.selectedIndex
        aux = pNomForma.options[indice].value
	    auxinnerText = pNomForma.options[indice].innerHTML
       
        for (i=indice; i < pNomForma.options.length - 1; i++)
          {
           pNomForma.options[i].value = pNomForma.options[i + 1].value
           pNomForma.options[i].innerHTML = pNomForma.options[i + 1].innerHTML
          }
          
        pNomForma.options[pNomForma.options.length - 1].value = aux
        pNomForma.options[pNomForma.options.length - 1].innerHTML = auxinnerText
        pNomForma.selectedIndex = pNomForma.options.length - 1
       }    
    }
    
    
    function validaEmailEnv(){

	sLista="áéíóúüabcdefghijklmñnopqrstuvwxyz1234567890.,;:_ ";



    if(IsBlank(document.frmEnvNot.fromName.value)){
			alert("Proporcione su Nombre");
			document.frmEnvNot.fromName.value="";
			document.frmEnvNot.fromName.focus();
			return;
	}

    if (!esCaracterPermitido(sLista,document.frmEnvNot.fromName.value)){
			alert("Sólo se permiten caracteres alfanumericos");
			document.frmEnvNot.fromName.focus();
        	return;

    }

	if (!Esmail(document.frmEnvNot.from.value)){
			alert("Proporcione un Correo válido");
			document.frmEnvNot.from.value="";
			document.frmEnvNot.from.focus();
			return;

     }    


    if(IsBlank(document.frmEnvNot.toName.value)){
			alert("Proporcione el Nombre al quien le enviará la noticia");
			document.frmEnvNot.toName.value="";
			document.frmEnvNot.toName.focus();
			return;
	}
		

    if (!esCaracterPermitido(sLista,document.frmEnvNot.toName.value)){
			alert("Sólo se permiten caracteres alfanumericos");
			document.frmEnvNot.toName.focus();
        	return;

    }

	if (!Esmail(document.frmEnvNot.toEmail.value)){
			alert("Proporcione un Correo válido");
			document.frmEnvNot.toEmail.value="";
			document.frmEnvNot.toEmail.focus();
			return;

     }
     

    
    if(document.forms.frmEnvNot.sCom.value.length>100){
			    alert("Sólo puede proporcionar 100 caracteres");
			    document.frmEnvNot.sCom.value=document.frmEnvNot.sCom.value.substring(0,100);
			    document.frmEnvNot.sCom.focus();
			    return;
	}
	
    if (!esCaracterPermitido(sLista,document.frmEnvNot.sCom.value)){
			alert("Sólo se permiten caracteres alfanumericos. No se permite dar Enter");
			document.frmEnvNot.sCom.focus();
        	return;

    }	
    
    document.frmEnvNot.submit();
		    

}

    function rdsLcl(pTipo){
       sURL=encodeURIComponent("http://"+sURLSitio+"/notas.asp?Idn="+document.frnRscls.Idn.value);
       sTitulo=encodeURIComponent(document.frnRscls.sTtNt.value);
       if (pTipo=="fac")
        hrefLoc="http://www.facebook.com/sharer.php?u="+sURL+"&t="+sTitulo;
        
       if (pTipo=="twi"){
        hrefLoc="http://twitter.com/home?status="+sTitulo+"%20en%20"+sURL;
       }
        rSSL=window.open(hrefLoc);

    }

