/*
  Creator: Kevin Hastie
  Date: Apr 3, 2006
  Time: 3:45:50 PM
  Contents are property of Cappex.com LLC, and strictly confidential.
*/

var CreateGCBot = new Class({

	initialize : function () {

		window.addEvent('domready', function () {

			// show/hide keyCode
			$('hearAboutCappexID').addEvent("change", createGCBot.showHideKeyCode);
			$('hearAboutCappexID').fireEvent("change");

		});

	},

	/**
	 * 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")
	 */
	showHideKeyCode : function () {
		switch (this.value) {
			case '0': case '1': case '2':
				$('keyCodeContainer').removeClass('jsHide');
				break;
			default:
				$('keyCodeContainer').addClass('jsHide');
				break;
		}
	}
	
});

var createGCBot = new CreateGCBot();