/*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";
 }
}*/


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";
 }
}
window.onload = externalLinks;



var on_color = "#993300";
var off_color = "#CC6600";
var blink_onoff = 1;
var blinkspeed= 600;
function blink()
{
        if( blink_onoff == 1) {
           document.all.blink.style.color = on_color;
           blink_onoff = 0;
        }
        else {
           document.all.blink.style.color = off_color;
           blink_onoff = 1;
        }
}

function apriPOPUP(nome,titolo,larg,alt,l,t) {
newWindow = window.open(nome,titolo,'width=' + larg + ',height=' + alt + ',top=' + l + ',left=' + t +',scrollbars=yes');
newWindow.focus()
}

function PrevFoto(img){
  foto1= new Image();
  foto1.src=(img);
  Controlla(img);
}

function Controlla(img){
  if((foto1.width!=0)&&(foto1.height!=0)){
    viewFoto(img);
  }
  else{
    funzione="Controlla('"+img+"')";
    intervallo=setTimeout(funzione,20);
  }
}

function viewFoto(img){
  largh=foto1.width+20;
  altez=foto1.height+25;
  stringa="width="+largh+",height="+altez+",top="+120+",left="+120;
  finestra=window.open(img,"",stringa);
}



function goPage (newURL) {
   	if (newURL != "") {
   	if (newURL == "-" ) {
			resetMenu();			
		} else {  	
   			document.location.href = newURL;
   		}
   	}
}

function VideoPopUp(url) { 

var parametri="location=no,directories=no,menubar=no,toolbar=no,status=no,fullscreen=no";

parametri=parametri+",scrollbars=no,resizable=no,height=430,width=450";

newWin = window.open(url,"popup",parametri); 

newWin.opener = top; 

} 

var stile = "top=0, left=0, width=400, height=150, status=no, menubar=no, toolbar=no scrollbar=no titlebar=no";
     function popup(apri) {
        window.open(apri, "", stile);
     }
