// JavaScript Document
function show(Picture,PictName) {
	document.images[PictName].src=Picture;
};

function openPopUp(img, imageWidth, imageHeight, popUpTitle, resWin, scrollWin) {
	var popTxt = "";
	var posX, posY;
	popTxt += "<html> \n";
	popTxt += "<head> \n";
	if (popUpTitle=="") { popTxt += "<title></title> \n"; }
	else {                popTxt += "<title>" + popUpTitle + "</title> \n"; };
	popTxt += "</head> \n";
	popTxt += "<body leftmargin=\"0\" topmargin=\"10\" marginwidth=\"0\" marginheight=\"10\" bgcolor=\"#DDDDDD\"> \n";
	popTxt += "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" height=\"100%\"> \n";
	popTxt += "<tr> \n";
	popTxt += "<td align=\"center\" valign=\"center\"> \n";
	popTxt += "	<a href=\"javascript: window.self.close();\"><img src=\"" + img + "\" border=\"0\"></a> \n";
	popTxt += "</br>"
	popTxt += "</br>"
	if (popUpTitle!="") { popTxt += "<div style='font-family:verdana;font-size:16px;text-align:center;color:#000000'>" + popUpTitle + "</div>"; };
	popTxt += "</td> \n";
	popTxt += "</tr> \n";
	popTxt += "</table> \n";
	popTxt += "</body> \n";
	popTxt += "</html> \n";
	posX = (window.screen.width/2)-(parseInt(imageWidth,10)/2);
	posY = (window.screen.height/2)-(parseInt(imageHeight,10)/2);
	if (popUpTitle!="") { imageHeight = parseInt(imageHeight,10)+20; };
	if (navigator.appName!="Netscape") { opopup_win = window.open( "", "opopup_win", "toolbar=no,scrollbars="+scrollWin+",directories=no,menubar=no,width="+imageWidth+",height="+imageHeight+",left="+posX+",top="+posY+",resizable="+resWin ); }
	else { opopup_win = window.open( "", "opopup_win", "toolbar=no,scrollbars="+scrollWin+",directories=no,menubar=no,width="+imageWidth+",height="+imageHeight+",screenX="+posX+",screenY="+posY+",resizable="+resWin ); };
	opopup_win.document.write(popTxt);
};

// carica css in base al browser .. cambiare eventualm. il nome del file css !
// http://www.jsdir.com/staffscripts/script072.asp
function loadCSS(rootPath) {
	var browser = navigator.userAgent.toLowerCase();
	if (document.layers)
		document.write("<link href='" + rootPath + "nn_stylesheet.css' rel='stylesheet' type='text/css'>") // nn
	else
		if (document.all)
			document.write("<link href='" + rootPath + "stylesheet.css' rel='stylesheet' type='text/css'>") // ie
		else
			if (!document.all && document.getElementById)
				document.write("<link href='" + rootPath + "stylesheet.css' rel='stylesheet' type='text/css'>") // Netscape6/Mozilla
			else
				document.write("<link href='" + rootPath + "stylesheet.css' rel='stylesheet' type='text/css'>") // altri
};
