function doPopups() {
  if (!document.getElementsByTagName) return false;
  var links=document.getElementsByTagName("a");
  for (var i=0; i < links.length; i++) {
    if (links[i].href.indexOf("bridgit\.geredonovan\.com") != -1 && links[i].className.indexOf("basket") == -1) {
		links[i].className += " basket";
    }
  }
  for (var i=0; i < links.length; i++) {
    if (links[i].rel.match("us")) { // rel on the newsletter signup form
      links[i].onclick=function() { // Next two lines should be on one line
        window.open(this.href, "", "top=40,left=40,width=700,height=500,scrollbars,resizable");
        return false;
      }
    } else if (links[i].rel.match("external")) { // rel on the newsletter signup form
      links[i].onclick=function() { // Next two lines should be on one line
        window.open(this.href, "", "top=40,left=40,width=800,height=600,scrollbars,resizable");
        return false;
      }
    } else if (links[i].className.match("basket")) { // rel on the newsletter signup form
      links[i].onclick=function() { // Next two lines should be on one line
        basketwindow = window.open(this.href, "basket", "top=40,left=40,width=840,height=600,scrollbars,resizable");
        if (window.focus) {basketwindow.focus()}
        return false;
      }
    }
  } 
}
window.onload=doPopups;
