//MENU IN ALTO//


/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 * Sezione personalizzabile..
 * Modificare le variabili e gli array seguenti per adattare il menu al propri sito.
 * L'ultima voce di questo menu e' un link a JsDir, se credete potete toglierlo, ma in tal caso vi preghiamo
 * di lasciare il riferimento della riga seguente... dopotutto non l'avete pagato nulla, quindi... che vi costa? :-)
 *
 * Questo menu e' (C)2001 ri.riccardi@agora.stm.it - Lo script e' reperibile al sito http://www.jsdir.com - JavaScript Directory
 *
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
var ron="#BD5231"; // Colore al MouseOver
var roff="#E7CE63"; // Colore di default
var leftmargin=6; // Distanza dal margine sinistro della pagina
var topmargin=76; // Distanza dal margine superiore della pagina
var largo=120; // Larghezza dei layers, quindi distanza (orizzontale) fra i sottomenu

/* L'array seguente contiene i testi che verranno visualizzati dal menu.
 * Nell'esempio (il menu di JsDir) trovate quattro elementi dell'array "voci" corrispondenti alle quattro voci del menu principale
 * Il primo elemento degli array e' il nome del menu, gli elementi successivi sono i links contenuti nel singolo menu.
 * Il tasto "Home" non compare in questo array perche' viene inserito di default come primo elemento */
var voci=new Array();
	
voci[0]=new Array("Spazio Aziende","Forum","Inserzioni","Presentazioni","I candidati");
	voci[1]=new Array("Spazio Candidati","Forum","Curriculum","Inserzioni","Ricerche aperte","Ricerche chiuse","Le aziende");
	voci[2]=new Array("Job News","EuroConvertitore","Retribuzioni","Domande sel.ne","Tutte le News");
	voci[3]=new Array("Chi Siamo","Job Interview","Codice etica","E-mail");
	voci[4]=new Array("Funzioni","Indietro","Avanti","Aggiorna","Stampa");
	
/* Questo array contiene invece i links che saranno aperti dalle singole voci dei sottomenu.
 * Da notare che il primo elemento degli array dev'essere una stringa vuota, infatti corrisponde non ad un link
 * da aprire, ma al titolo del sottomenu, cioe' al primo elemento dell'array "voci" */
var links=new Array();
	links[0]=new Array("","http://www.jobinterview.it/jobinterview/forum","http://www.jobinterview.it/jobinterview/area_aziende_registrate/index-3.htm","http://www.jobinterview.it/jobinterview/area_aziende_registrate/index-3.htm","http://www.jobinterview.it/jobinterview/inserzioni_candidati-registrati/ricerche_aperte_selezione.asp")
	links[1]=new Array("","http://www.jobinterview.it/jobinterview/forum","http://www.jobinterview.it/jobinterview/curriculum/1.asp","http://www.jobinterview.it/jobinterview/area_candidati_registrati/index-3.htm","http://www.jobinterview.it/jobinterview/inserzioni/ricerche-aperte.asp","http://www.jobinterview.it/jobinterview/inserzioni/ricerche-concluse.asp","http://www.jobinterview.it/jobinterview/presentazioni_aziende-registrate/presentazioni_aperte.asp")
	links[2]=new Array("","http://www.jobinterview.it/job-news/euroconv.htm","http://www.jobinterview.it/job-news/retribuzioni.htm","http://www.jobinterview.it/job-news/selezione.htm","http://www.jobinterview.it/jobinterview/news/news_aperte.asp")
	links[3]=new Array("","http://www.jobinterview.it/chisiamo/job.htm","http://www.jobinterview.it/chisiamo/deontologia.htm","http://www.jobinterview.it/chisiamo/email.htm")
	links[4]=new Array("","javascript:history.back();","javascript:history.forward();","javascript:self.location.reload();","javascript:window.print();")

/* Ultimo array.
 * Contiene i testi che saranno visualizzati nella barra di stato del browser quando il mouse e' sopra una voce del menu 
 * Anche in questo caso il primo elemento degli array contiene il testo relativo alla voce principale dei sottomenu */
