//funcio que obre un popup
function OpenWindow(theURL,winName,features) {
	window.open(theURL,winName,features);
}

//funcio que obre un popup centrat a la pantalla
function OpenWindowCentered(theURL,winName, width, height) {
	var aw = screen.availWidth - 10;
	var xc = (aw - width) / 2;
	features = "status=yes,scrollbars=yes,resizable=yes, top=0, left=" + xc + ",screenX=" + xc+", width=" + width + ", height=" + height;
	window.open(theURL,winName,features);
}

//funcio que obre un popup a pantalla completa
function OpenWindowFull(theURL,winName) {
	w = screen.availWidth-10;
  	h = screen.availHeight-20;
	features = "width="+w+",height="+h+",left=0,top=0,screenX=0,screenY=0,location,menubar,resizable,scrollbars=yes,status,toolbar";
	window.open(theURL,winName,features);
}
//funcio que obre un popup a pantalla completa amb scrolls
function OpenWindowScroll(theURL,winName) {
	w = screen.availWidth-10;
  	h = screen.availHeight-150;
	features = "width="+w+",height="+h+",left=0,top=0,screenX=0,screenY=0,location,menubar,resizable,scrollbars=yes,status,toolbar";
	window.open(theURL,winName,features);
}
