﻿/*********************************  CUPublico.js ********************************/

/***********************************Empieza Javascript para EncabezadoPublico*********************************************/
function EncPublicoSelPulsado(ObjetoPulsado, NumeroFoto, NumEnlacesEnc)
{
    var DenInicio = ObjetoPulsado.id.substring(0, ObjetoPulsado.id.lastIndexOf("_")+1)  
    
    for (i=0; i<=NumEnlacesEnc-1; i++)
    {
        document.getElementById(DenInicio + 'BtnEncPublico' + i).className = 'BtnEncPublicoNoSel'         
    }     
    ObjetoPulsado.className = 'BtnEncPublicoSel'
    
    document.getElementById(DenInicio + 'EncabezadoPublico').style.backgroundImage = 'url(../App_Themes/Araia/ImgAraia/ImgPublicoA/ImgCUPublicoA/Encabezado' + NumeroFoto + '_A.gif)'
    return false
}

/***********************************Finaliza Javascript para EncabezadoPublico*********************************************/


function AbrirEspecial(CodBanner)
{
    var NuevaVentana
    var URL = "Especial.aspx?CodBanner=" + CodBanner
    var NombreVentana = 'Especial'
    var Parametros = 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1, width=1048'
    NuevaVentana=window.open(URL, NombreVentana, Parametros); 
    
    return false 
}


function AbrirNoticiaEvento(NoticiaEvento,TipoNoticiaEvento)
{
    var NuevaVentana
    var URL = "NoticiaEvento.aspx?NoticiaEvento=" + NoticiaEvento + "&TipoNoticiaEvento=" + TipoNoticiaEvento
    var NombreVentana = 'Evento'
    var Parametros = 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1, width=1048'
    NuevaVentana=window.open(URL, NombreVentana, Parametros);  
    return false
}

function AbrirDocumento(Ruta)
{
    var NuevaVentana
    var URL = Ruta
    var NombreVentana = "Documento"
    var Parametros = 'toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,fullscreen=1,resizable=1, width="100%"'
    NuevaVentana = window.open(URL, NombreVentana, Parametros)
    
    return false  
}

function AbrirEnlace(Ruta)
{
    var NuevaVentana
    var URL = Ruta
    var NombreVentana = 'Enlace'
    var Parametros = 'toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1, width="100%"'
    NuevaVentana=window.open(URL, NombreVentana, Parametros); 
    
    return false  
}

function AbrirWAI()
{
    var NuevaVentana
    var URL = "Wai.aspx"
    var NombreVentana = 'Enlace'
    var Parametros = 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0, width=600px, height=380px'
    NuevaVentana=window.open(URL, NombreVentana, Parametros); 
    
    return false  
}

/* --------------------------------------- Finaliza javascript para SubMenuEspecial.ascx --------------------------------------- */ 
function VisualizarSubMenuEspecial(ObjetoPulsado, NumLinkPulsado, NumLinks)
{
    var DenInicio = ObjetoPulsado.id.substring(0, ObjetoPulsado.id.lastIndexOf("_")+1)
    
    for (i=0; i<=NumLinks-1; i++)
    {
        document.getElementById(DenInicio + 'LinkSubmenu' + i).className = 'LinkSubmenuEspecial'  
        document.getElementById(DenInicio + 'ContenidoEspecial' + i + '_PanelContenidoEspecial').style.display = 'none'
    }
    
    ObjetoPulsado.className = "LinkSubmenuPulsado"
    document.getElementById(DenInicio + 'ContenidoEspecial' + NumLinkPulsado + '_PanelContenidoEspecial').style.display = 'block'
    
    return false
}
/* --------------------------------------- Finaliza javascript para SubMenuEspecial.ascx --------------------------------------- */ 
