<!-- leccamelo

// scelta del browser: non funziona un cazzo, ma non dovrebbe dare errore

if (document.all) {
	docObj = "document.all."
	styleObj = ".style"
	} else {
	docObj = "document."
	styleObj = ""
	}


// gestisce il roll-over delle immagini
function swapImage(oggetto,immagine) {
	if (document.images) {
		document[oggetto].src= eval(immagine + ".src")
		
	}
}

// quick navigation bar
function quicknav(valore, tipo) {
	if (tipo == "out") {
			window.open(valore)
	} else {
			document.location.href = "/articolo.php?chiave="+valore
	}
}

// apri finestra invia mail
function aprifinestrinamail(chiave) {
	if (document.all) {
		inviamail = window.open('/inviamail.php?chiave='+chiave, 'inviamail' ,'toolbar=no,resizable=no,location=no,scrollbars=no,width=250,height=172,left=100,top=100')
	} else {
		inviamail = window.open('/inviamail.php?chiave='+chiave, 'inviamail' ,'toolbar=no,resizable=no,location=no,scrollbars=no,width=250,height=198,left=100,top=100')
	}
	inviamail.focus()
}

// apri finestra newsletter
function aprifinestrinanews(chiave) {
	invianews = window.open('http://www.lospaziobianco.it/newsletter.php?email_da_inserire='+chiave, 'invianews' ,'toolbar=no,resizable=no,location=no,scrollbars=no,width=250,height=176,left=100,top=100')
	invianews.focus()
}


// apri finestra di stampa
function aprifinestrastampa(chiave) {
	stampa = window.open('/stampa.php?chiave='+chiave, 'stampa' ,'toolbar=no,resizable=no,location=no,scrollbars=yes,width=584,height=300,left=100,top=100')
	stampa.focus()
}


// controllo della sintassi di un indirizzo di posta
function validEmail(email) {
			invalidChars = " /:,;"
	
			if (email == "") {
				return false
			}
			for (i=0; i<invalidChars.length; i++) {
				badChar = invalidChars.charAt(i)
				if (email.indexOf(badChar,0) > -1) {
					return false
				}
			}
			atPos = email.indexOf("@",1)
			if (atPos == -1) {
				return false
			}
			if (email.indexOf("@",atPos+1) > -1) {
				return false
			}
			periodPos = email.indexOf(".",atPos)
			if (periodPos == -1) {
				return false
			}
			if (periodPos+3 > email.length)	{
				return false
			}
			return true
		}

// controllo sul nome file nullo
function validFilename(file) {
	if (file == "") {
		return false
	}
	return true
}


// reindirizzamento della pagina
function vaia(indirizzo) {
	top.location.href = indirizzo
	}


// gestione dei menu in modo testo

function changeover(posizione) {
	identificativo = "menudx"+ posizione
	identificativolink = "menudx10"+ posizione
	vocemenu = document.getElementById (identificativo).style //eval (docObj + identificativo + styleObj)
	vocemenulink = document.getElementById(identificativolink).style //eval (docObj + identificativolink + styleObj)
	// settaggio dei colori di highlight
	// vocemenu.border = "top-style = outset, left-style = outset, bottom-style = inset, right-style=inset"
	vocemenu.background = "#DFDCCD" //"#FEC641"
	vocemenu.color = "#0080C0"
	vocemenu.border = "1px inset"
	vocemenulink.background = "#DFDCCD" 
	vocemenulink.color = "#0080C0"
	puntatore = eval('document.body' + styleObj)
	puntatore.cursor = 'hand'
}

function changeout(posizione) {
	identificativo = "menudx"+ posizione
	identificativolink = "menudx10"+ posizione
	vocemenu = document.getElementById(identificativo).style //eval (docObj + identificativo + styleObj)
	vocemenulink = document.getElementById(identificativolink).style //eval (docObj + identificativolink + styleObj)
	//vocemenu = eval (docObj + identificativo + styleObj)
	//vocemenulink = eval (docObj + identificativolink + styleObj)
	// settaggio dei colori di blur
	vocemenu.background = "#688397"
	vocemenu.color = "#FFFFFF"
	vocemenulink.background = "#688397"
	vocemenulink.color = "#FFFFFF"
	vocemenu.border = "1px outset"
	puntatore = eval('document.body' + styleObj)
	puntatore.cursor  = ''
}


