var xmlHttp

function GetXmlHttpObject(){ 
	var objXMLHttp=null
	if (window.XMLHttpRequest)	{
		objXMLHttp=new XMLHttpRequest()
	}
	else if (window.ActiveXObject)	{
		objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
	}
	return objXMLHttp
}

function show_progDetail(pid){ 
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)	{
		alert ("Browser does not support HTTP Request")
	return
	} 
	
	var url="prog_display_ajax.php"	
	url=url+"?pid="+pid
	
	xmlHttp.onreadystatechange = stateChanged
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}

function show_story(cid){ 
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)	{
		alert ("Browser does not support HTTP Request")
	return
	} 
	
	var url="floatStory_ajax.php"	
	url=url+"?cid="+cid
	
	xmlHttp.onreadystatechange = stateChange_cs
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}

function show_videoList(lid){ 
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)	{
		alert ("Browser does not support HTTP Request")
	return
	} 
	
	var url="videoList_ajax.php"	
	url=url+"?lid="+lid
	
	xmlHttp.onreadystatechange = stateChange1
	xmlHttp.open("POST",url,true)
	xmlHttp.send(null)
}

function stateChanged() { 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ 
		document.getElementById("prog_box_b").innerHTML=xmlHttp.responseText 
	} 
}

function stateChange1() { 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ 
		document.getElementById("video_list").innerHTML=xmlHttp.responseText 
	} 
}

function stateChange_cs() { 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ 
		document.getElementById("float_story").innerHTML=xmlHttp.responseText 
	} 
}


