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 = 450;
   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;
}



 window.onload = preparaLinks;
 