///////////////////////////////Logout Script

<!--
function log_out()
{
	ht = document.getElementsByTagName("body");
	ht[0].style.filter = "progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)";
	if (confirm('Are You Sure You Want To Logout?'))
	{
		return true;
	}
	else
	{
		ht[0].style.filter = "";
		return false;
	}
}
//-->
Image1= new Image(50,60)
Image1.src = "images/loading.gif"

///////////////////////////////Ajax Script

if (window.XMLHttpRequest) 
{ 
    xmlHttp = new XMLHttpRequest();
    xmlHttp.overrideMimeType('text/html');
} 
else if (window.ActiveXObject) 
{ 
    xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}

var MyContainer,Loading;
var FieldsArray = [];
function AjaxPage(url,ContainerName,MyPost)
{
	Loading = 0;
	MyContainer = ContainerName;
	document.getElementById(MyContainer).style.visibility = "visible";  //or "visible"
	url = url;
	xmlHttp.open("POST", url, true);
	xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	xmlHttp.setRequestHeader("Content-Type", "text/html; charset=windows-1256");
	xmlHttp.onreadystatechange = updatePage;
	xmlHttp.send(MyPost);
}

function updatePage() {
  if (xmlHttp.readyState == 4 || Loading==1)
  {
  	if (xmlHttp.status == 200)
  	{
	    var response = xmlHttp.responseText;
	    document.getElementById(MyContainer).innerHTML = response;
    }
  }
  else
	{
		Loading = 1;
		var Msg = '<table align=center border=0 width=100%><tr><td align=center>';
		Msg = Msg + '<font face="MS Sans Serif" size="1">Loading..</font><img src="images/loading.gif">';
		Msg = Msg + '</td></tr></table>';
		document.getElementById(MyContainer).innerHTML = Msg;
	}
}

function Ajax(url,ContainerName)
{
	if(document.getElementById('BtnGrid').value == 'ViewGrid')
		{
			AjaxPage(url,ContainerName,'');
			document.getElementById('BtnGrid').value = 'HideGrid'
		}
	else
		{
			document.getElementById(ContainerName).innerHTML = '';
			document.getElementById('BtnGrid').value = 'ViewGrid'
		}
}

//////////////////////////////Time Show In Status Bar

function doStatusBarClock() {
    		window.setTimeout( "doStatusBarClock()", 1000 );
    		today = new Date();
    		self.status = today.toString();
}
//doStatusBarClock()

