// Codice by MaRoK - www.marok.org //
// Chi copia deve birra e pheega //


// Queste righe scritte dal dottor Marok costruiscono il menu di sinistra
// Sono facili da compilare, a prova di handicap
// Ogni voce di menu ha un LINK (senza .htm), un TESTO ITALIANO e un TESTO INGLESE
// NB: Dovete scrivere il link della versione ITALIANA (senza .htm)
// Il link della versione inglese viene generato automaticamente aggiungendo '_en' al link italiano.
// Non potete aggiungere voci, solo modificare quelle esistenti.

link1='chi_siamo';
titolo1ita='Chi siamo';
titolo1en='About us';

link2='presentazione';
titolo2ita='Storia';
titolo2en='History';

link3='foto';
titolo3ita='Foto';
titolo3en='Photo';

link4='ossicd';
titolo4ita='Discografia';
titolo4en='Discography';

link5='collaborazioni';
titolo5ita='Collaborazioni';
titolo5en='Collaborations';

link6='music';
titolo6ita='Video ed Mp3';
titolo6en='Video &amp; Mp3';

link7='link';
titolo7ita='Links';
titolo7en='Links';

link8='news';
titolo8ita='News';
titolo8en='News';

link9='recensio';
titolo9ita='Recensioni';
titolo9en='Reviews';

link10='progetti';
titolo10ita='Altri progetti';
titolo10en='Other projects';

link11='press';
titolo11ita='Uff.stampa';
titolo11en='Press';

link12='acquisto';
titolo12ita='Compra online!';
titolo12en='Buy online!';

link13='guestbook';
titolo13ita='Guestbook';
titolo13en='Guestbook';


// Questi sono i messaggi di errore.
// Per adesso ce n'è solo uno.

errore1ita='Ci sei gia\', amico!';
errore1en='You\'re here yet, doc!';






// -----------------------------------------------
// STOP! -----------------------------------------
// Non toccare niente di quello che sta qua sotto
// Pena la morte tramite biodegrado istantaneo
// e l'ascolto forzato di IVAN PIOMBINO!





// Messaggio di errore

function c6() {
	if (lingua==0) {alert(errore1ita)}
	else           {alert(errore1en)};
}


// Mail protetta antispam

function scriviMI(testo,oggetto) {
	if (!testo&&lingua==0) {testo='scriveteci'}
	else if (!testo&&lingua==1) {testo='mail us'};
	if (!oggetto) {oggetto='ossiduri'};
	document.write('<a href="mailto:ossiduri&#64;ossiduri.com?subject='+oggetto+'">'+testo+'</a>');
}	
	
// Estensioni del foglio di stile

var notie_style='; position:fixed'; 
var ie_style='<style>\nbody {overflow-y:hidden}\n#fracappella {overflow-x: auto; overflow-y:auto}\n</style>';
var navigatore_style='<style>\n#navigatore {position:fixed}\n</style>';
if (document.all&&!window.opera) {var notie_style=''; document.write(ie_style); var navigatore_style=''};
document.write(navigatore_style);

document.write('<style>\n.quadro1, .quadro2 {filter:alpha(opacity=90); -moz-opacity:.90; opacity:.90}\n</style>');


if (!document.layers) {
var barra_sopra_style='position:absolute; top:34px; left:0px; width:543px; height:109px; z-index:4'+notie_style;
var barra_sinistra_style='position:absolute; top:0px; left:34px; width:116px; background:black url(\'barra_sinistra.png\') no-repeat; border:1px solid white; border-top:none; z-index:99'+notie_style;
var bandiere_style='position:absolute; top:73px; left:155px; border:1px dashed white; padding:2px; z-index:5'+notie_style;
var contatti_style='position:absolute; top:40px; left:155px; border:1px solid white; padding:2px; z-index:5'+notie_style;
var info_style='position:absolute; top:40px; left:185px; border:1px solid white; padding:2px; z-index:5'+notie_style;
var ricerca_style='position:absolute; top:110px; left:155px; width:370px; z-index:99; border:1px solid white; border-bottom:none; border-left:none; padding-left:5px; padding-right:5px'+notie_style;
var back_style='position:absolute; top:60px; left:10px; z-index:5'+notie_style;
var show_style='position:absolute; top:34px; left:0px; width:34px; height:109px; background:url(\'show_back.jpg\') no-repeat; z-index:4; padding-left:10px; padding-top:25px'+notie_style;
var navigatore2_style='position:absolute; top:54px; left:20px; width:543px; height:109px; border:1px solid black; background:#99a399; color:black; z-index:2; filter:alpha(opacity=90); -moz-opacity:.90; opacity:.90'+notie_style;
var sezione_style='color:white; display:block; margin-left:5px; margin-right:5px; font-weight:bold; font-size:11px; text-decoration:none; border:1px solid black';
var ghestbuk_scrivi_style='position:absolute; right:50px; top:10px; width:170px; z-index:99; padding:0px; text-align:right; visibility:hidden; z-index:999';
var ghestbuk_scrivi_exp_style='border:1px solid black; background:#d4d0c8; border-top:none';
var ghestbuk_leggi_style='position:absolute; right:20px; top:200px; padding:0px; background:#d4d0c8; border:1px solid black; text-align:right';
document.write('<style>\n.sezione a:hover, #barra_sinistra a:hover {border:1px solid white !important; background:#555555}\n</style>');
}


