/*
** solapa.js
** Este archivo contiene la implementacion de las acciones de la solapa
** Autor: Rodrigo Nicol?s Uroz <ruroz@claxson.com>
** Fecha: 24/05/2006
**
*/

/*
** VARIABLES GLOBALES
** ------------------
*/
var gsMensajes = new Array();

/*
** FUNCIONES PRINCIPALES
** ---------------------
*/

/*
** estaOculto
** Esta funcion indica si el player esta oculto
** Recibe:
**					Nada
** Devuelve:
**					true si esta oculto, false otherwise
*/
function estaOculto()
{
	var oContenedor = document.getElementById("contenedor_player_playlist");
	
	if (oContenedor)
	{
		return (oContenedor.style.display == "none");
	}
	
	return false;
}

/*
** accionSolapa
** Esta funcion se encarga de cambiar el estado de la solapa
** Recibe:
**					oAncla	object	referencia al ancla que dispara la accion
** Devuelve:
**					1 si pudo cambiar de estado, 0 otherwise
*/
function accionSolapa(oAncla)
{
	
	var oContenedor = document.getElementById("contenedor_player_playlist");
	
	if (oContenedor)
	{
		if (oContenedor.style.display == "")
		{
			/*
			try
			{
				pausar();
			}
			catch(e){}
			* */
			
	    /*
	    oContenedor.style.filter="blendTrans(duration=1)";
	    oContenedor.onfilterchange=function () {oContenedor.style.display="none"};
	    // Make sure the filter is not playing.
	    if (oContenedor.filters.blendTrans.status != 2) {
	        oContenedor.filters.blendTrans.apply();
	        oContenedor.style.visibility="hidden";
	        oContenedor.filters.blendTrans.play();
	    }
	    */
	    oContenedor.style.display="none"
	    
			oAncla.innerHTML = gsMensajes["mostrar_solapa"];
		}
		else
		{			
			
	    oContenedor.style.display="";
	    /*
	    oContenedor.style.filter="blendTrans(duration=1)";	    
	    oContenedor.onfilterchange=null;
	    // Make sure the filter is not playing.
	    if (oContenedor.filters.blendTrans.status != 2) {
	        oContenedor.filters.blendTrans.apply();
	        oContenedor.style.visibility="visible";
	        oContenedor.filters.blendTrans.play();
	    }
			*/
			oAncla.innerHTML = gsMensajes["ocultar_solapa"];
			/*
			try
			{
				play();
			}
			catch(e){}
			*/			
		}
	}
	
}

/*IMPORTS*/
/*VARIABLEs*/
window.gsMensajes=gsMensajes;
/*FUNCIONES*/
window.accionSolapa=accionSolapa;
window.estaOculto=estaOculto;
