<!--

/***********************************************
* DD Tab Menu script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

//Set tab to intially be selected when page loads:
//[which tab (1=first tab), ID of tab content to display (or "" if no corresponding tab content)]:
var initialtab=[1, "sc1"]

//Turn menu into single level image tabs (completely hides 2nd level)?
var turntosingle=0 //0 for no (default), 1 for yes

//Disable hyperlinks in 1st level tab images?
var disabletablinks=0 //0 for no (default), 1 for yes


////////Stop editting////////////////

var previoustab=""

if (turntosingle==1)
 document.write('<style type="text/css">\n#tabcontentcontainer{display: none;}\n</style>')

function expandcontent(cid, aobject){
if (disabletablinks==1)
  aobject.onclick=new Function("return false")
if (document.getElementById && turntosingle==0){
  highlighttab(aobject)
if (previoustab!="")
  document.getElementById(previoustab).style.display="none"

if (cid!="") {
  document.getElementById(cid).style.display="block"
  
	previoustab=cid
  }
 }
}

function highlighttab(aobject) {
 if (typeof tabobjlinks=="undefined")
  collectddtabs()
 for (i=0; i<tabobjlinks.length; i++)
  tabobjlinks[i].className=""
  aobject.className="current"
}

function collectddtabs(){
 var tabobj=document.getElementById("ddtabs")
 tabobjlinks=tabobj.getElementsByTagName("A")
}


function do_onload(){
  collectddtabs()
	expandcontent(initialtab[1], tabobjlinks[initialtab[0]-1])
}


// funziona con mozilla ed explorer
function getid(id) {
 // oggetto id
 idobj = document.getElementById(id).style.display;
 if(idobj == "none") {
  document.getElementById(id).style.display = "block";
 } else if (idobj == "block") {
  document.getElementById(id).style.display = "none";
 }
}

function display(id) {
  document.getElementById(id).style.display = "block";
}

function hide(id) {
  document.getElementById(id).style.display = "none";
}

function apri(m) {
  obj = document.getElementById(m);
  if (obj.style.visibility=="hidden") obj.style.visibility = "Visible";
  if (obj.style.display=="none") obj.style.display = "block";
}


function chiudi(m) {
  obj = document.getElementById(m);
  if (obj.style.visibility=="Visible") obj.style.visibility = "hidden";
  if (obj.style.display=="block") obj.style.display = "none";
}

function sito(URL) {
  finestra = window.open(URL,"","");
}

function sitopop(URL) {
  finestra = window.open(URL,"","menubar=no,toolbar=no,status=no,"+
   "scrollbars=yes,resizable=yes,width=750,height=550,top=100,left=105");
}

// aggiungi ai preferiti compatibile con tutti i browser
function addToFavorites(url, title) {
	var sURL = window.location;
	var sText = title;

	try
	{	if (window.sidebar)
			window.sidebar.addPanel(sText, sURL, "");
		else if (window.external)
			window.external.AddFavorite(sURL, sText);
		else if (window.opera && window.print)
		{	var oA = document.createElement('a');
			oA.setAttribute('rel','sidebar');
			oA.setAttribute('href', sURL);
			oA.setAttribute('title', sText);
			oA.click();
		}
	}
	catch (e)
	{	
	}
}

// setta sito come home page
function setAsHome(url){
	if (window.external) { // solo x Internet Explorer
		document.body.style.behavior='url(#default#homepage)';
		document.body.setHomePage(url);
	} else window.alert("Funzione non supportata dal browser in uso");
}

-->