// Funzioni usate dalle barre superiore e sinistra

// Questa costruisce il menu che va nella barra sinistra

function menu_sx(n,link_ita,testo_ita,testo_en) {

var menu_sx1='.htm" style="'+sezione_style+'" onclick="c6(); return false">'
var menu_sx2='.htm" style="'+sezione_style+'">';

if (lingua==0) {
	if (sezione==n) {document.write('<a href="'+link_ita+menu_sx1+testo_ita+'</a> ');}
	else		{document.write('<a href="'+link_ita+menu_sx2+testo_ita+'</a> ');}
	}
else	{
	if (sezione==n) {document.write('<a href="'+link_ita+'_en'+menu_sx1+testo_en+'</a> ');}
	else		{document.write('<a href="'+link_ita+'_en'+menu_sx2+testo_en+'</a> ');}	
	}	
}


// Queste fanno apparire e scomparire le barre

if (document.getElementById) {

function nascondi_barra() {
	document.getElementById('barra_sopra').style.display='none';
	document.getElementById('navigatore2').style.display='none';
	document.getElementById('navigatore').style.display='none';
	document.getElementById('bandiere').style.display='none';
	document.getElementById('contatti').style.display='none';
	document.getElementById('info').style.display='none';
	document.getElementById('ricerca').style.display='none';
	document.getElementById('back').style.display='none';
	document.getElementById('show').style.display='';
}

function mostra_barra() {
	document.getElementById('barra_sopra').style.display='';
	document.getElementById('navigatore2').style.display='';
	document.getElementById('navigatore').style.display='';	
	document.getElementById('bandiere').style.display='';
	document.getElementById('contatti').style.display='';
	document.getElementById('info').style.display='';
	document.getElementById('ricerca').style.display='';
	document.getElementById('back').style.display='';
	document.getElementById('show').style.display='none';
}

document.write('<div id="show" style="'+show_style+'">');
document.write('<a href="#" class="tipo1" onclick="mostra_barra(); return false"><img src="show.png"></a>');
document.write('</div>');

document.getElementById('show').style.display='none';
}





// Barra superiore - sfondo

document.write('<div id="navigatore2" style="'+navigatore2_style+'">&nbsp;</div>');

document.write('<div id="barra_sopra" style="'+barra_sopra_style+'">');
document.write('<a href="#"><img src="barra_sopra.jpg" width=543 height=109 alt=""></a>');
document.write('</div>');


// Barra sinistra

document.write('<div id="barra_sinistra" style="'+barra_sinistra_style+'">');
if (document.layers) {document.write('<table width=400 border=1><tr><td bgcolor="#eeeeee"><b>MENU</b><br>');}
else {document.write('<img src="blank.gif" width=116 height=130 alt=""><br>')};

menu_sx('1',link1,titolo1ita,titolo1en);
menu_sx('2',link2,titolo2ita,titolo2en);
menu_sx('3',link3,titolo3ita,titolo3en);
menu_sx('4',link4,titolo4ita,titolo4en);
menu_sx('5',link5,titolo5ita,titolo5en);
menu_sx('6',link6,titolo6ita,titolo6en);
menu_sx('7',link7,titolo7ita,titolo7en);
menu_sx('8',link8,titolo8ita,titolo8en);
menu_sx('9',link9,titolo9ita,titolo9en);
menu_sx('10',link10,titolo10ita,titolo10en);
menu_sx('11',link11,titolo11ita,titolo11en);
menu_sx('12',link12,titolo12ita,titolo12en);
menu_sx('13',link13,titolo13ita,titolo13en);

