var contenuto = ""; 
var cartella = "image/tastodx/index.html"; // Posizione delle immagini Es: C:/Windows/Immagini/ (non dimenticare il "/" finale !) 
var elementi = 6; // numero di elementi 
var separa = 2; // numero di separatori
var altezza = (elementi*22) + (separa*16) + 6;

contenuto += '<HTML><HEAD><STYLE><!--.generale{ position: absolute; left: -999; top: -999; z-index: 999; cursor: url("Cursore/ARANCurdefault.cur");background-color: #F3F4F5;  color : #000000; width: 180; visibility: hidden; border-style: outset; border-width: 2px; border-color: #808080; height: '+altezza+';}';
contenuto += '.menu {border-style: outset; border-color : #404040;}';
contenuto += '.lnAtt{ font-family: Ms Shell Dlg; font-size: 12px; 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="lnAtt" ONCLICK="exe(\'home\')" toStat="Fai di ProCasarsa|org la tua Home Page"><IMG SRC="' + cartella + 'menu_home.gif" ALIGN="absmiddle" WIDTH="16" HEIGHT="16">&nbsp;&nbsp;I<U>m</U>posta come Home page</DIV>';
contenuto += '<DIV CLASS="lnAtt" ONCLICK="exe(\'preferiti\')" toStat="Aggiungi ProCasarsa|org tra i Preferiti"><td><IMG SRC="' + cartella + 'preferiti.gif" ALIGN="absmiddle" WIDTH="16" HEIGHT="16">&nbsp;&nbsp;<U>A</U>ggiungi ai Preferiti</DIV>';
contenuto += '<HR CLASS="Menu">'; 
contenuto += '<DIV CLASS="lnAtt" ONCLICK="exe(\'aggiorna\')" toStat="Ricarica la pagina corrente"><IMG SRC="' + cartella + 'menu_aggiorna.gif" ALIGN="absmiddle" WIDTH="16" HEIGHT="16">&nbsp;&nbsp;Aggi<U>o</U>rna</DIV>';
contenuto += '<DIV CLASS="lnAtt" ONCLICK="exe(\'indietro\')" toStat="Torna alla pagina precedente"><IMG SRC="' + cartella + 'menu_indietro.gif" ALIGN="absmiddle" WIDTH="16" HEIGHT="16">&nbsp;&nbsp;<U>I</U>ndietro</DIV>';
contenuto += '<DIV CLASS="lnAtt" ONCLICK="exe(\'avanti\')" toStat="Torna alla pagina successiva"><IMG SRC="' + cartella + 'menu_avanti.gif" ALIGN="absmiddle" WIDTH="16" HEIGHT="16">&nbsp;&nbsp;A<U>v</U>anti</DIV>';
contenuto += '<HR CLASS="Menu">'; 
contenuto += '<DIV CLASS="lnAtt" ONCLICK="exe(\'email\')" toStat="Contatta Pro Casarsa via e-mail"><IMG SRC="' + cartella + 'email.gif" ALIGN="absmiddle" WIDTH="16" HEIGHT="16">&nbsp;&nbsp;<U>E</U>-mail a ProCasarsa</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 == "lnAtt"){
		event.srcElement.style.backgroundColor="highlight"; 
		event.srcElement.style.color="highlightText"; 
        if (event.srcElement.toStat) {
            window.status = event.srcElement.toStat;
		} 
	} 
} 

// Deseleziona la parte del menù 
function light_off (){ 
    if (event.srcElement.className == "lnAtt"){
		event.srcElement.style.backgroundColor= "#F3F4F5"; 
		event.srcElement.style.color="#000000"; 
		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 - altezza; 
		} 

		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; 
} 

// Imposta come home page

function homepage() {  
if(document.all)
document.body.style.behavior='url(#default#homepage)';
document.body.setHomePage('index.html');
}

// Aggiungi ai preferiti

var bookmarkurl="index.html";
var bookmarktitle="procasarsa.org - casarsa online";

function addbookmark(){
if (document.all)
var imgFav= new Image();
imgFav.src="favicon.ico";
window.external.AddFavorite(bookmarkurl,bookmarktitle)
}

// Utility del menù 
function exe (type){ 
	if (type == "home"){
		homepage(); 
	} else if (type == "indietro"){
		history.back(); 
	} else if (type == "aggiorna"){ 
		location.reload(); 
	} else if (type == "avanti"){ 
		history.forward();
	} else if (type == "preferiti"){ 
		addbookmark(); 
	} else if (type == "email"){ // Apre il client di posta elettronica 
		location.href="mailto:procasarsa@tin.it"; 
		} 
} 

// 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; 
} 