	/*#####################################################################################################
	## AJAX crap
	*/
		var request = "";
		var dest = "";
		
		//process state change check
		function processStateChange(){

			try{
				if (request.readyState == 4){
								
					if (request.status == 200){
						
						if( dest != null ){ //# NULL as destination means we don't want to write the response
						
							contentDiv = document.getElementById(dest); 
							response = request.responseText;
							contentDiv.innerHTML = response;
														
							if( document.getElementById('address_list').innerHTML != ""  ){
							
								processRepLocations( document.getElementById('address_list').innerHTML );
								
								map.setCenter(new GLatLng(user_lat, user_lng), 9);
								
							}
							
						}else{ //#so, we ALERT it
						
							alert(request.responseText);
							
						}
						
					} else {
						alert( "Error: Status "+request.status );
						//throw this;
					}
					
				}
				
			}catch(e){ return; alert( "Error in processStateChange():\n\nrequest.status="+request.status+"\n\n"+e.message ); }
			
		}
		
		//creates the XMLHttpRequest object 
		function xmlRequest( URL, destination ){
			try{
						
			dest = destination;
			
				if (window.XMLHttpRequest){
					request = new XMLHttpRequest();
					request.onreadystatechange = processStateChange;
					request.open("GET", URL, true);
					request.send(null);
				} else if (window.ActiveXObject) {
					request = new ActiveXObject("Microsoft.XMLHTTP");
					if (request) {
						request.onreadystatechange = processStateChange;
						request.open("GET", URL, true);
						request.send();
					}
				}
				
			}catch(e){ alert( "Error in xmlRequest():\n\n"+e.message ); return; }
			
		}	
		
		
	/*== Trim( sString ) =========================================================================================================
	==	trim whitespace (spaces aand tabs) from front and back of string
	==
	*/
	function trim( sString ){
		
		if( sString.length > 0 ){

			sString = LeftTrim( sString );
			sString = RightTrim( sString );
		
		}
		
		return sString;
		
	}

	//trim spaces: Front
	function LeftTrim( sString ){
		
		if( sString.length > 0 ){
			
			var i = 0;
			var char = sString.charAt(0);

			while ( char == ' ' || char == "\t" ){ //first, strip any SPACES
				i++;	
				char = sString.charAt(i);
			}
			
			sString = sString.substring( i, sString.length );
		}
		
		return sString;
		
	}
	
	//trim spaces: BACK
	function RightTrim( sString ){
		
		if( sString.length > 0 ){
			
			var i = 0;
			var char = sString.charAt( sString.length + i -1);

			while ( char == ' ' || char == "\t" ){ //first, strip any SPACES
				i--;	
				char = sString.charAt( sString.length + i -1 );
			}
			
			sString = sString.substring( 0, sString.length + i );
			
		}
		
		return sString;
		
	}
