function displayWindow(url, width, height) {
        var Win = window.open(url,"displayWindow",'width=' + width + ',height=' + height + ',resizable=0,scrollbars=yes,menubar=no,left=100,top=100' );
}

function MDM_openWindow(theURL,winName,features) 
{ 
  var docWidth = 680;
  var docHeight = 325;
  var newLeft = Math.floor(screen.width/2)-Math.floor(docWidth/2);
  var newTop = Math.floor((screen.height-40)/2)-Math.floor(docHeight/2); //normalnie (-55)

  features+=','+'width='+docWidth+',';
  features+='height='+docHeight+',';
  features+='top='+newTop+',';
  features+='left='+newLeft+'+';
  var _W=window.open(theURL,winName,features);
  _W.focus();
}

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") == "blank")
anchor.target = "_blank";
}
}
window.onload = externalLinks;