if (document.layers) {document.write('</td></tr></table>');}
document.write('</div>');


// Roba che va in primo piano sulla barra superiore

if (document.all||document.getElementById) {

document.write('<div id="bandiere" style="'+bandiere_style+'">');
if (lingua==0) { document.write('<a href="#" class="tipo1" onclick="alert(\'Lo so che non sembra, ma questa pagina è già in italiano...\'); return false"><img src="bandiera_ita.png" width=28 height=16 alt="Italiano" title="Traduci in Italiano"></a><a href="'+trad+'" class="tipo1" ><img src="bandiera_usa_g.png" style="padding-left:5px"width=28 height=16 alt="English" title="Translate in English"></a>')}
else	       { document.write('<a href="'+trad+'" class="tipo1"><img src="bandiera_ita_g.png" width=28 height=16 alt="Italiano" title="Traduci in Italiano"></a><a href="#" class="tipo1" onclick="alert(\'Yes, I know that it does not look like it so much, but this page IS in english!\'); return false"><img src="bandiera_usa.png" style="padding-left:5px"width=28 height=16 alt="English" title="Translate in English"></a>')};
document.write('</div>');

document.write('<div id="ricerca" style="'+ricerca_style+'">');
if (lingua==0) {var faind='trova'} else {var faind='find'};
if (13!=12) {document.write('<form style="display:inline" action="http://search.freefind.com/find.html" method="get" target="_blank"><input type="hidden" name="id" size="-1" value="48138977"><input type="hidden" name="pageid" size="-1" value="r"><input type="hidden" name="mode" size="-1" value="all"><input type="hidden" name="n" size="-1" value="0"><input type="text" class="frifaind" name="query" border=0><input type="image" src="'+faind+'.png" style="width:56px; height:20px"></form>')};
document.write('</div>');

document.write('<div id="contatti" style="'+contatti_style+'">');
if (sezione==98) {document.write('<a href="contatti.htm" onclick="c6(); return false"><img src="busta.png" width=19 height=14 alt="Contatti"></a>')}
else {document.write('<a href="contatti.htm"><img src="busta.png" width=19 height=14 alt="Contatti"></a>')};
document.write('</div>');

document.write('<div id="info" style="'+info_style+'">');
if (sezione==97) {document.write('<a href="info.htm" onclick="c6(); return false"><img src="info.png" width=19 height=14 alt="Info" title="Info"></a>')}
else {document.write('<a href="info.htm"><img src="info.png" width=19 height=14 alt="Info" title="Info"></a>')};
document.write('</div>');

document.write('<div id="back" style="'+back_style+'">');
document.write('<a href="#" class="tipo1" onclick="nascondi_barra(); return false"><img src="back.png"></a>');
document.write('</div>');
}



// Guestbook

function messcontacar() {
	conta=1000-document.form_blog.msg.value.length ;
	document.form_blog.msgcar.value=conta;
  	}

function controlla() {
	var caratteri = 1000-document.form_blog.msg.value.length;
	var caratteri_di_troppo = document.form_blog.msg.value.length-1000;
	if (caratteri > -1) {top.iframe_blog.location.href="http://favesoka.altervista.org/Ossi/ghestbuk.php?function=save"}
	else if (lingua==0) {alert('Hai scritto '+caratteri_di_troppo+' caratteri di troppo! Fankulo!')}
	else {alert('You have written '+caratteri_di_troppo+' more characters!')};
	}

