 var TimerScrollMnu;
 var titulonoticia
function ScrollLeft()
 {
    TimerScrollMnu = setInterval("document.getElementById('menueconomiayfinanzasTop').scrollLeft -= 2", 15);
 }

function ScrollRight()
 {
    TimerScrollMnu = setInterval("document.getElementById('menueconomiayfinanzasTop').scrollLeft += 2", 15);
 }

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
 }

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
 }

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
 }

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
 }


function fncChangeColor(objetodiv,colorfore,colorback)
 {
  if(document.all){ 
	 objetodiv.style.backgroundColor=colorback;
	 var aa=objetodiv.getElementsByTagName("a");
	 aa[0].style.color=colorfore;
   }
  else{
	 objetodiv.style.backgroundColor=colorback;
	 var aa=objetodiv.getElementsByTagName("a");
	 aa[0].style.color=colorfore;
   }
 }

//-- Color para los titulares verticales
function fncChangeColorOrigTitulares(objetodiv)
 {
  fncChangeColor(objetodiv,"#858585","#FFFFFF");
 }

//-- Color para los titulares verticales
function fncChangeColorTitulares(objetodiv)
 {
  fncChangeColor(objetodiv,"#000000","#CFF1D7");
 }


 //Cookies asociadas al documento actual
 InCookie = document.cookie;
 //buscamos el coockie
 cadena = GetCookie("tokey",InCookie);
 var acoockie = cadena.split(',');
 var oXmlHttp;
 function GetCookie (name, InCookie) 
  {
    var prop = name + "="; // propiedad buscada
    var plen = prop.length;
    var clen = InCookie.length;
    var i=0;
    if (clen>0)
     { // Cookie no vacío
		   i = InCookie.indexOf(prop,0); // aparición de la propiedad
		   if (i!=-1) 
		    { 
		      // propiedad encontrada
			    // Buscamos el valor correspondiente
			    j = InCookie.indexOf(";",i+plen);
			    if(j!=-1) // valor encontrado
				    return unescape(InCookie.substring(i+plen,j));
			    else //el último no lleva ";"
				    return unescape(InCookie.substring(i+plen,clen));
		   }
		  else
		   return "";
	   }
	  else
		  return "";
   }

//-----------------------------------------------------------
//-----------------------------------------------------------
//-----------------------------------------------------------
//-----------------------------------------------------------
//-----------------------------------------------------------
 var pxmin=5;        // --minimo de pixeles a disminuir;
 var pxMax = 5;      // --Max pixeles a crecer
 var minsize = 8;    // --tamaño minimo que puede tener un contenido de letra
 var countpxdecrecientes = 0;
 var countpxcrecientes = 0;


function incrementaElemento(p)
 {
   for(i=0;i<p.length;i++) 
    {
      
      var ostyle;
      if(p[i].style.fontSize == '')
      {
        if(document.all){
            ostyle = p[i].currentStyle;
        }else{
            ostyle = window.getComputedStyle(p[i],null);
        }
      }else{
        ostyle = p[i].style;
      }
      
      if(ostyle.fontSize) 
	  {
         var s = parseInt(ostyle.fontSize.replace("px",""));
      } 
	  else 
	  {
         var s = 12;
      }
     if(countpxdecrecientes > 0 || countpxcrecientes < pxMax ) 
	   {
         s += 1;
         p[i].style.fontSize = s+"px"
       }
     
   }
 }

function IncrementaFontSize()
  {
   var oDivnoticia = document.getElementById('divNoticia');
   var p = oDivnoticia.getElementsByTagName('div');
   incrementaElemento(p);
   p = oDivnoticia.getElementsByTagName('p');
   incrementaElemento(p);   
   
   if(countpxdecrecientes > 0){
      countpxdecrecientes = countpxdecrecientes - 1;
   }else if(countpxcrecientes < pxMax){
      countpxcrecientes = countpxcrecientes + 1; 
   }
      
}

function decrementaElemento(p)
 {
   for(i=0;i<p.length;i++) 
   {
      var ostyle;
      if(p[i].style.fontSize == ''){
        if(document.all){
        ostyle = p[i].currentStyle;
        }else{
        ostyle = window.getComputedStyle(p[i],null);
        }
      }else{
        ostyle = p[i].style;
      }
      if(ostyle.fontSize) 
	  {
         var s = parseInt(ostyle.fontSize.replace("px",""));
      }
	  else
	  {
         var s = 12;
      }
      if((countpxdecrecientes < pxmin || countpxcrecientes > 0 )&& s > minsize ) 
	  {
         s -= 1;
         p[i].style.fontSize = s+"px"
      }
     
   }   
 }
 
