/*
  Contents are property of Cappex.com LLC, and strictly confidential.
*/

/********************************/
/******* DECLARE CLASSES ********/
/********************************/

/********************************/
/***** DECLARE GLOBAL VARS ******/
/********************************/

/********************************/
/******** EVENT HANDLERS ********/
/********************************/

window.addEvent("domready", function() {


	// show/hide keyCode
	$('hearAboutCappexID').addEvent("change", showHideReferrerPrompt);
	$('hearAboutCappexID').fireEvent("change");

});

/********************************/
/********** FUNCTIONS ***********/
/********************************/

/**
 * Shows or hides the keyCode field based on the hearAboutCappex dropdown. Should only be triggered by an event fired on that dropdown (because it uses "this") 
 */
function showHideReferrerPrompt() {
	switch (this.value) {
		case '3': case '8':
			$('referrerContainer').removeClass('jsHide');
			break;
		default:
			$('referrerContainer').addClass('jsHide');
			break;
	}
}

// formController.createDisplayToggler('profnonN', 'additionalQuestions', 'show');
// formController.createDisplayToggler('profnonP', 'additionalQuestions', 'hide');