var xmlhttp;

function ajaxFunction() {

	//xmlhttp=GetXmlHttpObject();
	if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari
  		xmlhttp=new XMLHttpRequest();
  	}
	else if (window.ActiveXObject) { // code for IE6, IE5
  		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  	}
	else {
		alert ("Your browser does not support XMLHTTP!");
  		return null;
  	}

	xmlhttp.onreadystatechange=function() {
		if(xmlhttp.readyState == 4) {
  			document.myForm.time.value=xmlhttp.responseText;
  		}
	}

	/*xmlhttp.open("GET","time.asp",true);
	xmlhttp.send(null);*/
}

function showClip(n) {
	/*if (str.length==0) {
  		document.getElementById("txtHint").innerHTML="";
  		return;
  	}*/

	//xmlhttp=GetXmlHttpObject();
	if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari
  		xmlhttp=new XMLHttpRequest();
  	}
	else if (window.ActiveXObject) { // code for IE6, IE5
  		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  	}
	else {
		alert ("Your browser does not support XMLHTTP!");
  		return null;
  	}

	if (xmlhttp==null) {
  		alert ("Your browser does not support XMLHTTP!");
  		return;
  	}

	var url="time.asp";

	xmlhttp.onreadystatechange=function() {
		if (xmlhttp.readyState == 4) {
		   switch (n) {
			case 0:
  			document.getElementById("clip").innerHTML="<embed src=NewKeyboard.mp4 width=320 height=500 autoplay=true controller=true pluginspage=http://www.apple.com/quicktime/download/></embed>";
			break;

			case 1:
  			document.getElementById("clip").innerHTML="<embed src=KeyboardInput.mp4 width=320 height=500 autoplay=true controller=true pluginspage=http://www.apple.com/quicktime/download/></embed>";
			break;

			case 2:
  			document.getElementById("clip").innerHTML="<embed src=RightToLeft.mp4 width=320 height=500 autoplay=true controller=true pluginspage=http://www.apple.com/quicktime/download/></embed>";
			break;

			case 3:
  			document.getElementById("clip").innerHTML="<embed src=MixedMode.mp4 width=320 height=500 autoplay=true controller=true pluginspage=http://www.apple.com/quicktime/download/></embed>";
			break;

			case 4:
  			document.getElementById("clip").innerHTML="<embed src=TimesTable.mp4 width=320 height=500 autoplay=true controller=true pluginspage=http://www.apple.com/quicktime/download/></embed>";
			break;

			case 5:
  			document.getElementById("clip").innerHTML="<embed src=ReportCard.mp4 width=320 height=500 autoplay=true controller=true pluginspage=http://www.apple.com/quicktime/download/></embed>";
			break;

		   }
  		}
	}

	xmlhttp.open("GET",url,true);
	xmlhttp.send(null);
}


/*
function GetXmlHttpObject() {
	if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari
  		xmlhttp=new XMLHttpRequest();
  	}
	else if (window.ActiveXObject) { // code for IE6, IE5
  		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  	}
	else {
  		return null;
  	}
}




*/