function DecrementaFontSize() 
{
   var oDivnoticia = document.getElementById('divNoticia');
   var p = oDivnoticia.getElementsByTagName('div');
   decrementaElemento(p);
   p = oDivnoticia.getElementsByTagName('p');
   decrementaElemento(p);
   
   if(countpxcrecientes > 0 ){
      countpxcrecientes = countpxcrecientes - 1;
   }else if(countpxdecrecientes<pxmin){
      countpxdecrecientes = countpxdecrecientes + 1;
   }
   
}

//-- Metodo gral para los Font Size
function IncrementaFontSizeGral()
  {
   var p = document.getElementsByTagName('div');
   incrementaElemento(p);
   p = document.getElementsByTagName('p');
   incrementaElemento(p);   
}

//-- Metodo gral para los Font Size
function DecrementaFontSizeGral() 
  {
   var p = document.getElementsByTagName('div');
   decrementaElemento(p);
   p = document.getElementsByTagName('p');
   decrementaElemento(p);
 }
 
 //-- Muestra o oculta el menu adicional de la cabecera de Noticias
function fncmasmnu()
 {
  var divmenuprincipal=document.getElementById("menuadicionalcabecera");
  if(divmenuprincipal.style.display=='')
    divmenuprincipal.style.display='none';
  else
	 divmenuprincipal.style.display=''; 
 }

LstTabsOpciones_DIV_CURRENT_ACTIVO = 0; //este panel corresponde a {Relacionados,Titulares,Vistas,PeruCom
LstTabsOpciones_DIVchildren_NEXT_HIDEN = 0;
var LstTabsOpciones;

function LstTabsOpciones_ShowDIVchildren()
{
   LstTabsOpciones_DIVchildren_NEXT_HIDEN = onShowHidenDIV(LstTabsOpciones[LstTabsOpciones_DIV_CURRENT_ACTIVO],LstTabsOpciones_DIVchildren_NEXT_HIDEN,false);
}

function LstTabsOpciones_HidenDIVchildren()
{
   LstTabsOpciones_DIVchildren_NEXT_HIDEN = onShowHidenDIV(LstTabsOpciones[LstTabsOpciones_DIV_CURRENT_ACTIVO],LstTabsOpciones_DIVchildren_NEXT_HIDEN,true);
}

function onShowHidenDIV(contenedor,indexdivHiden,accion)
{
	if(indexdivHiden != -1)
	{	
		var oDIVchildren = document.getElementById(contenedor).childNodes;
		if(accion)
		{
			
			if(indexdivHiden < oDIVchildren.length )
			{
				if(document.all)
				{
	 				oDIVchildren[indexdivHiden].style.display='none';
					indexdivHiden = indexdivHiden + 1;
				}
				else
				{
					if(oDIVchildren[indexdivHiden].nodeType==1)
					{oDIVchildren[indexdivHiden].style.display='none';
				indexdivHiden +=2;
						
					}
				}
			}
		}
		else
		{
				if(document.all)
				{
					if(indexdivHiden > 0)
					{
						indexdivHiden = indexdivHiden - 1;
						oDIVchildren[indexdivHiden].style.display='';
					}
				}
				else
				{
					if(indexdivHiden > 0)
					{
						indexdivHiden-=2;
						oDIVchildren[indexdivHiden].style.display='';
						if(indexdivHiden<0)
						{
							indexdivHiden=0;
						}
					}
				}
		}
		return indexdivHiden;
	}
	else
	{
		document.getElementById(contenedor).style.display = (document.getElementById(contenedor).style.display == 'none')?'':'none';
	}
}
	 
 function capturaresultado()
  {
	if (oXmlHttp.readyState == 4 && oXmlHttp.status == 200) 
	 {
	   var strHTML='';
       var selecc=LstTabsOpciones_DIV_CURRENT_ACTIVO;
       document.getElementById("msgLoadingCentral").style.display='none';
	   LstTabsOpciones_DIVchildren_NEXT_HIDEN = 0;
	   strHTML=oXmlHttp.responseText;
	   for(var i=0;i<LstTabsOpciones.length;i++)
	    {
          if(selecc!=i)
		      document.getElementById(LstTabsOpciones[i]).style.display='none';
          else
	  	   {
			 document.getElementById(LstTabsOpciones[i]).innerHTML=strHTML;	
             document.getElementById(LstTabsOpciones[i]).style.display='';
		   }
	    }			 
	 }  
  }

 // Ejecuta la llamada remota, solo si no es local, index>0
 function Solicitud(index,parm,seccionTabs)
{
	//callCertificaClick(vcertifica_sitio, 'economiayfinanzas/Tabs');
	LstTabsOpciones_DIVchildren_NEXT_HIDEN = 0;
	LstTabsOpciones_DIV_CURRENT_ACTIVO=seccionTabs;
	if(index==0)
	{
		for(var i=0; i<=LstTabsOpciones.length; i++) 
		{ 
			if(index!=i)
				document.getElementById(LstTabsOpciones[i]).style.display='none';
			else
				document.getElementById(LstTabsOpciones[i]).style.display='';
		}
	}
	else
	{
		document.getElementById("msgLoadingCentral").style.display='inline';
		oXmlHttp = zXmlHttp.createRequest();
		oXmlHttp.open("post","/proxy/proxy.aspx",true);
		oXmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
		oXmlHttp.onreadystatechange = capturaresultado;
		var vPost="tokey=" + acoockie[0] + "&idFunc=" + index + "&parm=" + parm;
		oXmlHttp.send(vPost);
	}
}

