// DEFINE AJAX OBJECT FOR YOUR BROWSER
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;
}
// GET INFORMATION
function stateChange(){
	xmlHttp=GetXmlHttpObject();
	xmlHttp.onreadystatechange=function()
    {
      if(xmlHttp.readyState==4) // COMPLETE
      {
        document.getElementById("time").innerHTML=xmlHttp.responseText;
      }
    }	
	xmlHttp.open("GET","time.php",true);
	xmlHttp.send(null);
}

function ajaxFunction(timefile)
{
		window.setInterval("stateChange()",1000);
}

function confirmdownload(){
	alert("NOTICE! Inventory information is updated automatically every hour. Downloading it can result in inaccurate values. Do you wish to continue?");
}

function setAction(){
	for (x=0; x<document.leftsearch.saction.length; x++)
	{
			if (document.leftsearch.saction[x].checked) {
				document.leftsearch.action = document.leftsearch.saction[x].value;
			}
	}
return true;
}

function mywindow(mylink)
{
	window.open(mylink,'',"scrollbars=yes,width=400,height=500");
}