var popupLinkConfig = new Array;

// popupLinkConfig["classname"] = new Array ( "targetname", "width=550,height=350,scrollbars=yes,resizable=yes,status=yes,toolbar=yes,location=yes,menubar=yes");
popupLinkConfig["770"] = new Array ( "Dibble Media", "width=530,height=600,scrollbars=yes");
popupLinkConfig["710"] = new Array ( "Dibble Media", "width=530,height=600,scrollbars=yes");
popupLinkConfig["670"] = new Array ( "Dibble Media", "width=530,height=600,scrollbars=yes");
popupLinkConfig["590"] = new Array ( "Dibble Media", "width=520,height=590");
popupLinkConfig["520"] = new Array ( "Dibble Media", "width=520,height=520");
popupLinkConfig["455"] = new Array ( "Dibble Media", "width=520,height=455");
popupLinkConfig["375"] = new Array ( "Dibble Media", "width=520,height=375");
popupLinkConfig["335"] = new Array ( "Dibble Media", "width=520,height=335");
popupLinkConfig["sca"] = new Array ( "Dibble Media", "width=750,height=600,scrollbars=yes,resizable=yes");
popupLinkConfig["380"] = new Array ( "Dibble Media", "width=525,height=390");
popupLinkConfig["355"] = new Array ( "Dibble Media", "width=525,height=355");
popupLinkConfig["355"] = new Array ( "Dibble Media", "width=510,height=355");
popupLinkConfig["355"] = new Array ( "Dibble Media", "width=510,height=355");
popupLinkConfig["355"] = new Array ( "Dibble Media", "width=510,height=355");
popupLinkConfig["355"] = new Array ( "Dibble Media", "width=510,height=355");
popupLinkConfig["355"] = new Array ( "Dibble Media", "width=510,height=355");



// ==========================================================================
window.onload = initPage;  
// Note: Make sure that no other javscripts assign a fuction to window.onload
// There can be only one function tied to window.onload at a time.

function initPage() {
  initPopupLinks();
  // place here any other code you wish to run when the page loads.
}

function initPopupLinks()
{
  if (!document.getElementsByTagName) return true;
  var pageLinks = document.getElementsByTagName("a");
  for (var i = 0; i < pageLinks.length; i++) 
  {
    if (((pageLinks[i].className != null) && 
         (pageLinks[i].className != "")) ||
        ((pageLinks[i].parentNode.className != null) && 
         (pageLinks[i].parentNode.className != "")))
    {
      var linkClass = " " + pageLinks[i].className + " ";
      if ((linkClass == "  ") && (pageLinks[i].parentNode.className != ""))
      {
        linkClass = " " + pageLinks[i].parentNode.className + " ";
      }
      for (var theKey in popupLinkConfig) 
      {
        if (linkClass.indexOf(" " + theKey + " ") > -1)
        {
          if ((pageLinks[i].target == "") || (pageLinks[i].target == null))
          {
            pageLinks[i].target = (popupLinkConfig[theKey][0] != "") ? popupLinkConfig[theKey][0] : theKey;
          }
          pageLinks[i].settings = popupLinkConfig[theKey][1];
          pageLinks[i].onclick = popUp;
        }
      }
    }
  }
  return true;
}

function popUp()
{
  newWin = window.open(this.href, this.target, this.settings);
  newWin.focus();
  return false;
}
