// JavaScript Document
var XmlHttp;

function VideoShowList(str,xcamid,limitrow) {
	xmlHttp=GetXmlHttpObject();
 	if (xmlHttp==null) {
 		alert ("Browser does not support HTTP Request");
		return;
  	} 
	
	var url="videoshow.php";
	url=url+"?file="+str;
	url=url+"&xcamid="+xcamid;
	url=url+"&limitrow="+limitrow;
	xmlHttp.onreadystatechange=VideoShowstateChanged ;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
} 

function VideoShowstateChanged() { 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { 
		document.getElementById("videoshow").innerHTML=xmlHttp.responseText 
	} else {
		document.getElementById("videoshow").innerHTML='<br/><br/><br/><br/>LOADING...' 	
	}
}
//
function TeacherVideoShowList(str,xcamid) {
	xmlHttp=GetXmlHttpObject();
 	if (xmlHttp==null) {
 		alert ("Browser does not support HTTP Request");
		return;
  	} 
	
	var url="teachervideoshow.php";
	url=url+"?file="+str;
	url=url+"&xcamid="+xcamid;
	xmlHttp.onreadystatechange=TeacherVideoShowstateChanged ;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
} 

function TeacherVideoShowstateChanged() { 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { 
		document.getElementById("teachervideoshow").innerHTML=xmlHttp.responseText 
	} else {
		document.getElementById("teachervideoshow").innerHTML='<br/><br/><br/><br/>LOADING...' 	
	}
}
//
function TeacherList(str) {
	xmlHttp=GetXmlHttpObject();
 	if (xmlHttp==null) {
 		alert ("Browser does not support HTTP Request");
		return;
  	} 
	
	var url="teacherlist.php";
	url=url+"?collegeid="+str;
	xmlHttp.onreadystatechange=stateChanged ;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
} 

function stateChanged() { 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { 
		document.getElementById("teacher").innerHTML=xmlHttp.responseText 
	} 
}
/////////////////////////////////////////////////////////////////////
function SectionList(teacherstr) {
	xmlHttp=GetXmlHttpObject();
 	if (xmlHttp==null) {
 		alert ("Browser does not support HTTP Request");
		return;
  	} 
	
	var url="sectionlist.php";
	url=url+"?teacherid="+teacherstr;
	xmlHttp.onreadystatechange=SectionstateChanged ;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
} 

function SectionstateChanged() { 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { 
		document.getElementById("section").innerHTML=xmlHttp.responseText 
	} 
}
////////////////////////////////////////////////////////////////////
function SubmenuList(catidstr) {
	xmlHttp=GetXmlHttpObject();
 	if (xmlHttp==null) {
 		alert ("Browser does not support HTTP Request");
		return;
  	} 	
	var url="submenu.php";
	url=url+"?catid="+catidstr;
	xmlHttp.onreadystatechange=SubmenustateChanged ;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
} 

function SubmenustateChanged() { 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { 
		document.getElementById("dropsubmenu").innerHTML=xmlHttp.responseText 
	} 
}
////////////////////////////////////////////////////////////////////
function GetXmlHttpObject() {
	var xmlHttp=null;
	try {
		// Firefox, Opera 8.0+, Safari
		xmlHttp=new XMLHttpRequest();
 	}
	catch (e) {
		// Internet Explorer
 		try {
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		}
	catch (e) {
			xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
	}
return xmlHttp;
}