//includo il file js utilizzato per l'implementazione dei Flash e degli oggetti OpenLaszlo
document.write("<script language=\"JavaScript\" type=\"text/javascript\" src=\"/include/worinclude/library.js\"></script>");



function OpenZoomWindow(sImg,sTitle,sWidth,sHeight,sClose,sDescription){
	if(sClose==null) sClose = "close";
	var sTotHeight;
	sTotHeight = (sHeight/1+17);
	var oWin = window.open('','','status=0,scrollbars=0,height=' + sTotHeight + 'px,width='+sWidth+'px');
	var sHtml = '<html>\n';
	sHtml += '<head><title>' + sTitle + '</title>\n';
	sHtml += '<style type=\"text/css\">\n';
	sHtml += '.fntDefault { text-decoration: none; font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; font-size: 11px; color: #666666 }\n';
	sHtml += '</style>\n</head>\n';
	sHtml += '<body bgcolor=\"#ffffff\" leftmargin=\"0\" topmargin=\"0\" marginwidth=\"0\" marginheight=\"0\">\n';
	sHtml += '<table width=\"100%\" height=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n';
	sHtml += '<tr><td align=\"center\" valign=\"middle\"><img border=\"0\" src=\"'+sImg+'\"></td></tr>\n';

	sHtml += '<tr height=\"2\"><td bgcolor=\"#EBEAE5\"><img src=\"img/np.gif\" height=\"2\"></td></tr>\n';
	sHtml += '<tr height=\"15\"><td bgcolor=\"#E9E9E9\"><table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\"><tr>\n';
	if(sDescription!=null && sDescription!=''){
		sHtml += '<td align=\"left\" valign=\"middle\" class=\"fntDefault\" style=\"padding-left:5px;\">' + sDescription + '</td>\n';
	}
	sHtml += '<td align=\"right\" valign=\"middle\" class=\"fntDefault\" style=\"padding-right:5px;\"><a class=\"fntDefault\" href=\"javascript:window.close()\">' + sClose + '</a></td></tr></table></td></tr>\n';

	sHtml += '</table>\n';
	sHtml += '</body>\n';
	sHtml += '</html>';
	oWin.document.write(sHtml);
}

function switchImage(imgName, imgSrc){
  if (document.images){
    if (imgSrc != "none"){
      document.images[imgName].src = imgSrc;
    }
  }
}
function openCredits(v_intIdLanguage){
	window.open("Tools/Credits/creditsPleiadi.asp?lng=" + v_intIdLanguage,"Credits","dependent=yes,Height=140,Width=320,location=no,menubar=no,resizable=no,scrollbars=no,status=no,titlebar=yes,toolbar=no");
}

function openPressRZoomImage(v_strFilePath){
	window.open("/tools/zoomImage.aspx?fp=" + v_strFilePath,"zoom","dependent=yes,Height=400,Width=600,location=no,menubar=no,resizable=no,scrollbars=no,status=no,titlebar=yes,toolbar=no");
}

function openNewWindow(sPageUrl,sWidth,sHeight){
	window.open(sPageUrl,"page","dependent=yes,Height=" + sHeight + ",Width=" + sWidth + ",location=no,menubar=no,resizable=no,scrollbars=no,status=no,titlebar=yes,toolbar=no");
}

function openContest(v_strPage){
    var params = 'resizable=no,menubar=no,width=1014px,height=670px';
    //alert(params);
    var objWin = window.open(v_strPage,'Site',params);
    objWin.moveTo(0,0);
    //alert(window.screen.availWidth + " " +window.screen.availHeight)
    //objWin.resizeTo(window.screen.availWidth,window.screen.availHeight);
    objWin.focus();
}    

/*function voidFunction(){
	//ie bug
}
function npwidthmax(){
	//calcola width della pagina, toglie larghezza menu sinistra e larghezza menu destra return (la differenza)
	size = parseInt(window.innerWidth) - 440;
	return size;
}
function PopUpWindow(v_strFile,v_strWidth,v_strHeight){
	window.open(v_strFile,"","toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=" + v_strWidth + ",height=" + v_strHeight);
}
function OpenPrintWindow(v_strURLPrint){
	var oWin = window.open(v_strURLPrint,'winPrint','status=0,scrollbars=1,width=550px,height=400px');
	oWin.focus();
}
function LoadDataToPrint(){
	var strId = 'tdPrint';
	var objSource = window.opener.document.getElementById(strId);
	var objDest = window.document.getElementById(strId);
	objDest.innerHTML = objSource.innerHTML;
}*/