
//alert(browser+'   '+browserNum);
var arrayMenu=Array();
arrayMenu[0]="home";
arrayMenu[1]="profilo";
arrayMenu[2]="aree";
arrayMenu[3]="fattori";
arrayMenu[4]="leadership";
arrayMenu[5]="clienti";
arrayMenu[6]="press";
arrayMenu[7]="contattaci";



//////

// Example: obj = findObj("image1");
function findObj(theObj, theDoc)
{
  var p, i, foundObj;
  
  if(!theDoc) theDoc = document;
  if( (p = theObj.indexOf("?")) > 0 && parent.frames.length)
  {
    theDoc = parent.frames[theObj.substring(p+1)].document;
    theObj = theObj.substring(0,p);
  }
  if(!(foundObj = theDoc[theObj]) && theDoc.all) foundObj = theDoc.all[theObj];
  for (i=0; !foundObj && i < theDoc.forms.length; i++) 
    foundObj = theDoc.forms[i][theObj];
  for(i=0; !foundObj && theDoc.layers && i < theDoc.layers.length; i++) 
    foundObj = findObj(theObj,theDoc.layers[i].document);
  if(!foundObj && document.getElementById) foundObj = document.getElementById(theObj);
  
  return foundObj;
}

function inizializza(p,sotto){
	var livello=arrayMenu[p];
	var menuSopra=findObj(livello+'Parent');
	
	
	if(p==0){
		
		menuSopra.className="inAlto_acceso";
	}else{
		menuSopra.className="p_acceso";	
	}
	
	
	
	
	if(sotto!=''){
	//attivaBotSotto(sotto)
		
		var sottoH=findObj('p'+sotto);
		if(sottoH){
			
			sottoH.className="attivo_h";
		};
		var sotto=findObj(livello);
		if(sotto!=null){	
			sotto.style.display='block'
		}
	};
	
	
	
	
	//showSotto(p);
	
}

function initServizio(id){
	var theLink=findObj(id);
	theLink.className="attivo";
	
}


