// JavaScript Document

			//Gets the browser specific XmlHttpRequest Object
			function getXmlHttpRequestObject() {
				if (window.XMLHttpRequest) {
					//alert(" XmlHttpRequest object Created ");
					return new XMLHttpRequest(); //Not IE
				} else if(window.ActiveXObject) {
					//alert(" XmlHttpRequest object Created ");
					return new ActiveXObject("Microsoft.XMLHTTP"); //IE
				} else {
					//Display your error message here. 
					//and inform the user they might want to upgrade
					//their browser.
					alert("Your browser doesn't support the XmlHttpRequest object.  Please upgrade");
				}
			}			
			//Get our browser specific XmlHttpRequest object.
			var receiveReq = getXmlHttpRequestObject();		
			//Initiate the asyncronous request.
			function showbranchinfo(intdlvrestid) {
				//If our XmlHttpRequest object is not in the middle of a request, start the new asyncronous call.
				var rndnum=Math.floor(Math.random()*1000); //Number between 0 to 1000
				var strqrystr;
				
				strqrystr = 'fillareapg.asp?saleid=' + rndnum + '&qsacid=' + intdlvrestid;
				//alert('Hello');
				if (receiveReq.readyState == 4 || receiveReq.readyState == 0) {
					//Setup the connection as a GET call to adSales.asp.
					//True explicity sets the request to asyncronous (default).
					document.getElementById('areaspan').innerHTML='<select id="lstArea" name="lstArea"><option value="0">Select Area</option></select></span><img src="/images/loader.gif">';
					receiveReq.open('GET', strqrystr, true);
					//Set the function that will be called when the XmlHttpRequest objects state changes.
					receiveReq.onreadystatechange = handleshowbranchinfo; 
					//Make the actual request.
					receiveReq.send(null);
				}			
			}
			//Called every time our XmlHttpRequest objects state changes.
			function handleshowbranchinfo() {
				//Check to see if the XmlHttpRequests state is finished.
				if (receiveReq.readyState == 4 || receiveReq.State == 200 )   {
					//Set the contents of our span element to the result of the asyncronous call.
					document.getElementById('areaspan').innerHTML = receiveReq.responseText;
					//receiveReq.abort();
				}
			}
