// JavaScript Document
// Finestra a pantalla sencera
function finestra(url){
	var ventana=window.open(url,"web","width="+screen.width+",height="+screen.height+", left=0,top=0,screenX=0,screenY=0,directories=0,fullscreen=1,location=0,menubar=0,scrollbar=0,status=0,toolbar=0,titlebar=0");ventana.onfocus();
}

// Finestra de pop-up
function popup(url){
        altura=screen.height;
        anchura=screen.width;
        posx= parseInt((anchura/2)-(795/2));
        posy= parseInt((altura/2)-(575/2));
		contenido=window.open(url,"contenido","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,width=785,height=520,left="+posx+",top="+posy+",screenLeft="+posx+",screenTop="+posy+"");
	contenido.focus();
}
// Finestra de crèdits
function obrircredits(){
	finestracredits=window.open("assets/credits.htm", "credits", "toolbar=no, location=no, status=no, menubar=no, scrollbars=auto, resizable=no, width=390, height=215, left=0, top=0,titlebar=no");
	finestracredits.focus();
}
// Funció per fer un mailto evitant que ho pillin els robots
function contacte(){
	location.href = "mailto:danizar@ks-interactivos.com";/*Aquest és el mail de contacte*/
}

function getValues(){
var urlEnd = document.URL.indexOf('?');
var values = new Array();
var names;

if (urlEnd != -1){
var params = document.URL.substring(urlEnd+1, document.URL.length).split('&');

for(i=0; i<params.length; i++) {
names = params[i].split('=');
values[names[0]] = names[1];
}
}
return values;
}
