﻿function navNota(id, cont) 
{
    self.location = "http://www.unionradio.net/Deportes/Notas/visorNota.aspx?id=" + id + "&tpCont=" + cont;
}

function navNota2(id, cont) 
{
  window.open ("http://www.unionradio.net/Deportes/Notas/visorNota.aspx?id=" + id + "&tpCont=" + cont,'Deportes','');
}


function navNotaIfrm(id, cont) 
{
    parent.location = "http://www.unionradio.net/Deportes/Notas/visorNota.aspx?id=" + id + "&tpCont=" + cont;
}

function navBlogIfrm(id) 
{
    self.location = "http://www.unionradio.net/Deportes/Notas/visorNota.aspx?id=0&tpCont=0&idprg=" + id;
}

var player = null;
function playerReady(thePlayer) {
	player = window.document[thePlayer.id];
}
 
 
function createPlayer(multimedia)
{
  // alert(multimedia);
    var flashvars = {
            file:multimedia,
            autostart:"true"
    }
    var params = {
            allowfullscreen:"false", 
            allowscriptaccess:"always"
    }
    var attributes = {
            id:"player1",  
            name:"player1"
    }
    
    swfobject.embedSWF("/Deportes/recursos/mediaplayer-4.4/player.swf", "placeholder1", "380", "20", "9.0.115", false, flashvars, params, attributes);
}

function playPlayer(mmedia) {
    if (player) {
        player.sendEvent('STOP');
    	player.sendEvent('LOAD', mmedia);

    } else {
        createPlayer(mmedia);
    }
}

    var gMinSize_nv = 8;
    var gNumSizes_nv = 30;
    var gCurSize_nv =14;
    
    var anchoVsbl = 0;
	var altovsVsbl = 0;    
    
    function SetBigger()
    {
	    if (gCurSize_nv < gNumSizes_nv) {
		    gCurSize_nv += 2;
		    //SetSize();
		    cambiarTamano(gCurSize_nv,0);
	    }
    }

    function SetSmaller()
    {
	    if (gCurSize_nv > gMinSize_nv) {
		    gCurSize_nv += -2;
		    //SetSize();
		    cambiarTamano(gCurSize_nv,1);
	    }
    }
    
    function cambiarTamano(tam,masomenos) {
    		document.getElementById('NotaCont').style.fontSize = tam + 'px';
    		parent.tamFuente = tam;
    }


var myWidth = 0, myHeight = 0;
if( typeof( window.innerWidth ) == 'number' ) {
	//Non-IE
	myWidth = window.innerWidth;
	myHeight = window.innerHeight;
} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
	//IE 6+ in 'standards compliant mode'
	myWidth = document.documentElement.clientWidth;
	myHeight = document.documentElement.clientHeight;
} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
	//IE 4 compatible
	myWidth = document.body.clientWidth;
	myHeight = document.body.clientHeight;
}



var idNota = 0;

function mailMan(idnt) {   
    if(idnt > 0) {
        idNota = idnt;
        showMwdw('MAIL');
    }
}

function showMwdw(valor) {
    var alto = 0;
    var altoifrm = 0;
    var anchoifrm = 0;
    var ruta = '';
    
    if(valor == 'REG') {
        //DIMENSIONAMOS LAS HERRAMIENTAS PARA QUE ENCAJE EN EL REGISTRO
        alto = (myHeight -450) / 2;
        altoifrm = 450;
        anchoifrm = 572;
        ruta = 'http://www.unionradio.net/Deportes/recursos/herramientas/registro.aspx';

    }
    
    if(valor == 'LGN') {
        //DIMENSIONAMOS LAS HERRAMIENTAS PARA QUE ENCAJE EN EL REGISTRO
        alto = (myHeight -250) / 2;
        altoifrm = 250;
        anchoifrm = 570;
        ruta = 'http://www.unionradio.net/Deportes/recursos/herramientas/login.aspx';

    }
    
    if(valor == 'MAIL') {
        //DIMENSIONAMOS LAS HERRAMIENTAS PARA QUE ENCAJE EN EL REGISTRO
        alto = (myHeight -270) / 2;
        altoifrm = 270;
        anchoifrm = 570;
        ruta = 'http://www.unionradio.net/Deportes/recursos/herramientas/EnvioNota.aspx?id=' + idNota;

    }      
    
    if(valor == 'CNT') {
        //DIMENSIONAMOS LAS HERRAMIENTAS PARA QUE ENCAJE EN EL REGISTRO
        alto = (myHeight -410) / 2;
        altoifrm = 410;
        anchoifrm = 570;
        ruta = 'http://www.unionradio.net/Deportes/recursos/herramientas/contactenos.aspx';

    }
    if(valor == 'CLOSEDSE') {
        //DIMENSIONAMOS LAS HERRAMIENTAS PARA QUE ENCAJE EN EL REGISTRO
        alto = (myHeight -410) / 2;
        altoifrm = 410;
        anchoifrm = 570;
        ruta = 'http://www.unionradio.net/Deportes/recursos/herramientas/CerrarSesion.aspx';

    }    
      
    document.getElementById('centerUp').style.height= alto +'px';
    document.getElementById('centerBtto').style.height= alto +'px';
    
    //DIMENSIONAMOS LAS VENTANAS
    Refnm.location.href = ruta;
    document.getElementById('celdaIfrm').style.height= altoifrm + 'px';
    document.getElementById('celdaIfrm').style.width= anchoifrm + 'px';
    document.getElementById('reg').style.height= altoifrm + 'px';
    document.getElementById('reg').style.width= anchoifrm + 'px';
    document.getElementById('bkgInf').style.zIndex = '99';
    document.getElementById('bkgInf').style.visibility = 'visible';
}

function cerrarReg(valor){
        
    if(valor == 'CLOSEDSE') {
        self.location = '/';
    }
    if(valor == 'RFR') {
        document.location.reload(true);
    } else {
        document.getElementById('centerUp').style.height= '1px';
        document.getElementById('centerBtto').style.height= '1px';
        
        //DIMENSIONAMOS LAS VENTANAS
        Refnm.location.href = '/Deportes/recursos/blank.htm';
        document.getElementById('celdaIfrm').style.height= '1px';
        document.getElementById('celdaIfrm').style.width= '1px';
        document.getElementById('reg').style.height= '1px';
        document.getElementById('reg').style.width= '1px';
        document.getElementById('bkgInf').style.zIndex = '0';
        document.getElementById('bkgInf').style.visibility = 'hidden';        
    }
}

function altoEnc() {

    alert(document.encuesta.offsetHeight+" "+document.getElementById("encuesta").scrollHeight);
    alert(document.encuesta.scrollHeight+" "+document.getElementById("encuesta").offsetHeight);
}

function buscar() {

    var svalue = document.getElementById('sString').value;
    document.location.href = "http://www.unionradio.net/Deportes/Notas/buscador.aspx?SearchValue=" + svalue;
}
function irhome() {   
    window.location="/Deportes";
}
