// JScript File

			function creat_Object()
			{
			var xmlhttp;
			// This if condition for Firefox and Opera Browsers
			if (!xmlhttp && typeof XMLHttpRequest != 'undefined')
			{
			try
			{
			xmlhttp = new XMLHttpRequest();
			}
			catch (e)
			{
			alert("Your browser is not supporting XMLHTTPRequest");
			xmlhttp = false;
			}
			}
			// else condition for ie
			else
			{
			xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
			}
			return xmlhttp;
			}

			var requestFlash = creat_Object();
			    
			function getRandomImg() {
			try{
               		 //date is used to create a random url so that IE doesn't cache the image
			    requestFlash.open("GET", "randomImage.aspx?dt=" + new Date().getTime(), true);
			    requestFlash.onreadystatechange = updatePageVid;
			    requestFlash.send(null);
			} catch (e){}
			}
			function updatePageVid()
			{
			  try{
			    if (requestFlash.readyState == 1) {
				if(document.getElementById('imgholder'))
				{
			        		document.getElementById('imgholder').innerHTML = "loading...";
				}
			    }
			    if (requestFlash.readyState == 4) {
			        if (requestFlash.status == 200) {
			            var html = requestFlash.responseText;
				if(document.getElementById('imgholder'))
				{
			                document.getElementById('imgholder').src = html;
				}
			        }
			    }
			} catch (e){}
			}

			function getRotatingGraphic()
			{
			try{
			    getRandomImg();
			   //change number below to alter the delay in milliseconds
			  //between image changes  
			   setTimeout("getRotatingGraphic()",5000); 
			} catch (e){}
			}
			window.onload = function() { getRandomImg(); getRotatingGraphic();}