function ghestbuk() {
	
if (document.getElementById) {

document.write('<div id="ghestbuk_scrivi" style="'+ghestbuk_scrivi_style+'">');

document.write('	<div style="border:1px solid black">');
document.write('	<table width="100%" cellspacing=0 cellpadding=2><tr>');
document.write('	<td style="background:#70478d; font-size:10px; color:white">');
if (lingua==0) {document.write('Scrivi')} else {document.write('Write')};
document.write('	</td><td align="right" style="background:#70478d"><div id="espandi"><a href="#" onclick="document.getElementById(\'ghestbuk_scrivi_exp\').style.display=\'\'; document.getElementById(\'riduci\').style.display=\'\'; document.getElementById(\'espandi\').style.display=\'none\'; return false"><img src="espandi.png" width=12 height=11 border=0 alt="" title="');
if (lingua==0) {document.write('Espandi')} else {document.write('Expand')};
document.write('!"></a></div><div id="riduci"><a href="#" onclick="document.getElementById(\'ghestbuk_scrivi_exp\').style.display=\'none\'; document.getElementById(\'riduci\').style.display=\'none\'; document.getElementById(\'espandi\').style.display=\'\'; return false"><img src="riduci.png" width=12 height=11 border=0 alt="" title="');
if (lingua==0) {document.write('Riduci')} else {document.write('Make it smaller')};
document.write('!"></a></div></td>');
document.write('	</tr></table>');
document.write('	</div>');

document.getElementById('espandi').style.display='none';

document.write('	<div id="ghestbuk_scrivi_exp" style="'+ghestbuk_scrivi_exp_style+'">');
document.write('	<table width=170 border=0 cellspacing=0 cellpadding=10><tr><td align="right">');
document.write('	<form method="POST"  name="form_blog" action="http://favesoka.altervista.org/Ossi/ghestbuk.php?function=save" target="iframe_blog" style="display:inline; font-size:10px">');
if (lingua==0) {document.write('Nome: ')} else {document.write('Name: ')};
document.write('	<input type=text name="name" value="" size=15 maxlength=30><br>');
// document.write('	<!-- Sito: <input type=text name="sito" value="" size=15 maxlength=64><br> -->');
// document.write('	<!-- Email: <input type=text name="email" value="" size=15 maxlength=64><br> -->');
if (lingua==0) {document.write('Citt&agrave;: ')} else {document.write('From: ')};
document.write('	<input type=text name="citta" value="" size=15 maxlength=20><br><br><center>');
if (lingua==0) {document.write('Commenti: ')} else {document.write('Message: ')};
document.write('	</center><textarea style="font-size:12px; font-family: Verdana, Sans-Serif; width:150px; height:100px" name="msg" maxlength=1000 style="behavior:url(maxlength.htc)" onkeyup="javascript:messcontacar();" onchange="javascript:messcontacar();"></textarea><br>');
document.write('	<center><input type=text value="1000" name="msgcar" disabled size="3" maxlength="20" style="text-align:right">');
document.write('	<input type="submit" value="Invia"></center></form></td></tr></table></div>');

document.getElementById('ghestbuk_scrivi').style.visibility='visible';

document.write('</div>');

document.write('<div id="leggi" style="'+ghestbuk_leggi_style+'">');
document.write('<div style="background:#d4d0c8; border-bottom:1px solid black; font-size:10px; font-weight:normal; text-align:left; padding:2px; color:black">');
document.write('<a href="');
if (lingua==0) {document.write('figa')} else {document.write('pussy')};
document.write('figa.htm" onclick="alert(\'');
if (lingua==0) {document.write('Ritenta, sarai pi&ugrave; fortunato')} else {document.write('Better luck next time!')};
document.write('!\'); return false"><img src="boh.png" width=12 height=11 border=0 align="left" alt=""></a>');
if (lingua==0) {document.write('Le vostre voci')} else {document.write('Your voices')};
document.write('</div>');
document.write('<div id="leggi_exp" style="border:1px solid black; background:#70478d; border-top:none; padding:10px; border:none">');
if (window.innerWidth) {larghezza_finestra = window.innerWidth; altezza_finestra = window.innerHeight}
else {larghezza_finestra = window.document.body.clientWidth; altezza_finestra = window.document.body.clientHeight};
if (larghezza_finestra<50) {larghezza_finestra=400};
if (altezza_finestra<50) {altezza_finestra=200};
// alert (larghezza_finestra+'x'+altezza_finestra);		
document.write('<iframe name="iframe_blog" id="iframe_blog" src="http://favesoka.altervista.org/Ossi/ghestbuk.php?function=show" frameborder=0 width='+(larghezza_finestra-250)+' height='+(altezza_finestra-260)+'></'+'iframe>');
document.write('</div></div>');
document.getElementById('noghestbuk').style.display='none';

}};




// Apripopup by MaRoK - www.marok.org 
// Potete usare questo codice, purche\' citiate i credits.
// Naturalmente, mi dovete birra e pheega!

