<!--


function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function openWindow(pageToOpen,winName) {
	args = "location=0," 
    + "menubar=0,"
    + "resizable=0,"
    + "scrollbars=true, "
    + "status=false," 
    + "titlebar=0,"
    + "toolbar=0,"
    + "hotkeys=0";

	pop=window.open(pageToOpen,'SIT Photogallery',args );
	pop.focus();
}

function openAWindow(pageToLoad, winName, width, height, center, scroll)
{
    xposition=0; yposition=0;
	
    if ((parseInt(navigator.appVersion) >= 4 ) && (center)){
        xposition = (screen.width - width) / 2;
        yposition = (screen.height - height) / 2;
    }
    args = "width=" + width + "," 
    + "height=" + height + "," 
    + "location=0," 
    + "menubar=0,"
    + "resizable=0,"
    + "scrollbars="+scroll+", "
    + "status=false," 
    + "titlebar=0,"
    + "toolbar=0,"
    + "hotkeys=0,"
    + "screenx=" + xposition + ","  //NN Only
    + "screeny=" + yposition + ","  //NN Only
    + "left=" + xposition + ","     //IE Only
    + "top=" + yposition;           //IE Only

 	if (opener && !opener.closed) {
		pop=window.open('','popup',args );
    }
    else {
		pop=window.open('','popup',args );
	}
    
		pop.document.write('<html><head><title>' + winName + '</title>');
  		pop.document.write('<link rel="stylesheet" href="styles.css">');
  		pop.document.write('</head><body CLASS=popupbody>');
		pop.document.write('<A HREF="javascript:window.close();"><IMG SRC=' + pageToLoad + ' BORDER=0 ALT="Clicca qui sopra per chiudere la finestra"></A>');
  		pop.document.write('</body></html>');
		pop.document.close();
		pop.focus();
	 	pop.resizeTo(width+30 ,height+50);
}

function hideLayer(whichLayer) {

if (document.getElementById) {
	// this is the way the standards work
	if (document.getElementById(whichLayer)) document.getElementById(whichLayer).style.visibility = "hidden";
}
else if (document.all) {
// this is the way old msie versions work
	if (document.all[whichlayer]) document.all[whichlayer].style.visibility = "hidden";
}
else if (document.layers) {
// this is the way nn4 works
	if (document.layers[whichLayer]) document.layers[whichLayer].visibility = "hidden";
}

}

function hideAllLayer() {
hideLayer('box1');
hideLayer('box2');
hideLayer('box3');
hideLayer('box4');
}

function showLayer(whichLayer) {

if (document.getElementById) {
// this is the way the standards work
document.getElementById(whichLayer).style.visibility = "visible";
}
else if (document.all) {
// this is the way old msie versions work
document.all[whichlayer].style.visibility = "visible";
}
else if (document.layers) {
// this is the way nn4 works
document.layers[whichLayer].visibility = "visible";
}

}

function handleClick(whichClick,whatShow) {

if (whichClick == "hide it") {
// then the user wants to hide the layer
hideAllLayer();

}
else if (whichClick == "show") {
// then the user wants to show the layer
hideAllLayer();
showLayer("box"+whatShow);
}

}

-->