// This file is included only if the member is not logged in.  We want to load up the promotion list,
// but we don't want to initialize any of the elements.  This way, the page is not editable.
Event.observe(window, 'load', init_promotion_events);
Event.observe(window, 'load', init_promotion_contacts);
//Event.observe(window, 'load', init_promotion_fighters);


function init_promotion_fighters ()
{
	response = new Ajax.Updater('promotion_fighters_list', '/load.php', 
								{ 
									evalJSON: true, 
									sanitizeJSON: true, 
									parameters: 
 									{ 
										method: 'load_promotion_fighters', 
										promotion_id: id_to_edit
									}
								});
}  // end function init_fighter_promotions.



function init_promotion_events ()
{
		response = new Ajax.Updater('promotion_event_list', '/load.php', { evalJSON: true, sanitizeJSON: true, parameters: 
 { method: 'load_promotion_event_list', promotion_id: id_to_edit },
																 onComplete: remove_loading_icon });

}  // end function init_promotions.

function init_promotion_contacts ()
{
	response = new Ajax.Updater('promotion_contact_list', '/load.php', 
									{ evalJSON: true, sanitizeJSON: true, 
										parameters: { method: 'load_promotion_contact_list',
													  promotion_id: id_to_edit} });	
}

function remove_loading_icon ()
{
	$('loading_promotion_event_list').style.display = 'none';	
}


	
