function init(mainId, itemId) 
{
setCurrentItem(itemId);
setCurrentItem(mainId);
addvoices();
}

function addvoices() {};

mainItem=null;

/* Set the style of the current item in the main or in the secondary menu */
function setCurrentItem(itemId)
{
	if (itemId==null) return;
	var obj = document.getElementById(itemId);
	if (obj == null) {return;}
	obj.className='currentItem';
	obj.title=obj.title+' (Sezione Corrente)';
	if (itemId!="tab2") {obj.removeAttribute('href');}
}

function setActiveStyleSheet(title) {
  var i, a, main;
  if (!document.all && key==0) {/*Navigazione con il tab in Netscape. Skip function.*/ return true;}
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
      a.disabled = true;
      if(a.getAttribute("title") == title) a.disabled = false;
    }
  }
  return true;
}

function getActiveStyleSheet() {
  var i, a;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title") && !a.disabled) return a.getAttribute("title");
  }
  return null;
}

var key;
document.onkeypress=savekey
function savekey(keyStroke){if (!document.all) {key=keyStroke.which;}}