
/*
	The Center
	Custom Javascript Functions
*/

BBI = {};

BBI.Core = 
{
	BBNC:
	{
		_version: 1.1,
		_updated: '04/17/2008 10:07:07 AM',

		isV5: !!window.Sys,
		isV4: !!(window.BBProcMsg && !window.Sys),
		isEditView: !!window.location.href.match('edit='),
		hasPRM: !this.isV5
	}
};

BBI.TheCenter =
{
	bbinit_er_stepTwo_selectOneQuantity: function()
	{
		if (BBI.Core.BBNC.isEditView)
			document.write('<h2>Custom Javascript: ER/Step2 - Select One Quantity</h2>');
			
		else
			Sys.WebForms.PageRequestManager.getInstance().add_pageLoaded(BBI.TheCenter.er_stepTwo_selectOneQuantity);
	},
	
	er_stepTwo_selectOneQuantity: function()
	{
		if ($('select[id$=_ddlQuantity]'))
		{
			$('select[id$=_ddlQuantity]').val(1).css('display','none');
			$('<span />').text('1').appendTo($('select[id$=_ddlQuantity]').parent());
		}
	},
	
	bbinit_er_stepThree_defaultAttendees: function()
	{
		if (BBI.Core.BBNC.isEditView)
			document.write('<h2>Custom Javascript: ER/Step3 - Default Attendees to Current User</h2>');
			
		else
			Sys.WebForms.PageRequestManager.getInstance().add_pageLoaded(BBI.TheCenter.er_stepThree_defaultAttendees);
	},
	
	er_stepThree_defaultAttendees: function()
	{
		$('select[id$=_ddlRegistrantName]').val(-1);
		$('table[id$=_dgRegistrationsList]').css('display','none');
	}
}
