/* LBE */
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.href && anchor.rel == "external") {       
     anchor.target = "_blank";
   }   
 }
}
window.onload = externalLinks;


function popupForm(sideid, height) {
  if (height != null && height != "") {
    h = height;
  } else {
    h = 500;
  }
  w = 586;
//  link = "http://www.ebst.dk/form/form.xsql?emne="+sideid;
  link = "/"+sideid+"/0/199";

  fromLeft = (screen.width-w)/2;
  fromTop = (screen.height-h)/2;

  open(link,"_blank","left="+fromLeft+",top="+fromTop+",width="+w+",height="+h+",status=no,toolbar=no,menubar=no,scrollbars=yes,resizable=yes");
}


function mailMe() {
  var URL = '' + encodeURIComponent(location.href);
  var rr_subject = encodeURIComponent("Du er blevet tippet");
  var rr_body = encodeURIComponent("Hej, Jeg har fundet en side du skal se:");
  location.href="mailto:?subject=" + rr_subject + "&body=" + rr_body + escape('\n')+URL;
} 