function popup(url,width,height,name){
		if (width == null) width = 400;
		if (height == null) height = 425;
		if (name == null) name = "Popup Window";
		var props = "toolbar=no,location=no,status=no,scrollbars=yes,resizable=yes,titlebar=no,menubar=no,width="+width+",height="+height;
		w = window.open(url, name, props);
		if (w) {
			w.focus();
		}
}

function GenerateImage(id, url) {
	document.getElementById(id).src = url;
}

function loadData(day)
{
var xmlhttp;
document.getElementById('epg').innerHTML='<div id="epgloading"><img src="/images/loading.gif" /></div>';
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
    document.getElementById("epg").innerHTML=xmlhttp.responseText;
    }
  }
xmlhttp.open("GET","/script/epgdate.php?day=" + day,true);
xmlhttp.send();
epgSelect("epg"+day); 
}

function epgSelect(item) {
	for(var x=0;x<=6;x++) {
		document.getElementById('epg'+x).style.background="#e5e3f1";
		document.getElementById('epg'+x).style.color="#242176";
	}
	document.getElementById(item).style.background="#b2acd3";
	document.getElementById(item).style.color="#FFFFFF";
	return false;
}