// Toma como argumentos los nombres de los DIV's
function initSolicitudTab()
 {
   LstTabsOpciones = arguments
 }

function initcoockie(){
    var v1 = GetCookie("userkey",document.cookie);
    if(v1!=''){
        var o = eval("(" + v1 + ")"); 
        if(o){
        setvalidatecoockie(true,o.user,o.pass);
        }
    }
}
function setvalidatecoockie(crip,us,ps){
    document.getElementById('Useridentificator').style.display = (crip)?"none":"";
    document.getElementById('hcripus').value = us;
    document.getElementById('hcripps').value = ps;
}
function setCookie(sName,sValue) {
     document.cookie = sName + "=" + sValue; 
}
function SolicitudVotaciones(index,parm){
        oXmlHttp = zXmlHttp.createRequest();
        oXmlHttp.open("post","/proxy/proxy.aspx",true);
        oXmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
        if(index!=4){
        oXmlHttp.onreadystatechange = capturaresultadoVotaciones;
        }else{
        oXmlHttp.onreadystatechange = capturaresultadoAlerta;
        }
        var vPost="tokey=" + acoockie[0] + "&idFunc=" + index + "&parm=" + parm;
        oXmlHttp.send(vPost);
    
 }
 function capturaresultadoVotaciones()
 {
        if (oXmlHttp.readyState == 4)
        {
            if (oXmlHttp.status == 200)
            {
                var arr = eval("(" + oXmlHttp.responseText + ")");
                eval('(' + arr + ')');
            }
            else
            {
                saveResult("An error occurred: " + oXmlHttp.statusText);
            }
        }         
 }
 function capturaresultadoAlerta()
 {
        if (oXmlHttp.readyState == 4)
        {
            if (oXmlHttp.status == 200)
            {
                var streval = oXmlHttp.responseText;
                var obj = eval("(" + streval + ")");
                if (obj.coockie != ""){
                    setCookie("userkey",obj.coockie)
                }
                obj.getfunction();
            }
            else
            {
                saveResult("An error occurred: " + oXmlHttp.statusText);
            }
        }         
}
function rate_alertas(func,param)
{
    param = 'us:\''+document.getElementById('txt1').value + '\'';
    param = param+','+'pw:\''+document.getElementById('txt2').value + '\'';
    param = param+','+'idcom:\''+document.getElementById('idcom').value + '\'';
    param = param+','+'crip:0';
    param='{'+param+'}';
    document.getElementById('txt1').value='';
    document.getElementById('txt2').value='';
    document.getElementById('idcom').value='';
    if(!is_being_rated) {
	    is_being_rated = true;
	    document.getElementById('logalert').style.display='none';
	    SolicitudVotaciones(func,param)
	    
	} else {		
	    alert(ratings_text_wait);
	}
}
function rate_alertas_coockie(func,user,pass,urlcyber,usuariobad,fecha,idusuariobad)
{
    param = 'us:\''+ user + '\'';
    param = param+','+'pw:\''+ pass + '\'';
    param = param+','+'idcom:\''+document.getElementById('idcom').value + '\'';
	param = param+','+'urlcyber:\''+ urlcyber + '\'';
	param = param+','+'usuariobad:\''+ usuariobad + '\'';
	param = param+','+'fecha:\''+ fecha + '\'';
	param = param+','+'idusuariobad:\''+ idusuariobad + '\'';
    param = param+','+'crip:1';
    document.getElementById('idcom').value='';
    param='{'+param+'}';
    if(!is_being_rated) {
	    is_being_rated = true;
	    SolicitudVotaciones(func,param)
	    
	} else {		
	    alert(ratings_text_wait);
	}
}
function show_login(e,urlcyber,usuariobad,fecha,idusuariobad,idcomentario)
{
    //buscamos el coockie
    var streval = GetCookie("userkey",document.cookie);
    document.getElementById('idcom').value=idcomentario;
      
    if(streval != ""){
        var objUser = eval("(" + streval + ")");
        rate_alertas_coockie(4,objUser.user,objUser.pass,urlcyber,usuariobad,fecha,idusuariobad);
    }else{
        var curleft = curtop = 0;
        if (e.offsetParent){
            do{
            curleft += e.offsetLeft;
			  curtop += e.offsetTop;
		      }while (e = e.offsetParent);
	    }
	    else
	    {
	        curtop=350;
	        curleft=200;
	    }
	    document.getElementById('logalert').style.display='';
        document.getElementById('logalert').style.top= curtop - 70;
        document.getElementById('logalert').style.left= curleft + 50;
    }
    
}


