function winPop(target, myW, myH, nm, sc, rs)
{	
	myleft = ((screen.width - myW) / 2);
	mytop = ((screen.height - myH) / 2);	
	window.open(target, nm, 'width='+myW+',height='+myH+',scrollbars='+sc+',resizable='+rs+',menubar=0,toolbar=0,status=0,location=0,directories=0,left='+myleft+',top='+mytop);
}
function centraFinestra(w, h)
{
	windowWidth=w;
	windowHeight=h;
	if (parseInt(navigator.appVersion) >= 4) window.moveTo((screen.width/2)-(windowWidth/2+10),(screen.height/2)-(windowHeight/2+20));
}
function fullscreen(page)
{
    window.open( page , "" , "fullscreen=1 ,scrollbars = 0" );
    return;
}

function openPopImg(i)
{
	var arrFoto = new Array();
	
	arrFoto[0]= new Array();
	arrFoto[1][0]= 'foto1.jpg';
	arrFoto[1][1]= 'photo1';
	arrFoto[1][2]= '160';
	arrFoto[1][3]= '57';

	nomeFile = arrFoto[i][0];
	nomeWin = arrFoto[i][1];
	w = arrFoto[i][2];
	h = arrFoto[i][3];

	mywindow=window.open('', '',"toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width="+w+",height="+h+""); 
	mywindow.document.write("<HTML><HEAD>");
	mywindow.document.write("<TITLE>"+nomeWin+"</TITLE>");
	mywindow.document.write("</HEAD>");
	mywindow.document.write("<BODY topmargin='0' leftmargin='0' marginheight='0' marginwidth='0'><IMG SRC='"+nomeFile+"' BORDER=0>");
	mywindow.document.write("</BODY></HTML>");
}

function openTrailer()
{
	winPop('default.asp', 800, 600, 'teatro', 0, 0)
}

function openScreen(i)
{
	var arrScreen = new Array();
	arrScreen[1]= 'pippo.zip';
	arrScreen[2]= 'pippo2.zip';
	window.location = arrScreen[i];
}
