// JavaScript Document

function pulisciBox() {
	if (document.forms[0].query.value == "cerca nel sito") {
		document.forms[0].query.value = "";
	}
}


function altroSito(url, target, features) {
    var theWindow = window.open(url, '_blank2');
	window.blur();
	window.focus();
    theWindow.focus();
    return theWindow;
}


function scorriDoc(direzione) {
   if (direzione == "avanti") {
      document.forms[2].pagina.value++;
   }
   else {
      document.forms[2].pagina.value--;
   }
   document.forms[2].submit();
}


function azzeraRicerca() {
   document.forms[1].pagina.value = 1;
   document.forms[1].submit();
}


function externalLinks() { 
	if (!document.getElementsByTagName) return;
	   var anchors = document.getElementsByTagName("a"); for (var i=0; i<anchors.length; i++) { 
	   var anchor = anchors[i]; 
	   if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external") anchor.target = "_blank"; 
	} 
}