var ratings_text_wait = "Sólo un voto a la vez.";
var ratings_image = "stars";
var rate_fadeout_opacity = 100;
var is_ie = (document.all && document.getElementById);
var is_moz = (!document.all && document.getElementById);
var is_opera = (navigator.userAgent.indexOf("Opera") > -1);
var is_being_rated = false;
var ratings_max = "5";
var ratings_mouseover_image = new Image();
ratings_mouseover_image.src = "/images/votaciones_estrellaazul.gif";

function rade_fadein_rating(promedio,cantidad)
{
    document.getElementById('votos').innerHTML="";
    document.getElementById('votos').innerHTML=cantidad;
    ratings_off(promedio,0);
    rade_fadein_text();
    
}

    function current_rating(rating) {
	    if(!is_being_rated) {
		    post_rating = rating;
		    for(i = 1; i <= rating; i++) {
			    document.images['rating_' + i].src = eval("ratings_mouseover_image.src");
		    }
	    }
    }


    function ratings_off(rating_score, insert_half)
    {
	    //if(!is_being_rated)
	    //{
		    for(i = 1; i <= ratings_max; i++)
		    {
			    if(i <= rating_score)
			    {
				    document.images['rating_' + i].src = '/images/votaciones_estrellaamarilla.gif';
			    }
			    else if(i == insert_half)
			    {
				   document.images['rating_' + i].src = '/images/rating_half.gif';
			    }
			    else
			    {
				    document.images['rating_' + i].src = '/images/votaciones_estrellagris.gif';
			    }
		    }
	   // }
    }


    function rate_post(func, param)
    {	
	    if(!is_being_rated) {
		    is_being_rated = true;
		    rate_process(func,param);		
	    } else {		
		    alert(ratings_text_wait);
	    }
    }

    function rate_comms(func, param)
    {	
	    if(!is_being_rated) {
		    is_being_rated = true;
		    SolicitudVotaciones(func,param)
	    } else {		
		    alert(ratings_text_wait);
	    }
    }
    

    
    function rate_process(func,param)
    {
	    if(rate_fadeout_opacity > 0) {
		    rate_fadeout_opacity -= 10;
		    if(is_opera) {
			    rate_fadein_opacity = 0;
		    } else if(is_ie) {
			    document.getElementById('ratings').style.filters='alpha(opacity='+rate_fadeout_opacity+')';
		    } else if(is_moz) {
			    document.getElementById('ratings').style.MozOpacity = (rate_fadeout_opacity/100);
		    }
		    setTimeout("rate_process(" + func + ",'" + param + "')", 100);
		    
	    } else {
		    rate_fadein_opacity = 0;
		    rate_fadeout_opacity = 100;
            SolicitudVotaciones(func,param)
	    }
    }

