// Gereric Popup window script ** version 1.2 **

var popupLinkConfig = new Array;
popupLinkConfig["popup"] = new Array ( "_blank", "");

function initPopupLinks()
{
  if (!document.getElementsByTagName) return true;
  for (var theKey in popupLinkConfig) 
  {
    var pttrn = " "+ theKey + " ";
    var theLinks = document.getElementsByTagName("a");
    for (var i = 0; i < theLinks.length; i++) 
    {
      var theClassName = " " + theLinks[i].className + " " + theLinks[i].parentNode.className + " ";
      if (theClassName.indexOf(pttrn) > -1)
      {
        theLinks[i].onclick = popUp;
      }
    }
  }
  return true;
}

function popUp()
{
  var theClassName = " " + this.className + " " + this.parentNode.className + " ";
  for (var theKey in popupLinkConfig) 
  {
    if (theClassName.indexOf(" " + theKey + " ") > -1)
    {
      var target = ((this.target != "") && (this.target != null)) ? this.target : (popupLinkConfig[theKey][0] != "") ? popupLinkConfig[theKey][0] : theKey;
      var settings = popupLinkConfig[theKey][1];
      newWin = window.open(this.href, target, settings);
      newWin.focus();
      return false;
    }
  }
  return false;
}


