logging = true;
xsltdebug = true;

var foo;
var bar = "";

function GetContent(controller, action) {
	$.get("/" + controller + "/" + action + ".xml", function(x) {
		$.get("/xsl/" + controller + "/" + action + ".xsl", function(y) {
			foo = xsltProcess(x, xmlParse(y));
			$("#Content").html(foo);
		});
	});
}

$("#Content").ajaxError(function(request, settings){
  $(this).append("<li>Error requesting page " + settings.url + "</li>");
});

$("#Content").ajaxSend(function(request, settings){
  $(this).append("<li>Starting request at " + settings.url + "</li>");
});

function SwitchImage(imageId, imageUrl) {
  $(imageId).load(imageUrl,'', 
    // Callback: After Image has been recieved
    function() {
      $(imageId).attr('src',imageUrl);
    });
  /*
  $(imageId).fadeOut('fast', 
    // Callback: When Fadeout is finished
    function() {
      $(imageId).addClass("loading");
      $(imageId).load(imageUrl,'', 
        // Callback: After Image has been recieved
        function() {
          $(imageId).attr('src',imageUrl);
          $(imageId).removeClass("loading");
          $(imageId).fadeIn('fast');
        })
    });*/
}