function rade_fadein_text() {
	if(rate_fadein_opacity < 100) {
		rate_fadein_opacity += 10;
		if(is_opera)  {
			rate_fadein_opacity = 100;
		} else	 if(is_ie) {
			document.getElementById('ratings').style.filters='alpha(opacity='+rate_fadein_opacity+')';
		} else	 if(is_moz) {
			document.getElementById('ratings').style.MozOpacity = (rate_fadein_opacity/100);
		}
		setTimeout("rade_fadein_text()", 100); 
	} else {
		rate_fadein_opacity = 100;
		//rate_unloading_text();
		is_being_rated = false;
	}
}


function getInnerText(elt) {
	var _innerText = elt.innerText;
	if (_innerText == undefined) {
  		_innerText = elt.innerHTML.replace(/<[^>]+>/g,"");
	}
	return _innerText;
}


function UpdateComms(pos,neg,idDoc)
{
    document.getElementById('resok'+idDoc).innerHTML="";
    document.getElementById('resok'+idDoc).innerHTML=pos;
    document.getElementById('resko'+idDoc).innerHTML="";
    document.getElementById('resko'+idDoc).innerHTML=neg;
    is_being_rated = false;
}

function UpdateAlertas(cantidad,idcom)
{
    document.getElementById('resalert' + idcom).innerHTML="";
    document.getElementById('resalert' + idcom).innerHTML=cantidad;
    is_being_rated = false;
}

function SolicitudEncuesta(index,parm)
{
	//callCertificaClick(vcertifica_sitio, 'economiayfinanzas/Encuesta');
    oXmlHttp = zXmlHttp.createRequest();
    oXmlHttp.open("post","/proxy/proxy.aspx",true);
    oXmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
    oXmlHttp.onreadystatechange = capturaresultadoEncuesta;
    var vPost="tokey=" + acoockie[0] + "&idFunc=" + index + "&parm=" + parm;
    oXmlHttp.send(vPost);
    
}

function Intermedia(idencuesta)
{
    var objSelect = document.getElementById('opcion');
    if(objSelect.selectedIndex != -1)
    {
        var idpregunta = objSelect.options[objSelect.selectedIndex].value;
        if( idpregunta == "0"){
            alert("seleccione una pregunta");
        }else{
            SolicitudEncuesta('1', '{idpregunta:' +  idpregunta +', idencuesta:' + idencuesta + '}' );
        }
    }
} 

function capturaresultadoEncuesta()
{
    if (oXmlHttp.readyState == 4)
    {
        if (oXmlHttp.status == 200)
        {
            var arr = oXmlHttp.responseText;
            var div = document.getElementById("ContenidoBarra");
            div.innerHTML = arr;
        }
        else
        {
            saveResult("An error occurred: " + oXmlHttp.statusText);
        }
    }   
}
function saveResult(mensaje)
{
    alert(mensaje);
}
function fncSubmitComentario(hdParam)
{
    var ObjForm = document.formComs
		var msg = "Tenga en cuenta ingresar\t\t\n\n"
	if (ObjForm.txtUsuario.value == "" || ObjForm.txtContrasena.value == "" || ObjForm.txtComentario.value == ""){
		if (ObjForm.txtComentario.value == "") msg += "* Comentario\n"
		if (ObjForm.txtUsuario.value == "") msg += "* Usuario\n"
		if (ObjForm.txtContrasena.value == "") msg += "* Contrase" + String.fromCharCode(241) + "a"
		alert (msg)
	}
	else {
		var objparm = document.getElementById(hdParam);
		objparm.value = 1;
		document.formComs.submit();
	}
}

 //-- Muestra los elementos de Ultimo minuto y el desplazamiento
 //-- variable global
 var ultnot_actual;
 var ultnot_pivot;
 function mostrar_ultmin(dir)
{
	//--- 0=muestra la ultima noticia(primera carga de la página)
	//--- 1=muesta la noticia anterior, si esta al inicio, muestra la ultima
	//--- 2=muesta la noticia siguiente, si esta al final, muestra la primera
	
	//--- Recorre todos los nodos para mostar el anterior o siguiente 
	var elem_vis=document.getElementById('divultimominuto').childNodes.length;
	var array_nodos=document.getElementById('divultimominuto').childNodes;
	var existe=0;
	switch(dir)
	{
		case 0: 
				if(document.all)
				{
					ultnot_pivot=0;
					array_nodos[ultnot_pivot].style.display='';
					
				}
				else
				{
					ultnot_pivot=1;
					array_nodos[ultnot_pivot].style.display='';
				}
				ultnot_actual=0;
				break;
				
		case 1:
				array_nodos[ultnot_pivot].style.display='none';
				for(i=ultnot_pivot-1;i>=0;i--)
				{
					if(document.all)
					{
						array_nodos[i].style.display='';
						ultnot_pivot=i;
						existe=1;
						i=0;
					}
					else
					{
						
						if(array_nodos[i].nodeType==1 && i>=1)
						{
							
							array_nodos[i].style.display='';
							ultnot_pivot=i;
							existe=1;
							i=0;
						}
					}
				}
				if(existe==0)
				{
					if(document.all)
					{
						ultnot_pivot=elem_vis-1;
					}
					else
					{
						ultnot_pivot=elem_vis-2;
					}
					array_nodos[ultnot_pivot].style.display='';
				}
				
				break;
		case 2: 
				array_nodos[ultnot_pivot].style.display='none';
				for(i=ultnot_pivot+1;i<elem_vis;i++)
				{
					if(document.all)
					{
						array_nodos[i].style.display='';
						ultnot_pivot=i;
						existe=1;
						i=elem_vis;
					}
					else
					{
						//alert(i);
						if(array_nodos[i].nodeType==1 && i<elem_vis-2)
						{
							
							array_nodos[i].style.display='';
							ultnot_pivot=i;
							existe=1;
							i=elem_vis;
						}
					}
				}
				if(existe==0)
				{
					if(document.all)
					{
						ultnot_pivot=0;
					}
					else
					{
						ultnot_pivot=1;
					}
					
					array_nodos[ultnot_pivot].style.display='';
				}
				break;
	}
}


