//AJAX LIBRARY BY RAMKRISHNA
function AjaxObj()
{
	var CallBack,HTTPRequest;
	HTTPRequest=false;
	if (window.XMLHttpRequest)//  Mozilla, etc.
		HTTPRequest = new XMLHttpRequest();
	else if (window.ActiveXObject)// IE
	{ 
		try 
		{
            HTTPRequest = new ActiveXObject("Msxml2.XMLHTTP");
        } 
		catch (e) 
		{
            try
			{
               HTTPRequest = new ActiveXObject("Microsoft.XMLHTTP");
            } 
			catch (e) {}
        }
	}
	
	this.LoadData=function(URL,fCallBack)
	{	
		ShowPleaseWait();
		CallBack=fCallBack;
		HTTPRequest.open("GET",URL,true);
		HTTPRequest.onreadystatechange=this.LoadComplete;
		HTTPRequest.send(null);
	}

	this.PostData=function(URL,fCallBack,Data)
	{
		ShowPleaseWait();
		CallBack=fCallBack;
		HTTPRequest.open("POST",URL,true);
		HTTPRequest.onreadystatechange=this.LoadComplete;
		HTTPRequest.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
      	HTTPRequest.setRequestHeader("Content-length", Data.length);
      	HTTPRequest.setRequestHeader("Connection", "close");
		HTTPRequest.send(Data);
	}
	
	this.LoadComplete=function()
	{	
		
		if (HTTPRequest.readyState==4)// load complete
		{	
			HidePleaseWait();
			if (HTTPRequest.status==200)
			{	
				if(CallBack!=null)
					CallBack(HTTPRequest.responseText);
			}
			else
			{
				alert("Error Occured: "+HTTPRequest.statusText);
				return null; // Error Occured
			}
		}
	}
	
	if (!HTTPRequest)
	{	
		alert("Can't create XMLHttpRequest Object.");
		return false;
	}
	else
		return this;
}
document.write('<div id="PleaseWait" style="position: absolute; z-index: 1000; visibility: hidden; font-family:Tahoma, Arial, Helvetica, sans-serif; font-size:11px; color:#660066; font-weight:bold; border:1px solid #000000; padding:10px; width:130px; background-color:#EFF3F5;" ><img src="images/wheel.gif" alt="" align="absmiddle">&nbsp;&nbsp; Please wait...</div>');
var PleaseWait=document.getElementById("PleaseWait");

function HidePleaseWait(){
	
	if (PleaseWait)
		PleaseWait.style.visibility="hidden";
}

function ShowPleaseWait(){
	if (PleaseWait)
	{	
		var DocHeight = document.body.clientHeight;
    	var DocWidth = document.body.clientWidth;
		
		
		PleaseWait.style.visibility="visible";
		PleaseWait.style.left=document.body.scrollLeft+((DocWidth/2)-(PleaseWait.offsetWidth/2));
		PleaseWait.style.top=document.body.scrollTop+((DocHeight/2)-(PleaseWait.offsetHeight/2));
		
		
	}
}