// JavaScript Document

cadVariables = location.search.substring(1,location.search.length);
arrVariables = cadVariables.split("&");
//alert (cadVariables);
if (cadVariables!=""){
	for (i=0; i<arrVariables.length; i++) {
		arrVariableActual = arrVariables[i].split("=");
		if (isNaN(parseFloat(arrVariableActual[1]))){
			//alert(arrVariableActual[1]);
			eval(arrVariableActual[0]+"='"+unescape(arrVariableActual[1])+"';");
		}else{
			eval(arrVariableActual[0]+"="+arrVariableActual[1]+";");
	
		}
	}
//alert(s);
}else{
	s="";
}


var tamX;
tamX=600;
var tamY;
tamY=400;
var ventana;

function centrar(ventana){
	var auxalto=screen.availHeight;/* auxalto es la variable que contiene el alto de la ventana que hemos abierto.*/
	var auxancho=screen.availWidth;/* auxancho es la variable que contiene el alto de la ventana que hemos abierto.*/
	if(ventana!="popup"){
		window.resizeTo(auxancho,auxalto)
	}	
	popup.moveTo(auxancho/2-tamX/2,auxalto/2-tamY/2);
}

var popup;
var t;
function creditos(t){
	//alert("creditos");
	if(t==1){
		popup=window.open("pages/acercadelsite.html","pop"," width="+tamX+" height="+tamY+" menubars=no scrollbars=no");
		popup.focus();
	}
	if(t==2){
		popup=window.open("acercadelsite.html","pop"," width="+tamX+" height="+tamY+" menubars=no scrollbars=no");
		popup.focus();
	}
	centrar("popup");
}
function notaLegal(t){
	//alert("nota legal");
	if(t==1){
		popup=window.open("pages/alerta.html","pop"," width="+tamX+" height="+tamY+" menubars=no scrollbars=no");
		popup.focus();
	}
	if(t==2){
		popup=window.open("alerta.html","pop"," width="+tamX+" height="+tamY+" menubars=no scrollbars=no");
		popup.focus();
	}
	centrar("popup");
}


//-->