function printform(idn,uri)
{
	window.open('/detalle/imprimir_detalle.aspx?idn=' + idn + '&uri=' + uri + '','xx','height=800,width=480,scrollbars=yes');
}

function printformfoto(idn,uri)
{
	window.open('/detalle/imprimir_detalle_foto.aspx?idn=' + idn + '&uri=' + uri + '','xx','height=520,width=610,scrollbars=yes');
}

function ventanaenviar(URL){ 
    window.open(URL,"ventana1","width=500, height=200, scrollbars=no, menubar=no, location=no, resizable=no") 
}
 
function fncCorreoValidar(){
	var correo= document.getElementById("correo");
    var error = "";
	var continuar = 0;
    

	if(correo.value == ""){
	        error = "Ingrese el correo electrónico";
    	    continuar = 1;
	}

  
    	if(continuar == 1)
		{
			alert(error);
			return false;
		}
		else{
        	return true;
		}
}

function fncCorreoSubmit(){
		if(fncCorreoValidar()){
			document.form1.submit();
		}
}
// Solicitud remota al XML comentario
function SolicitudXmlPag(nombreelemento,url)
 {
  XmlEnlace = zXmlHttp.createRequest();
  XmlEnlace.open("GET", url, true);
  XmlEnlace.onreadystatechange = function() {
     if (XmlEnlace.readyState == 4 && XmlEnlace.status == 200)
	 
	 {
	    var selecc = XmlEnlace.responseXML.getElementsByTagName('numcomentarios')[0].text;
	    document.getElementById(nombreelemento).innerHTML=selecc;	
	 }
    }
  XmlEnlace.send(null);
 }


// Solicitud remota al JSON valor-resultado
function SolicitudTipoCambioJSonPag(index,valor,origen,destino)
 {
     XmlEnlace = zXmlHttp.createRequest();
     XmlEnlace.open("post", "/proxy/proxy.aspx", true);
     XmlEnlace.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
     XmlEnlace.onreadystatechange = function() {
      if (XmlEnlace.readyState == 4 && XmlEnlace.status == 200) 
	   {
        var ResultadoDeCnv = eval("(" + XmlEnlace.responseText + ")");
		document.getElementById("txtprnresultado").innerHTML=ResultadoDeCnv;	
	   }
     }
     var vPost="tokey=" + acoockie[0] + "&idFunc=" + index + "&parm=0&prmcodeor=" + origen+"&prmcodedest="+destino+"&prmvalor="+valor;	
     XmlEnlace.send(vPost);
 }
 
 function enviaconversion()
  {
	SolicitudTipoCambioJSonPag(50,document.getElementById("inputvalortc").value,document.getElementById("inputcodeortc").value,document.getElementById("inputcodedesttc").value);
  }
  
  function vacio(q) {   
        for ( i = 0; i < q.length; i++ ) {   
                if ( q.charAt(i) != " " ) {   
                        return true   
                }   
        }   
        return false   
 }
 

  
  function fncMovidaSubmit(){
	  
	if( vacio(document.getElementsByName("Txt_Remitente")[0].value) == false ) {   
                alert("Introduzca su Nombre.")   
                  
    }  
	
    if( vacio(document.getElementsByName("Txt_Dni")[0].value) == false ) {   
                alert("Introduzca su Dni.")   
                 
    }  

    if( vacio(document.getElementsByName("Txt_Correo")[0].value) == false ) {   
                alert("Introduzca su Correo.")   
               
    }  

	else
	{
 	document.formMovida.submit();
	}
  }
  
