//allow external link to open in new window AND valid XHTML Strict
function externalLinks() { 
 if (!document.getElementsByTagName) return; //if not supported exit; displays pages in current browser window
 var anchors = document.getElementsByTagName("a"); //get all anchors on page
 for (var i=0; i<anchors.length; i++) { //run through all anchors
   var anchor = anchors[i]; //get one anchor to test
   if (anchor.getAttribute("href") && anchor.className == "external") {//if href and class=external then...
     anchor.target = "_blank"; //show the new page in a new window
     if (anchor.title) anchor.title += " (Il link apre il sito in una nuova finestra)";
     if (!anchor.title) anchor.title = "Il link apre il sito in una nuova finestra";
 } 
 }
} 
window.onload = externalLinks; //do the magic onload