var wst=new Array();
	wst[0]=new Array("Sezione dedicata alle aziende","Dite la vostra sul mondo del lavoro","Per pubblicare le vostre inserzioni di lavoro","Per inserire la vostra presentazione aziendale","Le inserzioni dei candidati");
	wst[1]=new Array("Sezione dedicata ai candidati","Dite la vostra sul mondo del lavoro","Inserite il vostro curriculum vitae","Inserite la vostra offerta di lavoro","Le ricerche di personale aperte","Le ricerche concluse","Presentazioni aziendali");
	wst[2]=new Array("Le Job News","Un pratico convertitore Lire-EURO","Per convertire la retribuzione da lorda a nettta e viceversa","Tipiche domande di selezione","Tutte le altre news");
	wst[3]=new Array("Informazioni ed e-mail","Informazioni sulla Job Interview","In nostro codice deontologico","Le e-mail con cui contattarci");
	wst[4]=new Array("Funzioni varie","Va alla pagina precedente","Va alla pagina successiva","Aggiorna il contenuto della pagina","Stampa la pagina corrente");


/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 * Fine sezione personalizzabile.
 * Le righe che seguono costituiscono il menu vero e proprio.
 * La personalizzazione e' consigliata solo a webmaster un po' esperti di JavaScript.
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
var nn=document.layers?true:false,conta=0,last=0;

if (nn)
	{
	document.write("<LAYER NAME=mtop. position=absolute left="+leftmargin+" top="+topmargin+" width=50 height=15 clip=0,0,50,15 bgColor="+roff+" visibility=visible onMouseOver=showdeps(last,false);mroll('mtop.') onMouseOut=unmroll('mtop.')>&nbsp;<A HREF='http://www.jobinterview.it/index.asp' CLASS=menuNNb>Home</A></LAYER>");
	for (i=0;i<voci.length;i++)
		{
		var n=i;
		document.writeln("<LAYER NAME=mtop"+n+". position=absolute left="+eval(leftmargin+50+largo*i)+" top="+topmargin+" width="+largo+" height=15 clip=0,0,"+largo+",15 bgColor="+roff+" visibility=visible onMouseOver=MostraMenu("+i+");mroll('mtop"+i+".');conta++ onMouseOut=last="+i+";unmroll('mtop"+i+".');conta--><DIV ALIGN=center>&nbsp;<A HREF=javascript:mroll('mtop"+i+".') CLASS=menuNNb>"+voci[i][0]+"</A></DIV></LAYER>");
		for (l=1;l<voci[i].length;l++)
			document.writeln("<LAYER NAME=mdep"+i+"."+l+" position=absolute left="+eval(leftmargin+50+largo*i)+" top="+eval(topmargin+15*l)+" width="+largo+" height=15 clip=0,0,"+largo+",15 bgColor="+roff+" visibility=hidden onMouseOver=mroll('mdep"+n+"."+l+"');conta++ onMouseOut=unmroll('mdep"+n+"."+l+"');conta-->&nbsp;<A HREF=javascript:mroll('mdep"+n+"."+l+"') onClick=vai('"+links[i][l]+"',"+i+","+l+") CLASS=menuNN>"+voci[i][l]+"</A></LAYER>");
		}
	}
	else
	{
	document.write("<DIV ID=mtop. STYLE=\"position:absolute;left:"+leftmargin+";top:"+topmargin+";width:50;height:15;background:"+roff+";visibility:visible;cursor:hand\" onMouseOver=showdeps(last,false);mroll('mtop.') onMouseOut=unmroll('mtop.')><A HREF='http://www.jobinterview.it/index.asp' CLASS=menuIEb onFocus=this.blur()>&nbsp;Home</A></DIV>");
	for (i=0;i<voci.length;i++)
		{
		var n=i;
		document.writeln("<DIV ID=mtop"+n+". STYLE=\"position:absolute;left:"+eval(leftmargin+50+largo*i)+";top:"+topmargin+";width:"+largo+";height:15;background:"+roff+";visibility:visible;cursor:hand\" onMouseOver=MostraMenu("+n+");mroll('mtop"+n+".');conta++ onMouseOut=last="+n+";unmroll('mtop"+n+".');conta--><DIV ALIGN=center CLASS=menuIEb>&nbsp;"+voci[i][0]+"</DIV></DIV>");
		for (l=1;l<voci[i].length;l++)
			document.writeln("<DIV ID=mdep"+i+"."+l+" STYLE=\"position:absolute;left:"+eval(leftmargin+50+largo*i)+";top:"+eval(topmargin+15*l)+";width:"+largo+";height:15;background:"+roff+";visibility:hidden;cursor:hand\" onMouseOver=;mroll('mdep"+n+"."+l+"');conta++ onMouseOut=unmroll('mdep"+n+"."+l+"');conta-- CLASS=menuIE onClick=vai('"+links[i][l]+"',"+i+","+l+")>&nbsp;"+voci[i][l]+"</DIV>");
		}
	}

