/*

setTimeout('document.getElementById("infomessage").style.color="#00CC00"',3000);
setTimeout('document.getElementById("infomessage").style.color="#00CCff"',3500);
setTimeout('document.getElementById("infomessage").style.color="#CCCCCC"',4100);
setTimeout('document.getElementById("infomessage").innerHTML="&nbsp;"',4500);
*/
/*window.onbeforeunload = function()
{
	var value=window.confirm("Are you sure, you want to logout!");
	
	if(value==false)
	{
		value="";
		return value;
	}
	if(value==true)
	{	
		showContent('adm-ajax.php','','1','','');
		
	}
}*/

// function time_input()
// {
// var a = showContent('adm-ajax.php','','1','div_chg','');
// return a;
// }
// 
// function interval()
// {
// setInterval("time_input()",30000);
// }


function update_cash(amt)
{
  if(amt!='undefined') 
   { document.getElementById("cash").innerHTML="&nbsp;$"+amt;  }	
}

function Ajax(){
var xmlHttp;
	try{	
	
		xmlHttp=new XMLHttpRequest();// Firefox, Opera 8.0+, Safari
	}
	catch (e){
		try{
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); // Internet Explorer
		}
		catch (e){
		    try{
				xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e){
				alert("No AJAX!?");
				return false;
			}
		}
	}

xmlHttp.onreadystatechange=function(){
	if(xmlHttp.readyState==4)
	{
                var msg=xmlHttp.responseText.split('|');
                
                if(msg[1]=="logout" || msg[1]==" ,logout")
			   {
				 window.location.reload();
			   }
		document.getElementById('cash').innerHTML=xmlHttp.responseText;
		setTimeout('Ajax()',1000);
	}
}
xmlHttp.open("GET","auto_refresh.php",true);
xmlHttp.send(null);
}


function Ajax_Timer(){
var xmlHttp;
	try{	
	
		xmlHttp=new XMLHttpRequest();// Firefox, Opera 8.0+, Safari
	}
	catch (e){
		try{
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); // Internet Explorer
		}
		catch (e){
		    try{
				xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e){
				alert("No AJAX!?");
				return false;
			}
		}
	}

xmlHttp.onreadystatechange=function(){
	if(xmlHttp.readyState==4)
	{
                var msg=xmlHttp.responseText.split('|');
                
                if(msg[1]=="logout" || msg[1]==" ,logout")
			   {
				 window.location.reload();
			   }
   
		document.getElementById('timers').innerHTML=xmlHttp.responseText;
		setTimeout('Ajax_Timer()',5000);
	}
}
xmlHttp.open("GET","you.php",true);
xmlHttp.send(null);
}



