

// url = url to load from
// id = id of HTML tag to load into
// success_function = the function to call on success

function ajax_load(url, success_function)
{
ajax = new Ajax.Request(url, {
	method: 'get',

	onSuccess: function(transport) 
		{
			json = transport.responseText;
			eval('json = ' + json + ';');

			for (var prop in json) 
			{
				if (prop.substr(0,4)!='html') continue;
				document.getElementById(prop).innerHTML = json[prop];
			}			

			if (success_function!=null)
				success_function(json);
		} } );
}





//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 

// Prints out the properties of an object nicely
/*
function  printProps(obj, objName) 
{
  var output = "" ;
  
  for (var prop in obj) 
  {
    output += objName + "." + prop + " = " + obj[prop] + "\n" ;
  }
  
  return output;
}
*/