function apriMI(figura,larghezza,altezza,descrizione) {

    // tentativo di lavorare in assenza di parametri - ok solo se le immagini sono in cache
    marok = new Image;
    marok.src = figura;
    if (!larghezza&&marok.width>0) {larghezza=marok.width} else if (!larghezza) {larghezza=0};
    if (!altezza&&marok.height>0) {altezza=marok.height} else if (!altezza) {altezza=0};
    if (!descrizione) {descrizione='Foto by www.marok.org'};
    
    // lettura dimensione schermo, finestra utente per opera5 e opera7
    if (!document.all&&!document.layers&&!document.getElementById) 
     {schermoX=800; schermoY=540; barre='yes'}
    else if (navigator.userAgent.indexOf("Opera 5")>-1 || navigator.userAgent.indexOf("Opera/7")>-1 || navigator.userAgent.indexOf("Opera 7")>-1)
    	{schermoX=window.document.body.clientWidth; schermoY=window.document.body.clientHeight; barre='yes'}
    else if (navigator.userAgent.indexOf("Opera/6")>-1 || navigator.userAgent.indexOf("Opera 6")>-1)
    	{schermoX=screen.availWidth; schermoY=screen.availHeight-40}	
    else 
    	{schermoX=screen.availWidth; schermoY=screen.availHeight};
    
    // correzione per browser fessi 
    if (!document.all&&!document.getElementById&&!document.layers) {larghezza=(parseInt(larghezza))+20};
    if (larghezza<21) {larghezza=800};
    dimensioneY=(parseInt(altezza));
    if (!document.all&&!document.getElementById&&!document.layers) {altezza=(parseInt(altezza))+30};
    if (altezza<31) {altezza=530};
     
    // confronto dimensioni dell'immagine con dimensioni dello schermo 
    if 	(larghezza<schermoX&&altezza<schermoY) // caso immagine piccola (banale)
    		{larghezza_finestra=larghezza; altezza_finestra=altezza; barre='no'} 
    	// caso immagine che esce dallo schermo (e sono cazzi)
    else if (larghezza>schermoX&&altezza<schermoY) // piu' larga
    		{larghezza_finestra=(parseInt((parseInt(schermoX))-5)); altezza_finestra=(parseInt((parseInt(altezza))+20)); barre='yes'} 
    else if (larghezza<schermoX&&altezza>schermoY) // piu' alta
    		{larghezza_finestra=(parseInt((parseInt(larghezza))+16)); altezza_finestra=(parseInt((parseInt(schermoY))-25)); barre='yes'} 
    else    // piu' larga e piu' alta 
    		{larghezza_finestra=(parseInt((parseInt(schermoX))-5)); altezza_finestra=(parseInt((parseInt(schermoY))-25)); barre='yes'};
          
    // correzione per Mozilla: ingrandiamo leggermente la finestra
    if (window.sidebar) {larghezza_finestra=(parseInt((parseInt(larghezza_finestra))+5)); altezza_finestra=(parseInt((parseInt(altezza_finestra))+5))};
    
    // correzione per Opera, inutile perche poi fa il cazzo che gli pare
    if (window.opera) {larghezza_finestra=(parseInt((parseInt(larghezza_finestra))+20)); altezza_finestra=(parseInt((parseInt(altezza_finestra))+20)); barre='yes'};
     
    // i risultati dei calcoli e del sudore del giovane MaRoK vengono scritti nella window.open 
	popup = window.open('','_blank','width='+larghezza_finestra+',height='+altezza_finestra+',toolbar=no,resizable=yes,scrollbars='+barre+',left=0,top=0');

    // scriviamo dentro la popup
    
    popup.document.open();
    popup.document.write('<html>\n<head>\n<title>'+descrizione+'</'+'title>\n</'+'head>\n');
    if (document.getElementById) {popup.document.write('<body style="margin:0px"><center>\n<img src="'+figura+'" border=0 alt="'+descrizione+'" title="'+descrizione+'" onclick="window.close(); return false">\n</'+'body>\n</'+'html>')}
    else {popup.document.write('<body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0>\n<img src="'+figura+'" border=0 name="imagetest" alt="'+descrizione+'" title="'+descrizione+'">')};
    popup.document.write('</'+'body>\n</'+'html>');
    popup.document.title=descrizione;
    popup.document.close();
    }