// DOM Style Controls - by Paul @ Yellow Pencil .com

function scriptInit() {
if (!document.getElementById) {
	return;
	}
}
function addEvent(elm, evType, fn, useCapture) {
	if (elm.addEventListener) {
	elm.addEventListener(evType, fn, useCapture);
	return true;
	} else if (elm.attachEvent) {
	var r = elm.attachEvent('on' + evType, fn);
	return r;
	} else {
	elm['on' + evType] = fn;
	}
}
/*
function setAds() {
	var cont = document.getElementById('content').offsetHeight;
	var ads = document.getElementById('ads');
	var srch = document.getElementById('search').offsetHeight;
	var ltst = document.getElementById('latest-program').offsetHeight;
	var diff = (cont - (ads.offsetHeight + srch + ltst) - 25);
	ads.style.height = ((ads.offsetHeight + diff) + 'px');
}

addEvent(window, 'load', setAds, false);
*/
function Category_Select(obj)
{
	var category_id = obj.value;
	location.href = 'programs.php?categoryid=' + category_id;
}
function openPlayer(winURL, winName, winFeatures, winObj)
{
  var theWin;
  if (winObj != null)
  {
    if (!winObj.closed) {
      winObj.focus();
      return winObj;
    }
  }
  theWin = window.open(winURL, winName, winFeatures);
  return theWin;
}