function formHandler(form){
var URL = document.form.TipBusDolar.options[document.form.TipBusDolar.selectedIndex].value;
window.location.href = URL;
}

function ActivarColumnav2(Col1){ 
	var lista;
	for(var i = 1; i < 12; i++)
	{
		lista=document.getElementById("columnista" + i);
		lista.style.display="none";
	}
	document.getElementById(Col1).style.display='';
	//callCertificaClick(vcertifica_sitio, 'economiayfinanzas/');
}

function ActivarColumnavNacional(Col1){ 
	var lista;
	lista=document.getElementById("igbvl");
	lista.style.display="none";
	lista=document.getElementById("isbvl");
	lista.style.display="none";

    document.getElementById(Col1).style.display='';
	//callCertificaClick(vcertifica_sitio, 'economiayfinanzas/');
}

function ScrollLeftN()
 {
    TimerScrollMnu = setInterval("document.getElementById('menueconomiayfinanzasTopN').scrollLeft -= 2", 15);
 }

function ScrollRightN()
 {
    TimerScrollMnu = setInterval("document.getElementById('menueconomiayfinanzasTopN').scrollLeft += 2", 15);
 }
 
 /* pestanas */
 /* cambiaPestana(Id de elemento, Id de menu, cantidad de pestañas, numero de elemento)*/
 function cambiaPestana(Id, IdMenu, pestanas, elemento ){
	for (var i = 1; i <= pestanas; i++){
		if (i == elemento){
			document.getElementById(Id + i).style.display = 'block'
			document.getElementById(IdMenu + i).className = 'select'
		}
		else{
			document.getElementById(Id + i).style.display = 'none'
			document.getElementById(IdMenu + i).className = ''
		}		
	}	 
}
/* Set Homepage o Favorito para Firefox */
var txtBookmark = ""
function addBookmarkFirefox() {
	if (window.sidebar && window.sidebar.addPanel)
		window.sidebar.addPanel("FutbolArgentino.com","http://www.futbolargentino.com","");
	else
		window.external.AddFavorite("http://www.futbolargentino.com","FutbolArgentino.com")
}

if (window.sidebar) { // firefox
	txtBookmark = '<tr><td><img src="/images/icoFavorite.gif" /></td><td>'
	+ '<a href="javascript:addBookmarkFirefox()">'
	+ 'FutbolArgentino.com como favorito'
	+ '</a></td></tr>'
} 
else if( document.all ) { //MSIE
	txtBookmark =	'<tr><td><img src="/images/icoHomePage.gif" /></td><td>'
	+ '<a href="javascript:;" style="behavior:url(#default#homepage);" '
	+ 'onclick="this.setHomePage(\'http://www.futbolargentino.com\');">'
	+ 'FutbolArgentino.com como p&aacute;gina de inicio'
	+ '</a></td></tr>'
	; 
} 
else {
	txtBookmark =	''; 
}

/* Galeria de estadios */
IdfotoActualEstadio = 1;
function muestraEstadioNext(){
	var name = "imgEstadio"
	var cant =  document.getElementsByName(name).length;
	if (IdfotoActualEstadio < cant){
		IdfotoActualEstadio += 1;
	}
	else{
		IdfotoActualEstadio = 1;
	}
	for (var i = 1; i <= cant; i++ ){
			if (i == IdfotoActualEstadio)
				document.getElementById(name + i).style.display = 'block';
			else
				document.getElementById(name + i).style.display = 'none';
	}
		
}