// JavaScript Document

function getGeoXML(id){	
	    $.ajax({
			type: 'GET',
			url: '/flows/'+id+'/last_viewed.xml',
			dataType: 'xml',
			encoding:'UTF-8',
			success: readGeoXML
	    });
}


function readGeoXML(xml) {
  $(xml).find("last_viewed").each(function() {
  $('#geo').replaceWith('<p id="geo"> Last viewed in ' + $(this).find('city').text() + ', ' + $(this).find('region_code').text() + '</p>');  
  });
}

