// JavaScript Documentfunction addbookmark()
function addbookmark()
{
bookmarkurl = location.href
bookmarktitle= document.title
if (document.all)
window.external.AddFavorite(bookmarkurl, bookmarktitle)
}

function Elimina(l,v)
{
	var s;
	s=confirm("Sei sicuro di voler eliminare " + v+ "?");
	if (s) location.href=l;
}

function stampa()
{
	var authorId = "D342E660-B107-40D0-8FC6-12E396005D96";
	var pageOrientation = "0";
	var topMargin = "0.5";
	var bottomMargin = "0.5";
	var leftMargin = "0.5";
	var rightMargin = "0.5";

	var sUriRequest = "";

	sUriRequest = "author_id=" + authorId;
	sUriRequest += "&page=" + pageOrientation;
	sUriRequest += "&top=" + topMargin;
	sUriRequest += "&bottom=" + bottomMargin;
	sUriRequest += "&left=" + leftMargin;
	sUriRequest += "&right=" + rightMargin;

	var pURL = "http://savepageaspdf.pdfonline.com/pdfonline/pdfonline.asp?cURL=" + escape(document.location.href) + "&" + sUriRequest;
	window.open(pURL, "PDFOnline", "scrollbars=no,resizable=no,width=600,height=100");
}


function NascondiMsgErr(l)
{	
	document.getElementById(l).style.visibility='hidden';
	document.getElementById(l).style.overflow='hidden';
	document.getElementById(l).style.height='0px';
}

function MsgErr2(s,n)
{
//	var n="Errore";
	var t="";
	var ih=document.getElementById(n).innerHTML;
	//alert(ih.substring(0,4));
//		alert(document.getElementById(n).id);
//alert(s);
	if (ih.substring(0,4)!="<DIV")
	{
		t = t + "<div class=\"TestoTT\">"
		t = t + "<table style='margin=5px'><tr><td><img src='/images/Avviso2.gif'></td><td>";
		t = t + s + "</td></tr></table>" + document.getElementById(n).innerHTML + "</div>";	
	}
	//alert(t);
	if (t!="") 
	{
		document.getElementById(n).style.height="auto";
		document.getElementById(n).style.width="auto";	
//		document.getElementById(n).style.overflow = "auto";
		document.getElementById(n).style.visibility = "visible";
	  	document.getElementById(n).style.position   = "relative";
		document.getElementById(n).innerHTML=t;
		location.href='#'+n;
	}

}

function MsgErr3(n,ancora)
{
	var ancora1=ancora;
	if (ancora=="") ancora1=n;
	document.getElementById(n).className="ToolTip Abilitata";
	location.href='#'+ancora1;
}

function CancellaTestoMsg()
{
	if (document.getElementById('rigamsg').value=='SCRIVI QUI LA TUA DOMANDA')
		document.getElementById('rigamsg').value='';
}