timer=setInterval("NascondiMenu()",1000)

function NascondiMenu()
	{
	if (conta==0)
		{
		//coloratutti(true)
		timer=setTimeout("coloratutti(false)",200);
		timer=setTimeout("showdeps(last,false)",250);
		}
	}

function coloratutti(col)
	{
	colore=col?ron:roff;
	for (i=0;i<voci.length;i++)
		for (j=1;j<voci[i].length;j++)
			{
		if (nn)
			document.layers["mdep"+i+"."+j].bgColor=colore;
		else
			if(document.all)
				document.all["mdep"+i+"."+j].style.background=colore;
				else
				document.getElementById('mdep'+i+"."+j).style.background=colore;
			}
	}

function MostraMenu(n)
	{
	showdeps(last,false);
	showdeps(n,true);
	last=n;
	}

function showdeps(n,act)
	{
	if (conta==0)
		{
		act?stat="visible":stat="hidden";
	if (nn)
		for (i=1;i<voci[n].length;i++)
			document.layers["mdep"+n+"."+i].visibility=stat;
	else
		for (i=1;i<voci[n].length;i++)
			if(document.all)
				document.all["mdep"+n+"."+i].style.visibility=stat;
				else
				document.getElementById('mdep'+n+"."+i).style.visibility=stat;
		}
	}


function vai(dove,r,c)
	{
	lev=nn?document.layers["mdep"+r+"."+c]:(document.all)?document.all["mdep"+r+"."+c].style:document.getElementById("mdep"+r+"."+c).style;
	if (nn)
		{
		lev.bgColor=roff;
		timer=setTimeout("lev.bgColor=ron",50)
		timer=setTimeout("lev.bgColor=roff",100)
		timer=setTimeout("lev.bgColor=ron",150)
		timer=setTimeout("lev.bgColor=roff",200)
		timer=setTimeout("lev.bgColor=ron",250)
		}
		else
		{
		lev.background=roff;
		timer=setTimeout("lev.background=ron",50)
		timer=setTimeout("lev.background=roff",100)
		timer=setTimeout("lev.background=ron",150)
		timer=setTimeout("lev.background=roff",200)
		timer=setTimeout("lev.background=ron",250)
		}
	timer=setTimeout("self.location.href='"+dove+"'",350)
	}

function mroll(l)
	{
	nn?document.layers[l].bgColor=ron:(document.all)?document.all[l].style.background=ron:document.getElementById(l).style.background=ron;
	document.getElementById?document.getElementById(l).style.cursor=document.all?'hand':'pointer':'void(0)';
	if (l.substr(0,4)=="mdep")
		stringa=wst[l.substr(4,l.indexOf(".")-4)][l.substring(l.indexOf(".")+1,l.length)];
			else if (l.length>5)
			stringa=wst[l.substr(4,l.indexOf(".")-4)][0];
				else stringa="Torna alla Home Page";		
	window.status=stringa;
	timer=setTimeout("window.status=stringa",20);
	}

function unmroll(l)
	{
	nn?document.layers[l].bgColor=roff:(document.all)?document.all[l].style.background=roff:document.getElementById(l).style.background=roff;
	window.status="";
	}
	
//document.onmousedown=right;
//if (document.layers) window.captureEvents(Event.MOUSEDOWN);
//window.onmousedown=right;

function hidestatus(){
window.status=''
return true
}

if (document.layers)
document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT)

document.onmouseover=hidestatus
document.onmouseout=hidestatus




