function toggleLayer( whichLayer ){  var elem, vis;  if( document.getElementById ) // this is the way the standards work    elem = document.getElementById( whichLayer );  else if( document.all ) // this is the way old msie versions work      elem = document.all[whichLayer];  else if( document.layers ) // this is the way nn4 works    elem = document.layers[whichLayer];  vis = elem.style;  // if the style.display value is blank we try to figure it out here  if(vis.display==''&&elem.offsetWidth!=undefined&&elem.offsetHeight!=undefined)    vis.display = (elem.offsetWidth!=0&&elem.offsetHeight!=0)?'block':'none';  vis.display = (vis.display==''||vis.display=='block')?'none':'block';}function showLayer( whichLayer ){  var elem, vis;  if( document.getElementById ) // this is the way the standards work    elem = document.getElementById( whichLayer );  else if( document.all ) // this is the way old msie versions work      elem = document.all[whichLayer];  else if( document.layers ) // this is the way nn4 works    elem = document.layers[whichLayer];  vis = elem.style;  vis.display ='block';}function hideLayer( whichLayer ){  var elem, vis;  if( document.getElementById ) // this is the way the standards work    elem = document.getElementById( whichLayer );  else if( document.all ) // this is the way old msie versions work      elem = document.all[whichLayer];  else if( document.layers ) // this is the way nn4 works    elem = document.layers[whichLayer];  vis = elem.style;  vis.display ='none';}function activateTab( whichTab ){  var elem, vis;  if( document.getElementById ) // this is the way the standards work    elem = document.getElementById( whichTab );  else if( document.all ) // this is the way old msie versions work      elem = document.all[whichTab];  else if( document.layers ) // this is the way nn4 works    elem = document.layers[whichTab];  vis = elem.firstChild.style;  vis.backgroundColor = '#541710';}function deactivateTab( whichTab ){  var elem, vis;  if( document.getElementById ) // this is the way the standards work    elem = document.getElementById( whichTab );  else if( document.all ) // this is the way old msie versions work      elem = document.all[whichTab];  else if( document.layers ) // this is the way nn4 works    elem = document.layers[whichTab];  vis = elem.firstChild.style;  vis.backgroundColor = 'gray';}function clickTab( whichTab ){hideLayer('tabpane-1');hideLayer('tabpane-2');hideLayer('tabpane-3');deactivateTab('tab-1');deactivateTab('tab-2');deactivateTab('tab-3');showLayer('tabpane-'+whichTab);activateTab('tab-'+whichTab);}/* function externalLinks() {  *//*  if (!document.getElementsByTagName) return;  *//*  var anchors = document.getElementsByTagName("a");  *//*  for (var i=0; i<anchors.length; i++) {  *//*    var anchor = anchors[i];  *//*    if (anchor.getAttribute("href") &&  *//*        anchor.getAttribute("rel") == "external")  *//*      anchor.target = "_blank";  *//*  }  *//* }  *//* window.onload = externalLinks; */function ApriFoto(imgURL) {//	finestra=window.open('', 'finestrafoto', 'scrollbars=yes,status=no,top=10,left='+(screen.width-630)+',width=620,height=500');	finestra=window.open('visualizza_foto.php?'+imgURL,'finestrafoto','resizable=yes,scrollbars=no,status=no,top=20,left=20,width=300,height=300');	finestra.focus();}function ApriFotoNEW(imgURL,prePathToRoot) {//	finestra=window.open('', 'finestrafoto', 'scrollbars=yes,status=no,top=10,left='+(screen.width-630)+',width=620,height=500');	finestra=window.open(prePathToRoot+'visualizza_foto.php?'+imgURL,'finestrafoto','resizable=yes,scrollbars=no,status=no,top=20,left=20,width=300,height=300');	finestra.focus();}function ApriPDF(pdfURL) {//	finestra=window.open('', 'finestrafoto', 'scrollbars=yes,status=no,top=10,left='+(screen.width-630)+',width=620,height=500');	finestra=window.open(pdfURL,'finestrapdf','resizable=yes,scrollbars=no,status=no,top=20,left=20,width=760,height=560');	finestra.focus();}function ApriFinestraPrivacyPolicy(pageURL) {	finestra=window.open(pageURL,'PrivacyPolicy','resizable=yes,scrollbars=yes,status=no,top=20,left=20,width=680,height=560');	finestra.focus();}// POPUP SCRIPT by Zygimantas// Fixed by JohnnyW// Usage for basic popup: // <a href="link.html" class="simplepopup">link</a>//// Usage for advanced popup:// <a href="link.html" class="popup-width-height-location-resizable-scrollbars">link</a>// eg:// <a href="link.html" class="popup-600-400-1-0-1">link</a>function initialize() {	openWindows();}function openWindow(link, attribs) {	var win = null;	win = window.open(link,'openWindow',attribs);}function openWindows() {	if(!document.getElementsByTagName) {		return;	}	var scrW = screen.availWidth;	var scrH = screen.availHeight;	var anchors = document.getElementsByTagName("a");		for (var i = 0; i < anchors.length; i++) {		var anchor = anchors[i];		var linkDest = anchor.getAttribute("href");		var classIndex = anchor.getAttribute("class");		if (classIndex == null) {			var classIndex = anchor.className;		}		if (classIndex != null && classIndex != '') {			var classSplit = classIndex.split("-");			var windowAttributes = "";			if(classSplit[0] == "popup") {						if (classSplit[1] > scrW) {					pW = scrW - 10;					} else {						pW = classSplit[1];				}				if (classSplit[2] > scrH) {					pH = scrH - 40;					} else {					pH = classSplit[2];				}				scrX = (scrW - pW - 10) * .5;				scrY = (scrH - pH - 30) * .5;				for (var j = 3; j <= 5; j++) { // Fixed					if (classSplit[j] == null) {						classSplit[j] = 0;					}				}				var windowAttributes = "width=" + pW + ",height=" + pH + ",left=" + scrX + ",top=" + scrY + ",screenX=" + scrX + ",screenY=" + scrY;				windowAttributes += ",location=" + classSplit[3] + ",resizable=" + classSplit[4] + ",scrollbars=" + classSplit[5]; // Fixed				anchor.setAttribute("href", "javascript:openWindow('" + linkDest + "','" + windowAttributes + "')");			} else if (classSplit[0] == "simplepopup") {				var windowAttributes = "location=1,resizable=1,scrollbars=1,menubar=1,status=1";				anchor.setAttribute("href", "javascript:openWindow('" + linkDest + "','" + windowAttributes + "')");			}		}	}}window.onload = initialize;