// controllo inserimento dati nello scambio banner

function controlla_nomediffile(percorso_completo) {
	if (percorso_completo == "") 	{
		return false 
	} else {
		percorso_completo.toLowerCase()
		estensione = percorso_completo.substring(percorso_completo.length - 4, percorso_completo.length)
		if ((estensione != ".jpg") && (estensione != ".JPG") && (estensione != ".gif") && (estensione != ".GIF")) {
			return false
		}
	}
	return true
}

function controlla_banner() {
	if (document.collegamenti.nome.value == "" || document.collegamenti.cognome.value =="" || document.collegamenti.url_di_scambio.value == "" || document.collegamenti.urldestinazione.value == "")
	{
		alert ('compilare tutti i campi,\nper favore')
		return false
	}
	if (!controlla_nomediffile(document.collegamenti.banner.value))
	{
		alert('inserire un nome file\nvalido')
		return false
	}
	if (!validEmail(document.collegamenti.email.value))
	{
		alert('indirizzo di posta\nnon valido')
		return false
	}
	return true
}

// controllo sul form di ricerca

function se_non_vuoto(modulo) {
	stringa = modulo.chiavericerca.value
	if (stringa != "")
	{
		return true
	} else {
		return false
	}
}

// test per evitare che l'url sia legato ad againstwhat.it e per far esplodere un frameset
indirizzo = window.location.href
/*
if ( (indirizzo.indexOf("against",0) > 0))
		{ top.location.href = "http://www.lospaziobianco.it/" }
*/
// if (top.location.href != self.location.href) {
//	document.write('<a href="http://www.lospaziobianco.it/" target="_blank"><h1>clicca qui<h1></a>')
//}



// funzione per aggungere il sito ai preferiti

function addbookmark() {
	bookmarkurl="http://www.lospaziobianco.it/"
	bookmarktitle="Il fumetto e l'arte"
	if (document.all)
	window.external.AddFavorite(bookmarkurl,bookmarktitle)
}

// right click menu:

<!-- Web Site:  http://www.dynamicdrive.com -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
var menuskin = "skin1"; // skin0, or skin1
var display_url = 0; // Show URLs in status bar?
function showmenuie5() {
var rightedge = document.body.clientWidth-event.clientX;
var bottomedge = document.body.clientHeight-event.clientY;
if (rightedge < ie5menu.offsetWidth)
ie5menu.style.left = document.body.scrollLeft + event.clientX - ie5menu.offsetWidth;
else
ie5menu.style.left = document.body.scrollLeft + event.clientX;
if (bottomedge < ie5menu.offsetHeight)
ie5menu.style.top = document.body.scrollTop + event.clientY - ie5menu.offsetHeight;
else
ie5menu.style.top = document.body.scrollTop + event.clientY;
ie5menu.style.visibility = "visible";
return false;
}
function hidemenuie5() {
ie5menu.style.visibility = "hidden";
}
function highlightie5() {
if (event.srcElement.className == "menuitems") {
event.srcElement.style.backgroundColor = "#E8E8E8";
event.srcElement.style.color = "#005680";
if (display_url)
window.status = event.srcElement.url;
   }
}
function lowlightie5() {
if (event.srcElement.className == "menuitems") {
event.srcElement.style.backgroundColor = "";
event.srcElement.style.color = "#E8E8E8";
window.status = "";
   }
}
function jumptoie5() {
if (event.srcElement.className == "menuitems") {
if (event.srcElement.getAttribute("target") != null)
window.open(event.srcElement.url, event.srcElement.getAttribute("target"));
else
window.location = event.srcElement.url;
   }
}

// fine right click menu

// rl-->


