/*if(document.getElementById && document.createElement){
document.write('<style type="text/css">*.toggle{display:none}</style>');
window.onload=function(){
    /*le modifiche allo script vanno solo fatte qui*/
		Attiva("commenta", "lcommenta", "Commenta la notizia", "Nascondi");
		Attiva("commenti", "lcommenti", "Visualizza i commenti", "Nascondi");
    }
}*/

function Attiva(id,id2,s1,s2){
var el=document.getElementById(id);
el.style.display="none";
var c=document.createElement("div");
var link=document.createElement("a");
link.href="#";
link.id=id2;
link.appendChild(document.createTextNode(s1));
link.onclick=function(){
    link.firstChild.nodeValue = (link.firstChild.nodeValue==s1) ? s2 : s1;
    el.style.display=(el.style.display=="none") ? "block" : "none";
    return(false);
    }
c.appendChild(link);
el.parentNode.insertBefore(c,el);
}

function Controllo(frm)
{
  if (frm.titolo.value == "") {
	  window.alert("Devi inserire il titolo!");
		frm.titolo.focus();
		return false;
	}
	if (frm.titolo.value == "Inserisci qui il titolo")
	  return window.confirm("Non hai dato un titolo!\nVuoi salvare lo stesso?")
	return window.confirm("Vuoi veramente salvare?");
}
