function imageview (imagepath,w,h,wtitle) {
	var wname =  "img" + ((new Date().getSeconds() * 31) + new Date().getDate());
	var wo = window.open(imagepath, wname , "directories=no,menubar=no,resizable=no,top=120,left=50,width=" + ( w ) + ",height=" + ( h ) , false);
	wo.document.write('<HEAD><script language="javascript"> function closeme() { self.close(); wo = null ; }<');
	wo.document.write("/script>");
	wo.document.write('<TITLE>' + wtitle + '</TITLE></HEAD>');
	wo.document.write('<body>');
	wo.document.write('<div style="position: absolute; left:0px; top:0px;">');
	wo.document.write('<a href="javascript:closeme();">');
	wo.document.write('<img src="' + imagepath + '" width="' + w + '" height="' + h + '" border="0" alt="Chiudi">');
	wo.document.write('</a>');
	wo.document.write('</div>');
	wo.document.write('</body>');
}

function openwin(filename,w,h) {	
	win = open(filename, 'dettagli', 'resizable=yes, toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, width='+w+', height='+h+', left=200, top=100');	
	win.focus();	
}


function hideObject(id)	{	document.getElementById(id).style.visibility = "hidden";	}
function showObject(id)	{	document.getElementById(id).style.visibility = "visible";	}

function toggle(id) {
	var ele = document.getElementById("toggleText"+id);
	var text = document.getElementById("displayText"+id);
	if(ele.style.display == "block") {
    		ele.style.display = "none";
			text.innerHTML = '<img src="../immagini/mostra.png" border="0">';
  	}
	else {
		ele.style.display = "block";
		text.innerHTML = '<img src="../immagini/nascondi.png" border="0">';
	}
} 


