// *******************Funzione limite caratteri in contatti
<!-- 
function controlla(f,saibal_form,maxlettere) 
{ 
if (f.value.length > maxlettere) 
f.value = f.value.substring(0,maxlettere); 
} 
// --> 


// *******************Funzione di stampa nel menu tasto destro
function printit(){  
if (NS) {
    window.print() ;  
} else {
    var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
document.body.insertAdjacentHTML('beforeEnd', WebBrowser);
    WebBrowser1.ExecWB(6, 2);
  WebBrowser1.outerHTML = "";  
}
}


// *******************Preferiti
//configure the two variables below to match yoursite's own info
var bookmarkurl="http://alternativarock.altervista.org/"
var bookmarktitle="ALTERNATIVA ROCK FESTIVAL 2005"

function addbookmark(){
if (document.all)
window.external.AddFavorite(bookmarkurl,bookmarktitle)
}


// **************centro pop up in spettacoli

function centrato(URL,nome){
largo=587; 
alto=400; 
posh=Math.floor((screen.height-alto)/2); 
posw=Math.floor((screen.width-largo)/2); 
fin=window.open(URL,nome,"width="+largo+",height="+alto+",location=no,scrollbars=yes,top="+posh+",left="+posw); 
fin.focus(); 
}



// **************centro pop up in foto spettacoli -orizzontali-

function orizzontale(URL,nome){
largo=350; 
alto=310; 
posh=Math.floor((screen.height-alto)/2); 
posw=Math.floor((screen.width-largo)/2); 
fin=window.open(URL,nome,"width="+largo+",height="+alto+",location=no,scrollbars=no,top="+posh+",left="+posw); 
fin.focus(); 
}



// **************centro pop up in foto spettacoli -verticali-

function verticale(URL,nome){
largo=230; 
alto=326; 
posh=Math.floor((screen.height-alto)/2); 
posw=Math.floor((screen.width-largo)/2); 
fin=window.open(URL,nome,"width="+largo+",height="+alto+",location=no,scrollbars=no,top="+posh+",left="+posw); 
fin.focus(); 
}



// **************centro pop up in credits

function credits(URL,nome){
largo=457; 
alto=257; 
posh=Math.floor((screen.height-alto)/2); 
posw=Math.floor((screen.width-largo)/2); 
fin=window.open(URL,nome,"width="+largo+",height="+alto+",location=no,scrollbars=no,top="+posh+",left="+posw); 
fin.focus(); 
}


// **************stile della galleria foto

var OPER=navigator.userAgent.indexOf("Opera");
if(document.layers){
document.write("<link rel='stylesheet' href='stileNN.css' type='text/css'>");
}
else if((OPER>-1)) {
document.write("<link rel='stylesheet' href='stile.css' type='text/css'>");
}
else if(document.all) {
document.write("<link rel='stylesheet' href='stile.css' type='text/css'>");
}
else if(document.getElementById){
document.write("<link rel='stylesheet' href='stile.css' type='text/css'>");
}


// **************centra pop up nella galleria foto

//finestra centrale
var win = null;
function NewWindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+'';
win = window.open(mypage,myname,settings)
}


// **************pop up 

function stampa(URL,nome){
largo=670; 
alto=400; 
posh=Math.floor((screen.height-alto)/2); 
posw=Math.floor((screen.width-largo)/2); 
fin=window.open(URL,nome,"width="+largo+",height="+alto+",location=no,scrollbars=yes,top="+posh+",left="+posw); 
fin.focus(); 
}


// **************campo obbligatorio in segnala il sito

function validate(theform) {
	if (theform.mailamico.value=="") {
		alert("Devi riempire tutti i campi !");
		return false; }
	 else { return true; }
}


// **************campo obbligatorio in segnala il sito germania

function validate_ger(theform) {
	if (theform.mailamico.value=="") {
		alert("Sie müssen alle die Felder ausfüllen !");
		return false; }
	 else { return true; }
}


// **************campo obbligatorio in segnala il sito uk

function validate_uk(theform) {
	if (theform.mailamico.value=="") {
		alert("You must fill in all the fields !");
		return false; }
	 else { return true; }
}


// **************campo obbligatorio in segnala il sito francia

function validate_fra(theform) {
	if (theform.mailamico.value=="") {
		alert("Vous devez remplir tous les champs !");
		return false; }
	 else { return true; }
}