//MENU DA TASTO DESTRO//





	/**************************************************************************************/
	/**************** Copyright © 2000 Kaos Software. All rights reserved. ****************/
	/**************************************************************************************/


	/************************ Inizializzazione del menù *************************/

	var contenuto = "";
	var cartella = "http://www.jobinterview.it/includes/images/";	// Posizione delle immagini Es: C:/Windows/Immagini/ (non dimenticare il "/" finale !)
	contenuto += '<HTML><HEAD><STYLE><!--.generale{ position: absolute; left: -999; top: -999; z-index: 999; cursor: default; background-color: #E7CE63; color: menuText; width: 180;visibility: hidden; border-style: outset; border-width: 2px; border-color: black;height: 170}.componenti{ font-family: verdana; font-size: 11px; padding-left: 10px; padding-right: 10px; padding-top: 3px; padding-bottom: 3px }// --></STYLE></HEAD>';
	contenuto += '<BODY><OBJECT ID="cerca" CLASSID="clsid:B45FF030-4447-11D2-85DE-00C04FA35C89" HEIGHT="0" WIDTH="0"></OBJECT><DIV ID="right_menu" CLASS="generale">';
	
	contenuto += '<DIV CLASS="componenti" ONCLICK="exe(\'homep\')" SPECIFICHE="Vai alla Home Page"><IMG SRC="' + cartella + 'menu_home.gif" ALIGN="absmiddle" WIDTH="20" HEIGHT="20">&nbsp;&nbsp;Home Page</DIV>';
	contenuto += '<DIV CLASS="componenti" ONCLICK="exe(\'indietro\')" SPECIFICHE="Vai al documento precedente"><IMG SRC="' + cartella + 'menu_indietro.gif" ALIGN="absmiddle" WIDTH="20" HEIGHT="20">&nbsp;&nbsp;Indietro</DIV>';
	contenuto += '<DIV CLASS="componenti" ONCLICK="exe(\'avanti\')" SPECIFICHE="Vai al documento successivo"><IMG SRC="' + cartella + 'menu_avanti.gif" ALIGN="absmiddle" WIDTH="20" HEIGHT="20">&nbsp;&nbsp;Avanti</DIV>';
	
	//contenuto += '<DIV CLASS="componenti" ONCLICK="exe(\'home\')" SPECIFICHE="Imposta la pagina iniziale"><IMG SRC="' + cartella + 'menu_home.gif" ALIGN="absmiddle" WIDTH="16" HEIGHT="16">&nbsp;&nbsp;Imposta Home Page</DIV>';
	contenuto += '<DIV CLASS="componenti" ONCLICK="exe(\'aggiorna\')" SPECIFICHE="Ricarica il documento"><IMG SRC="' + cartella + 'menu_aggiorna.gif" ALIGN="absmiddle" WIDTH="15" HEIGHT="16">&nbsp;&nbsp;Aggiorna</DIV><HR>';	
	contenuto += '<DIV CLASS="componenti" ONCLICK="exe(\'preferiti\')" SPECIFICHE="Aggiungi a Preferiti"><IMG SRC="' + cartella + 'menu_preferiti.gif" ALIGN="absmiddle" WIDTH="15" HEIGHT="15">&nbsp;&nbsp;Aggiungi a Preferiti</DIV>';	
	//contenuto += '<DIV CLASS="componenti" ONCLICK="exe(\'cerca\')" SPECIFICHE="Cerca nel Web con Mns"><td><IMG SRC="' + cartella + 'menu_cerca.gif" ALIGN="absmiddle" WIDTH="16" HEIGHT="16">&nbsp;&nbsp;<U>C</U>erca nel Web</DIV>';
	//contenuto += '<DIV CLASS="componenti" ONCLICK="exe(\'sorgente\')" SPECIFICHE="Visualizza la sorgente HTML del documento"><IMG SRC="' + cartella + 'menu_html.gif" ALIGN="absmiddle" WIDTH="20" HEIGHT="20">&nbsp;&nbsp;<U>H</U>TML</DIV><HR>';
	
	//contenuto += '<DIV CLASS="componenti" ONCLICK="exe(\'stampa\')" SPECIFICHE="Stampa il documento"><IMG SRC="' + cartella + 'menu_stampa.gif" ALIGN="absmiddle" WIDTH="16" HEIGHT="16">&nbsp;&nbsp;Stampa</DIV><HR>';
	//contenuto += '<DIV CLASS="componenti" ONCLICK="exe(\'email\')" SPECIFICHE="Crea un nuovo messaggio"><IMG SRC="' + cartella + 'menu_email.gif" ALIGN="absmiddle" WIDTH="16" HEIGHT="16">&nbsp;&nbsp;Nuovo <U>m</U>essaggio</DIV>';
	contenuto += '</DIV></BODY></HTML>';

	if (document.all && window.print) document.write (contenuto);

	/************************ Script che gestisce il menù *************************/

	// Seleziona la parte del menù
	function light_on (){
		if (event.srcElement.className == "componenti"){
			event.srcElement.style.backgroundColor="#BD5231";
			event.srcElement.style.color="#E7CE63";
				if (event.srcElement.SPECIFICHE) {
					window.status = event.srcElement.SPECIFICHE;
				}
		}
	}

	// Deseleziona la parte del menù
	function light_off (){
		if (event.srcElement.className == "componenti"){
			event.srcElement.style.backgroundColor= "#E7CE63";
			event.srcElement.style.color="menuText";
			window.status = "";
		}
	}

	// Mostra il menù
	function mostra (){
		if (event.clientY > 0 && event.clientX > 0  &&  event.clientY < document.body.clientHeight && event.clientX < document.body.clientWidth) {
			if (document.body.clientHeight - event.clientY + document.body.scrollTop > document.body.clientHeight / 2){
				right_menu.style.top = event.clientY + document.body.scrollTop;
			} else {
				right_menu.style.top = event.clientY + document.body.scrollTop - 290;
			}

			if (document.body.clientWidth- event.clientX + document.body.scrollLeft > document.body.clientWidth / 2){
				right_menu.style.left = event.clientX + document.body.scrollLeft;
			} else {
				right_menu.style.left = event.clientX + document.body.scrollLeft - 180;
			}
		} else {
			right_menu.style.top = document.body.scrollTop;
			right_menu.style.left = document.body.scrollLeft;
		}

		right_menu.style.visibility = "visible";
		return false;

	}

	// Nascondi il menù
	function nascondi (){
			right_menu.style.visibility = "hidden";
			right_menu.style.left = -999;
			right_menu.style.top = -999;

	}

	// Utility del menù
	function exe (type){
		if (type == "indietro"){ 		// Va al documento precedente
			history.back();

		} else if (type == "avanti"){ 		// Va al documento successivo
			history.forward();

		} else if (type == "home"){		// Imposta la home page
			document.body.style.behavior='url(#default#homepage)';
			document.body.setHomePage(location.href);

		} else if (type == "preferiti"){	// Imposta i preferiti
			//var imgFav= new Image();
			//imgFav.src= location.href + "/preferiti.ico";
			window.external.AddFavorite("http://www.jobinterview.it", "Job Interview Consulting s.r.l.");

		} else if (type == "sorgente"){		// Visualizza la sorgente
			location.href = "view-source:" + location; 
			return false;

		} else if (type == "aggiorna"){		// Aggoirna la pagina
			self.location.reload();

		} else if (type == "stampa"){		// Stampa la pagina
			window.print();
			//self.print();

		} else if (type == "email"){		// Apre il client di posta elettronica
			location.href="mailto:";

		} else if (type == "news"){		// Visualizza il newsgroup
			location.href="news:it.comp.lang.javascript";

		} else if (type == "homep"){		// Visualizza il newsgroup
			location.href="http://www.jobinterview.it/index.asp";


		} else if (type == "cerca"){		// Cerca nel web
              		cerca.NavigateToDefaultSearch();
			window.event.returnValue = false;
		}
	}

	// Impedisce il selezionamento dell'area
	function cancella () { 
		window.event.cancelBubble = true;
		window.event.returnValue = false;
	}

	// Eventi
	if (document.all && window.print){
		document.oncontextmenu=mostra;
		document.body.onclick=nascondi;
		right_menu.onmouseover=light_on;
		right_menu.onmouseout=light_off;
		right_menu.ondragstart=cancella;
		right_menu.onselectstart=cancella;
	}

	/**************************************************************************************/
	/**************** Copyright © 2000 Kaos Software. All rights reserved. ****************/
	/**************************************************************************************/


