// JavaScript Document
function popap(url, w, h, alt){
	finestra=window.open('popap.php?url='+url+'&alt='+alt,"pop", "width="+w+",height="+h+",resizable=no");
	finestra.focus();
}

function popap2(url, w, h, alt,desc){
	finestra=window.open('popap2.php?url='+url+'&alt='+alt+'&desc='+desc,"pop", "width="+w+",height="+h+",resizable=no");
	finestra.focus();
}

function aviso_legal() { 
  window.open('avisolegal.php','aviso_legal', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=500,height=220' );
}


function cambia(elemento, accion){
	//test=substr(document.getElementById(elemento).src, 0, -5);
	if (accion=="on"){
		src=document.getElementById(elemento).src.substr(0, document.getElementById(elemento).src.length-8);
		document.getElementById(elemento).src=src+"_on.gif";
	}
	if (accion=="off"){
		src=document.getElementById(elemento).src.substr(0, document.getElementById(elemento).src.length-7);
		document.getElementById(elemento).src=src+"_off.gif";
	}
}

var sRepeat=null;
function doScroller(src, amount) {
	if (amount==null) amount=10
	document.getElementById(src).scrollLeft-=amount
	if (sRepeat==null)
		sRepeat=setInterval("doScroller('"+src+"',"+amount+")",100)
	return false
}
// Used to end repeating scrolling
window.document.onmouseout = new Function("clearInterval(sRepeat);sRepeat=null");
window.document.ondragstart = new Function("return false");

function palas(serie){
	finestra=window.open('palasampliadas.php?serie='+serie,"palas", "width=823, height=480,resizable=no");
	finestra.focus();
}


function amplia(texto,num) {
	for (i=1; i<=num; i++) {
		if (i!=texto) {
			document.getElementById("ampli"+i).style.display='none';
			document.getElementById("oculta"+i).style.display='';
		//	alert(document.getElementById("oculta"+i).style.display);
		}
	}
	document.getElementById("oculta"+texto).style.display='none';
			document.getElementById("ampli"+texto).style.display='';
}

function reduce(texto) {
	document.getElementById("oculta"+texto).style.display='';
			document.getElementById("ampli"+texto).style.display='none';
}