new Ajax.Request('/includes/alert/alert.shtml', {
  method: 'get',
  onSuccess: function(response) {
    var tempDiv = new Element('div');
    tempDiv.update(response.responseText);
    if (tempDiv.down('.amberAlert') || tempDiv.down('.ambertAlert')) {
      new Ajax.Request('/alerts/amber.html', {
        method: 'get',
        onSuccess: function(response) {
          $('footer').insert(response.responseText);
          $('childAlert').morph('bottom:0;');
        }
      });
    } else if (!tempDiv.down('.fugitiveAlert') && tempDiv.down('.alert').down('a')) {
      new Ajax.Request('/alerts/endangered.html', {
        method: 'get',
        onSuccess: function(response) {
          $('footer').insert(response.responseText);
          $('childAlert').morph('bottom:0;');
        }
      });
    }
    tempDiv = null;
  }
});

