<!-- hide from JavaScript-challenged browsers
function openWindow(url){popupWin = window.open(url,'PaginaDettaglio','resizable=yes,width=740,height=480,scrollbars=yes,toolbars=no,menubar=no,top=10,left=10,status=yes')};
var gAppConfigure = {	kBlankLinkMessage: ' [Apre una nuova finestra]'};function BlankTarget() {
	for (i = 0; i < document.links.length; i++) {
		if (document.links[i].className.indexOf('target_blank') != -1) {
			document.links[i].setAttribute('target', '_blank');
			document.links[i].title += gAppConfigure.kBlankLinkMessage;
			}
		}
}
var previousHandler = (window.onload) ? window.onload : function () {};
window.onload = function () { previousHandler(); BlankTarget(); };

var dnames = "Domenica Lunedì Martedì Mercoledì Giovedì Venerdì Sabato".split(" ");
var mnames = "Gennaio Febbraio Marzo Aprile Maggio Giugno Luglio Agosto Settembre Ottobre Novembre Dicembre".split(" ");

function getTime(){
  if(!document.layers){
	  var now = new Date();

	  var h = "0"+now.getHours();
	  var m = "0"+now.getMinutes();
	  var s = "0"+now.getSeconds();

	  h = (h.length==3) ? h.substr(1,2) : h;
	  m = (m.length==3) ? m.substr(1,2) : m;
	  s = (s.length==3) ? s.substr(1,2) : s;

	  return h+":"+m+":"+s;
  } else {
    return '';
  }
}

function getDate(){
	var now = new Date();

	var d = "0"+now.getDate();
	var m = "0"+(now.getMonth()+1);
	var y = now.getFullYear();

	d = (d.length==3) ? d.substr(1,2) : d;
	m = (m.length==3) ? m.substr(1,2) : m;

	var dn = dnames[now.getDay()];
	var mn = mnames[now.getMonth()];

	return dn+" "+d+" "+mn+" "+y;
}

function setTime(){
	if(document.getElementById){
    document.getElementById("thetime").innerHTML = getTime();
	  window.setTimeout("setTime()",1000);
  }
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function openBrWindow(theURL,winName,features){
	window.open(theURL,winName,features); 
	window.close();
}

function salva(){
  if (document.all){document.execCommand("SaveAs");} else {alert('Con il tuo Browser non funziona.'); }
}


function printContent(id){str=document.getElementById(id).innerHTMLnewwin=window.open('','printwin','left=80,top=80,width=600,height=400')newwin.document.write('<HTML>\n<HEAD>\n')newwin.document.write('<TITLE>Print Page</TITLE>\n')newwin.document.write('<link rel="stylesheet" type="text/css" media="all" href="style.css">')
//newwin.document.write('<link rel="stylesheet" type="text/css" media="print" href="print.css">')newwin.document.write('<script>\n')newwin.document.write('function chkstate(){\n')newwin.document.write('if(document.readyState=="complete"){\n')newwin.document.write('window.close()\n')newwin.document.write('}\n')newwin.document.write('else{\n')newwin.document.write('setTimeout("chkstate()",2000)\n')newwin.document.write('}\n')newwin.document.write('}\n')newwin.document.write('function print_win(){\n')newwin.document.write('window.print();\n')newwin.document.write('chkstate();\n')newwin.document.write('}\n')newwin.document.write('<\/script>\n')newwin.document.write('</HEAD>\n')newwin.document.write('<BODY onload="print_win()">\n')newwin.document.write(str)newwin.document.write('</BODY>\n')newwin.document.write('</HTML>\n')newwin.document.close()}
// done hiding -->
