function formatAddr(AddrObj){
	var returnVal = "";

	var streetAddress = "";
	var city = "";
	var state = "";
	var zip = "";
	
	if(AddrObj){
		state = AddrObj.AdministrativeAreaName;
		if(AddrObj.SubAdministrativeArea){
			if(AddrObj.SubAdministrativeArea.Locality){
				city = AddrObj.SubAdministrativeArea.Locality.LocalityName;
				
				if(AddrObj.SubAdministrativeArea.Locality.Thoroughfare){
					streetAddress = AddrObj.SubAdministrativeArea.Locality.Thoroughfare.ThoroughfareName;
				}
				if(AddrObj.SubAdministrativeArea.Locality.PostalCode){
					zip = AddrObj.SubAdministrativeArea.Locality.PostalCode.PostalCodeNumber;
				}
			}
			
			if(city == "" && AddrObj.SubAdministrativeArea.DependentLocality){
				city = AddrObj.SubAdministrativeArea.DependentLocality.DependentLocalityName;
			}else{
				city = AddrObj.SubAdministrativeArea.SubAdministrativeAreaName;
			}
			
		}
		
		if(streetAddress != ""){
			returnVal += streetAddress;
		}
		
		if(city != "" && state != "" && zip != ""){
			if(returnVal != ""){returnVal += "<br />";}
			returnVal += city + ", " + state + " " + zip;
		}else if(city != "" && state != "" && zip == ""){
			if(returnVal != ""){returnVal += "<br />";}
			returnVal += city + ", " + state;
		}else if(city != "" && state == "" && zip != ""){
			if(returnVal != ""){returnVal += "<br />";}
			returnVal += city + " " + zip;
		}else if(city == "" && state != "" && zip != ""){
			if(returnVal != ""){returnVal += "<br />";}
			returnVal += state + " " + zip;
		}else if(city != "" && state == "" && zip == ""){
			if(returnVal != ""){returnVal += "<br />";}
			returnVal += city;
		}else if(city == "" && state == "" && zip != ""){
			if(returnVal != ""){returnVal += "<br />";}
			returnVal += zip;
		}else if(city == "" && state != "" && zip == ""){
			if(returnVal != ""){returnVal += "<br />";}
			returnVal += state;
		}
		
	}

	return returnVal;
}
