function toggleDiv(whichdiv)
{
	var stato = document.getElementById(whichdiv).style.display;										
	if( stato=='block' )
	{
	document.getElementById(whichdiv).style.display='none'; 					
	}else
	{
	document.getElementById(whichdiv).style.display='block'; 
	}
}

/*
document.write = function(str){  
	var moz = !window.opera && !/Apple/.test(navigator.vendor);  
    
	// Watch for writing out closing tags, we just  
	// ignore these (as we auto-generate our own)  
	if ( str.match(/^<\//) ) return;  

	// Make sure & are formatted properly, but Opera  
	// messes this up and just ignores it  
	if ( !window.opera )  
		str = str.replace(/&(?![#a-z0-9]+;)/g, "&amp;");  

	
     
	// Mozilla assumes that everything in <acronym title="Extensible HyperText Markup Language">XHTML</acronym> innerHTML  
	// is actually <acronym title="Extensible HyperText Markup Language">XHTML</acronym> - Opera and Safari assume that it's <acronym title="Extensible Markup Language">XML</acronym>  
	if ( !moz )  
		str = str.replace(/(<[a-z]+)/g, "$1 xmlns='http://www.w3.org/1999/xhtml'");  
	
	//There is a roblem With IMG that does not close tag
	
	var splitted = str.split('<img');
	var posSecond = splitted[1].indexOf(">");
	var sub1 = splitted[1].substring(0, posSecond - 1);
	var sub2 = splitted[1].substring(posSecond);
	
	str = splitted[0]+"<img"+sub1+"\" /"+sub2;
	
	
	
	// The HTML needs to be within a XHTML element  
	var div = document.createElementNS("http://www.w3.org/1999/xhtml","div");  
	div.innerHTML = str;
	     
	// Find the last element in the document  
	var pos;  
	     
	// Opera and Safari treat getElementsByTagName("*") accurately  
	// always including the last element on the page  
	if ( !moz ) {  
		pos = document.getElementsByTagName("*");  
		pos = pos[pos.length - 1];  
	
	// Mozilla does not, we have to traverse manually  
	} else {  
		pos = document;  
		while ( pos.lastChild && pos.lastChild.nodeType == 1 )  
			pos = pos.lastChild;  
	}  
	     
	// Add all the nodes in that position  
	var nodes = div.childNodes;  
	while ( nodes.length )  
		pos.parentNode.appendChild( nodes[0] );  
};  

*/

