// JavaScript Document
			var xmlhttp;
			var listHeight = 20
			var routeArray = new Array();
			var updFunc = "";
			var response =""
			// var _mHost="/naamp/google/";

		// I build ajax oject and also send a request to server
		function buildXMLObj(url){
					loadingMessage('s');
					xmlhttp=null;
/*					// browser check
					if (window.XMLHttpRequest)
						{// code for Firefox, Opera, IE7, etc.
						xmlhttp=new XMLHttpRequest();
					}
					else if (window.ActiveXObject)
						{// code for IE6, IE5
						xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
					}*/
						xmlhttp = ( window.XMLHttpRequest ) ? new XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHTTP") ;

					//build XMLObject
					if (xmlhttp!=null)
						{
						//build/open server object
						xmlhttp.open("GET",url,true); 
						//send request
						xmlhttp.send(null); 
						}
					else
						{
						alert("Your browser does not support XMLHTTP.");
						}
			}
			
		// I convert response text into js variable object (coldfusion is returning data in wddx format e.g. r= '<option>test</option>')
		function response2Obj(str){
				eval("var "+str);
				return eval(cleanIt(str));
			}

			// i remove all extra characters from response text
			function cleanIt(str){
					str = str.replace(/\\/g,""); 
					str = str.replace(/\"/g,""); 
					return str.substring(str.search(/\S/g)).split(' ')[0];
			}
			
			// I set the name of functin which is going run after ajax request comes back from server
			function updateObjValue(funcRef){
					updFunc = funcRef
			}

		// I check the ajax state and also runs the function to update HTML obj with ajax response 
		function checkAjaxState(){
				loadingMessage('h');
				if (xmlhttp.readyState==4 ) // 4 = "loaded"
						{// 4 = "loaded"
						if (xmlhttp.status==200) // 200 = "OK"
							{
								response = response2Obj(xmlhttp.responseText)
								eval(	updFunc +'()' )
							}
						else
							{
							alert("Problem retrieving data:" + xmlhttp.statusText);
							}
					}
			}			
