function m_externalLinks() {
  if (typeof document.getElementsByTagName == "undefined") {
    return;
  }
  var anchors = document.getElementsByTagName("a");
  //var mesg = "(this link opens in a new window)";
  for (var i = 0; i < anchors.length; i++) {
    var anchor = anchors[i];
    var rel = "" + anchor.getAttribute("rel");
    if (
      typeof anchor.hostname != "undefined"
      && typeof anchor.protocol != "undefined"
      && anchor.protocol.indexOf("javascript") < 0
      && (
        (
          rel.length > 0
          && rel.indexOf("blank") >= 0
        )
        || (
          (
            rel.length == 0
            || rel.indexOf("self") < 0
          )
          && anchor.hostname != document.location.hostname
        )
      )
    ) {
      anchor.target = "_blank";
     //  if (typeof anchor.title != "undefined") {
//         anchor.title = (anchor.title ? anchor.title + " " : "") + mesg;
//       }
//       else {
//         anchor.title = mesg;
//       }
    }
  }
}






function preparaLinks() {
  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.onclick = function ()
			 {
			 	  return pop(this.href)
			 }  
			}
 }

var popUp = null;

function pop(url)
{

   var w = 400;
   var h = 560;
   var l = (screen.availWidth-10 - w) / 2;
   var t = (screen.availHeight-20 - h + 90) / 2;

   var dettagli = "width="+w+",height="+h+",left="+l+",top="+t;
   dettagli += ",screenX="+l+",screenY="+t;
   dettagli += ",scrollbars=1,resizable=1,location=0";
   dettagli += ",menubar=0,toolbar=0,status=0";
   
   
	if (popUp && !popUp.closed)
		popUp.location.href = url;
	else
		popUp = window.open(url, "privacy", dettagli);

	popUp.focus();
	return false;
}
 