
<!-- Popup Script for the Streaming Media :: Written by Peter Schultheiss

// POPUP FUNCTION
var popupWindow = null;
var openwin = null;
var num = 1;

function popup(strTarget, strTitle, strDesc) {
  // quick check for parameters...
  if (!strTarget || !strTitle || !strDesc) {
    alert("JavaScript Function is Missing Parameters!");
    return false;
  }

  // internet explorer can close the open window...
  if (popupWindow && document.all) {
    popupWindow.close();
    popupWindow = null;
  }

  var winwidth  = 420;
  var winheight = 194;

  if (screen.availWidth && screen.availHeight) {
    var wintop  = eval((screen.availHeight - winheight)/2);  // calculated top value
    var winleft = eval((screen.availWidth - winwidth)/2);    // calculated left value
  }
  else  {
    var wintop  = 0;  // position in upper-left corner
    var winleft = 0;
  }

  var myTarget = "";
  myTarget += "http://www.realtechmedia.com/popup.php?link=" + strTarget;
  myTarget += "&t=" + escape(strTitle);
  myTarget += "&d=" + escape(strDesc);

  var myName = "popupWindow" + num;
  openwin = myName;

  var myAttributes = "";
  myAttributes += "top=" + wintop + ",left=" + winleft + ",width=" + winwidth + ",height=" + winheight + ",";
  myAttributes += "scrollbars=no,resizable=no,status=0";

  // open the window...
  popupWindow = window.open(myTarget,myName,myAttributes);

  // focus on window...
  if (parseInt(navigator.appVersion) >= 4) {
    // delay a bit here because of IE4 bug...
    setTimeout('popupWindow.focus();', 250);
  }

  // update the counter...
  num++;
}

// Stop Hiding Javascript -->

