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;
}

function PlayVideo(id) {
	xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null) {
		alert ("Browser does not support HTTP Request");
		return;
	}
	var url="http://www.hokiesports.com/assets/video/playlist.php"
	url=url+"?function=PlayVideo"
	url=url+"&id="+id
	url=url+"&sid="+Math.random();

	xmlHttp.onreadystatechange=function () { 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { 
			document.getElementById('videoinfo').innerHTML=xmlHttp.responseText ;
		} 
	} 
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}

function PlayVideoSport(id) {
	xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null) {
		alert ("Browser does not support HTTP Request");
		return;
	}
	var url="http://www.hokiesports.com/assets/video/playlistsport.php"
	url=url+"?function=PlayVideSport"
	url=url+"&id="+id
	url=url+"&sid="+Math.random();

	xmlHttp.onreadystatechange=function () { 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { 
			document.getElementById('videoinfo').innerHTML=xmlHttp.responseText ;
		} 
	} 
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}

function setSection(id) {
	xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null) {
		alert ("Browser does not support HTTP Request");
		return;
	}
	var url="http://www.hokiesports.com/assets/video/gallery.php"
	url=url+"?function=setSection"
	url=url+"&id="+id
	url=url+"&sid="+Math.random();

	xmlHttp.onreadystatechange=function () { 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { 
			document.getElementById('video_area').innerHTML=xmlHttp.responseText ;
		} 
	} 
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}

function loadVideo(videoid) {
	jQuery('#videoinfo').html('<script type="text/javascript" src="http://www.hokiesports.com/video/admin/video/m/video.js"></script><div id="content-'+videoid+'"></div><script type="text/javascript">SlideShowProVideo({attributes: {id: "content-'+videoid+'",width: 265,height: 199,playBttn: "/assets/img/play.png"},params: {bgcolor: "#000000",allowfullscreen: true},flashvars: {apiPath: "http://www.hokiesports.com/video/admin/video/index.php?",videoId: '+videoid+'}});</script>');
	return false;
}

function loadVideoLarge(videoid) {
	jQuery('#videoinfo').html('<script type="text/javascript" src="http://www.hokiesports.com/video/admin/video/m/video.js"></script><div id="content-'+videoid+'"></div><script type="text/javascript">SlideShowProVideo({attributes: {id: "content-'+videoid+'",width: 640,height: 500,playBttn: "/assets/img/play.png"},params: {bgcolor: "#000000",allowfullscreen: true},flashvars: {apiPath: "http://www.hokiesports.com/video/admin/video/index.php?",videoId: '+videoid+'}});</script>');
	return false;
}


