// opcion menu superior
var opcion = ' '
var movimiento = false

//onLoad=init()
function init(textoF){
	
	//incializar capas
	DynLayerInit()
	//cargar texto ficha
	
	//inicializar var movimiento
	iniMovimiento()
	//movimiento lado Izquierdo pantalla
	//ladoIzquierdoPantalla()
	//mover texto a través de la bola scroll
	moverBola()
	//mostrarScroll
	mostrarScroll()
}

function initcomunicados(textoF){
	//incializar capas
	DynLayerInit()
	//cargar texto ficha
	texto.load(textoF)
	//inicializar var movimiento
	//iniMovimiento()
	//movimiento lado Izquierdo pantalla
	//ladoIzquierdoPantalla()
	//movimiento bola
	texto.clipInit(0,280,260,0)
	moverBola()
	//mostrarScroll
	//mostrarScroll()
}

//inicializar var movimiento
function iniMovimiento()
{
	maxSlide = texto.y    		//Indicador posicion layer
	texto.ypos = texto.y			//atributo para guardar posicion layer inicial
	limSup =  texto.y				//limite superior moviento texto
	
}

//llamada cuando se clica arriba scroll 


//mostrar opcion menu superior
function mostrar(obj, nom, x1, x2)
{
	//solo si no se repite opcion
	if ( nom != opcion)
	{
		//si no hay ninguno en movimiento
		if ((estrenos.glideActive != true) && (video.glideActive != true) && (sales.glideActive != true) && (anillos.glideActive != true) && (prensa.glideActive != true))
		{
			
			// esconder menu opcion anterior
			switch(opcion)
			{
				case 'estrenos': esconder( estrenos, 'estrenos')
										break;
				case 'video': esconder( video, 'video' )	
										break;
				case 'sales': esconder( sales, 'sales' )
										break;
				case 'anillos': esconder( anillos, 'anillos' )
										break;
				case 'prensa': esconder( prensa, 'prensa')
			}
	
			//guardar ultima opcion
			opcion = nom
	
			//mostrar
			obj.moveTo(800,null)
			obj.show()
			obj.glideTo("slow","fast", x1, 33, 5, 50, nom + '.glideTo("fast","slow",' + x2 + ' ,33,15,50)'  )
		}//end if glideActive
	}// end if
}


//oculatar opcion menu superior
function esconder(obj, nom)
{
		obj.glideTo("slow","fast", 800, 33, 5, 50, nom+'.hide()')	
}

function loadTexto(nom)
{

	
	texto.load(nom)
	texto.moveTo(467,198)
	texto.clipTo(0, 330, 140, 0)
	bola.moveTo(741,186)
	
	maxSlide = texto.y    		//Indicador posicion layer
	texto.ypos = texto.y			//atributo para guardar posicion layer inicial
	limSup =  texto.y				//limite superior moviento texto


}





/********************************************************************************/
/*
function subir()
{
	
	limInf = 195
	
	//Calculo movimiento de la bola scroll
	
	num1 = ( 5 * 140 ) / (texto.getContentHeight() - 150)
	if (movimiento == 1 && texto.y < limInf)
	{
		texto.moveBy(null, 5)				//bajar layer
		texto.clipBy(-5, 0, -5 ,0)			//subir zona clipping
		bola.slideBy(null, -num1)		//mover bola hacia arriba
		setTimeout('subir()',30)
	}
}

function bajar()
{
	
	limInf =  195 - texto.getContentHeight() + 150		
	
	num1 = ( 5 * 140 ) / (texto.getContentHeight() - 150)
	//alert(num1)
	//num1 = texto.getContentHeight() - num1
	//num1 = num1 / texto.h
	//num2 = 140 / num1 
	
	if (movimiento == 1 && texto.y > limInf)
	{
		texto.moveBy(null, -5)				//subir layer
		texto.clipBy(5, 0, 5 ,0)			//bajar zona clipping
		bola.slideBy(null, num1 )  	//mover bola hacia abajo
		setTimeout('bajar()',30)
	}
}

function parar()
{
	movimiento = false	
	//alert(movimiento)
}




*/

function ventanaColumbia(id,idPeli,fichaPublica) {

var ventana
ventana = window.open('http://www.columbiatristarvideo.es/catalogo/aurum_listado.asp?id='+id+'&idAurum='+idPeli+'&esFichaPublica='+fichaPublica,'Columbia','width=500,height=370,top=50,left=50,menubar=0,scrollbars=yes,resizable=no');
ventana.focus()
}

