/**
 * Initializes login overlay
 * @param {string} name The name of the overlay to initialize
 */
HD.Login.Overlay = function(name) {
	// Store a reference to the content object.
	this.content = HD.Login.Content[name];
	// Ensure that templating keeps object references to HD.Login.Content.
	this.config = {
		templates: this.content.templates,
		hooks: this.content.hooks
	};
	// Load templates/hooks by reference.
	this.loadTemplates(arguments.callee, null, null, true);
};

HD.Login.Overlay.prototype = {
	/**
	 * Retrieves the HTML for an overlay
	 * @param {object} [userResponse] A user response object if applicable
	 * @returns {string}
	 */
	getHtml: function(userResponse) {
		userResponse = userResponse || {};
		return this.processTemplate(this.config.templates.getHtml(), {
			siteName: comSiteName,
			errors: userResponse.errors || null,
			profile: userResponse.profile || '',
			screenNameCheck: userResponse.screenNameCheck || false,
			user: userResponse.user || null,
			showRegFullOptIn: userResponse.showRegFullOptIn || '',
			regOptInChoices: userResponse.regOptInChoices || [],
			loggedInLevel: userResponse.loggedInLevel
		});
	}
};

HD.extend(HD.Login.Overlay, [HD.util.Template]);
HD.register('hd_login_overlay', HD.Login.Overlay, {version: "1.0", build: "1"});

HD.Login.Content = {	
	AUTHENTICATE : {
		id : 'hdAuthenticateForm',
		title : 'Login',
		callback : 'onAuthenticationSubmit',		
		getContent : function(){return comSvcBaseUrl + '/hd/user/assets/authenticate.jsp';},
		refresh : 'hdCaptchaRefresh',
		image : 'hdCaptchaImage',
		width : "584px",
		height: "320px",
		templates : {
			loginTitle: 'LOGIN',
			errorRequiredFieldsText: 'Fields in bold with an asterisk (*) are required.',
			descriptionText : 'Enter your email address and password to log in.',
			requiredFieldLabel: '*',
			emailAddressLabel: 'Email Address',			
			passwordLabel: 'Password',
			loginLabel: 'Login',
			forgotPasswordLabel: 'Forgot your password?',
			createProfileTitle: 'CREATE A NEW PROFILE',
			createProfileIntro: 'New visitor? Create a profile on H-D.com. An online profile will allow you to:',
			createProfileReasons: ['Add or update your personal information including your login and email preferences.','Stay connected with the latest H-D news and events.','Manage your H-D memberships, ride plans, shopping, and more.'],
			createProfileLabel: 'CREATE PROFILE',
			invalidLoginError: 'The email address and/or password you entered does not match our records.',
			
			getLoginTitle: function() { return this.loginTitle; },
			getErrorRequiredFieldsText: function() { return this.errorRequiredFieldsText; },
			getDescriptionText: function() { return this.descriptionText; },
			getRequiredFieldLabel: function() { return this.requiredFieldLabel; },
			getEmailAddressLabel: function() { return this.emailAddressLabel; },			
			getPasswordLabel: function() { return this.passwordLabel; },
			getLoginLabel: function() { return this.loginLabel; },
			getForgotPasswordLabel: function() { return this.forgotPasswordLabel; },
			getCreateProfileTitle: function() { return this.createProfileTitle; },
			getCreateProfileIntro: function() { return this.createProfileIntro; },
			getCreateProfileReasons: function() { return this.createProfileReasons; },
			getCreateProfileLabel: function() { return this.createProfileLabel; },
			getInvalidLoginError: function(){return this.invalidLoginError;},
			getHtml: function() { return this.html; },
			
			html: '\
		        <div id="hdwcLoginUnrecognized">\
		            <div id="${hooks.BODY}" class="${hooks.BODY}">\
		                <div id="hdwcContentTwoColumnOverlayNormal">\
		                    <div id="hdwcColumnOne" {if siteName != "Dark Custom"}${" "}style="width:280px;"{/if}>\
		                        <div class="dblRuleBtm">\
		                            <p class="hdwcHeaderStyle">\
		                                ${templates.getLoginTitle()}\
		                            </p>\
		                        </div>\
		                        <div class="hdwcMedPadBtm">\
		                            <p class="hdwcText">\
		                                ${templates.getDescriptionText()}\
		                            </p>\
		                        </div>\
		                        <div class="hdwcMedPadBtm">\
									{if errors && errors.length > 0}\
										{if _MODIFIERS.hasError(errors,"error.required")}\
											<div class="hdwcValidationError">\
												<p class="formLabel">${templates.getErrorRequiredFieldsText()}</p>\
											</div>\
										{/if}\
										{var reqErrorsDone = false}\
										{for error in _MODIFIERS.sortErrors(errors,["error.required"])}\
											{if error.errorType == "error.required"}\
												<div id="hdwcErrorOverlayLarge">- ${error|getError}</div>\
											{else}\
												{if _MODIFIERS.hasError(errors,"error.required") && !reqErrorsDone}\
													<br />\
													{var reqErrorsDone = true}\
												{/if}\
												<div id="hdwcErrorOverlayLarge">\
												{if !error.errorType && error.errorMessage.match(/invalid/i)}\
													${templates.getInvalidLoginError()}\
												{else}\
													${error|getError}\
												{/if}\
												</div>\
											{/if}\
										{/for}\
									{/if}\
		                            <div id="hdwcContentMessageError" class="hdwcErrorMsgOff">\
										<!--Error-->\
		                            </div>\
		                        </div>\
		                        <div id="hdwcValidateArea" {if siteName != "Dark Custom"}${" "}style="overflow:hidden;"{/if}>\
		                            <form class="${hooks.FORM}" id="hdAuthenticateForm">\
		                                <div class="hdwcMedPadBtm">\
		                                    <div class="formLabel" {if siteName != "Dark Custom"}${" "}style="width:275px;"{/if}>\
		                                        ${templates.getEmailAddressLabel()}<span class="reqIndicator">${templates.getRequiredFieldLabel()}</span>\
		                                    </div>\
		                                    <input type="text" class="hdwcInput" name="${hooks.EMAIL}" id="emailAddress" size="30" style="width:200px; margin:0px;padding:2px;" {if user}${" "}value="${user.userName}"{/if}/>\
		                                </div>\
		                                <div class="hdwcMedPadBtm">\
		                                    <div class="formLabel">\
		                                        ${templates.getPasswordLabel()}<span class="reqIndicator">${templates.getRequiredFieldLabel()}</span>\
		                                    </div>\
		                                    <input type="password" class="hdwcInput" name="${hooks.PASSWORD}" id="password" size="30" style="width:200px; margin:0px;padding:2px;" {if user}${" "}value="${user.password}"{/if}/>\
		                                </div>\
		                                <input type="submit" class="btnOrange hdAuthenticateBtn" value="{if siteName != "Dark Custom"}${templates.getLoginLabel()}{/if}"/><br />\
		                            </form>\
		                        </div>\
		                        <p class="hdwcText" {if siteName == "Dark Custom"}${" "}style="display: block;margin-top:10px;"{else}${" "}style="position:relative;top:4px;"{/if}>\
		                        	<a href="${profile}/cpapp/auth/loginPage.h-d?forgotPassword=true">${templates.getForgotPasswordLabel()}</a>\
		                       	</p>\
		                    </div>\
		                    <div id="hdwcColumnTwo" {if siteName != "Dark Custom"}style="height:247px"{/if}>\
		                        <div class="dblRuleBtm">\
		                            <p class="hdwcHeaderStyle">\
		                                ${templates.getCreateProfileTitle()}\
		                            </p>\
		                        </div>\
		                        <div class="hdwcMedPadBtm">\
		                            <p class="hdwcText">\
		                                ${templates.getCreateProfileIntro()}\
		                            </p>\
		                        </div>\
		                        <div class="hdwcMedPadBtm">\
		                            <ul class="hdwcStandardUl">\
										{for reason in templates.getCreateProfileReasons()}\
			                                <li class="hdwcStandardLi">\
			                                    ${reason}\
			                                </li>\
										{/for}\
		                            </ul>\
		                            <br class="clear" />\
		                        </div>\
		                        <div>\
		                        	<div class="extraTopMarginAuth">\
			                            <div class="btnOrange ${hooks.SHOW_REGISTER}">\
			                                <a href="javascript:void(0)">${templates.getCreateProfileLabel()}</a>\
			                            </div>\
									</div>\
		                        </div>\
		                    </div>\
		                </div>\
		            </div>\
		        </div>'
		},
		hooks: {
			/**
			 * Standalone: 1<br />
			 * Use: Sets the scrollable area of the overlay<br />
			 * @memberOf HD.Login.Content.AUTHENTICATE
			 */
			BODY: 'hdwcBody',
			
			/**
			 * Standalone: 1<br />
			 * Type: FORM <br/>
			 * Use: Authentication submission form<br />
			 * @memberOf HD.Login.Content.AUTHENTICATE
			 */
			FORM: 'hdForm',
			
			/**
			 * Dependencies: 1: FORM<br />
			 * Type: INPUT <br/>
			 * Attribute: NAME <br/>
			 * Use: Password entry field for authentication<br />
			 * @memberOf HD.Login.Content.AUTHENTICATE
			 */
			PASSWORD: 'password',
			
			/**
			 * Dependencies: 1: FORM<br />
			 * Type: INPUT <br/>
			 * Attribute: NAME <br/>
			 * Use: Email entry field for authentication<br />
			 * @memberOf HD.Login.Content.AUTHENTICATE
			 */
			EMAIL: 'email',
			
			/**
			 * Standalone: 0..1<br />
			 * Use: Shows the registration form on click<br />
			 * @memberOf HD.Login.Content.AUTHENTICATE
			 */
			SHOW_REGISTER: 'hdShowRegister'
		}
	},
	
	AUTHENTICATE_SOFT : {
		id : 'hdAuthenticateForm',
		title : 'Login',
		callback : 'onAuthenticationSubmit',		
		getContent : function(){return comSvcBaseUrl + '/hd/user/assets/authenticate.jsp';},
		refresh : 'hdCaptchaRefresh',
		image : 'hdCaptchaImage',
		width : "584px",
		height: "235px",
		templates : {
			loginTitle: 'VERIFY YOUR ONLINE PROFILE',
			errorRequiredFieldsText: 'Fields in bold with an asterisk (*) are required.',
			descriptionText : 'In order to use all the features you\'ll need to verify your H-D.com profile first.  ',
			requiredFieldLabel: '*',
			emailAddressLabel: 'Email Address',			
			passwordLabel: 'Password',
			loginLabel: 'Login',
			forgotPasswordLabel: 'Forgot your password?',
			invalidLoginError: 'The email and/or password you entered does not match our records.',
			personalizedLabel: 'You are logged in as: [${USERNAME}] <a href=\"javascript:void(0)\" onclick=\"login.view.softLogout.call(login.view);\">Not ${USERNAME}?</a>',
			
			getLoginTitle: function() { return this.loginTitle; },
			getErrorRequiredFieldsText: function() { return this.errorRequiredFieldsText; },
			getDescriptionText: function() { return this.descriptionText; },
			getRequiredFieldLabel: function() { return this.requiredFieldLabel; },
			getEmailAddressLabel: function() { return this.emailAddressLabel; },			
			getPasswordLabel: function() { return this.passwordLabel; },
			getLoginLabel: function() { return this.loginLabel; },
			getForgotPasswordLabel: function() { return this.forgotPasswordLabel; },
			getInvalidLoginError: function(){return this.invalidLoginError;},
			getPersonalizedLabel: function(){
				var personalizedLabel = this.personalizedLabel.replace(/\$\{USERNAME\}/g, YAHOO.util.Cookie.get('WC_PROFILEUSER_NICKNAME'));
				return personalizedLabel;
			},
			getHtml: function() { return this.html; },
			
			html: '\
		        <div id="hdwcLoginSoft">\
		            <div id="${hooks.BODY}" class="${hooks.BODY}">\
		                        <div class="dblRuleBtm">\
		                        <p class="hdwcHeaderStyle">\
		                                ${templates.getLoginTitle()}\
		                            </p>\
		                        </div>\
		                        <div id="hdwcSoftBody">\
			                        <div class="hdwcMedPadBtm">\
					                    <p class="hdwcPersonalizedLabel">\
			                        		${templates.getPersonalizedLabel()}\
			                        	</p>\
			                            <p class="hdwcText">\
			                                ${templates.getDescriptionText()}\
			                            </p>\
			                        </div>\
			                        <div class="hdwcMedPadBtm">\
										{if errors && errors.length > 0}\
											{if _MODIFIERS.hasError(errors,"error.required")}\
												<div class="hdwcValidationError">\
													<p class="formLabel">${templates.getErrorRequiredFieldsText()}</p>\
												</div>\
											{/if}\
											{var reqErrorsDone = false}\
											{for error in _MODIFIERS.sortErrors(errors,["error.required"])}\
												{if error.errorType == "error.required"}\
													<div id="hdwcErrorOverlayLarge">- ${error|getError}</div>\
												{else}\
													{if _MODIFIERS.hasError(errors,"error.required") && !reqErrorsDone}\
														<br />\
														{var reqErrorsDone = true}\
													{/if}\
													<div id="hdwcErrorOverlayLarge">\
													{if !error.errorType && error.errorMessage.match(/invalid/i)}\
														${templates.getInvalidLoginError()}\
													{else}\
														${error|getError}\
													{/if}\
													</div>\
												{/if}\
											{/for}\
										{/if}\
			                            <div id="hdwcContentMessageError" class="hdwcErrorMsgOff">\
											<!--Error-->\
			                            </div>\
			                        </div>\
			                        <div id="hdwcValidateArea" >\
			                            <form class="${hooks.FORM}" id="hdAuthenticateForm">\
			                                <div class="hdwcMedPadBtm">\
			                                    <div class="formLabel">\
			                                        ${templates.getEmailAddressLabel()}<span class="reqIndicator">${templates.getRequiredFieldLabel()}</span>\
			                                    </div>\
			                                    <input type="text" class="hdwcInput" name="${hooks.EMAIL}" id="emailAddress" size="30" style="width:260px; margin:0px;padding:2px;" {if user}${" "}value="${user.userName}"{/if}/>\
			                                </div>\
			                                <div class="hdwcMedPadBtm last">\
			                                    <div class="formLabel">\
			                                        ${templates.getPasswordLabel()}<span class="reqIndicator">${templates.getRequiredFieldLabel()}</span>\
			                                    </div>\
			                                    <input type="password" class="hdwcInput" name="${hooks.PASSWORD}" id="password" size="30" style="width:240px; margin:0px;padding:2px;" {if user}${" "}value="${user.password}"{/if}/>\
			                                </div>\
			                                <div style="clear: both;height: 10px;"></div>\
			                                <input type="submit" class="btnOrange hdAuthenticateBtn" value="{if siteName != "Dark Custom"}${templates.getLoginLabel()}{/if}"/>\
			                                <p class="hdwcText hdForgotPassword">\
				                        		<a href="${profile}/cpapp/auth/loginPage.h-d?forgotPassword=true">${templates.getForgotPasswordLabel()}</a>\
				                        	</p>\
			                            </form>\
			                        </div>\
			                </div>\
			                </div>\
		        </div>'
		},
		hooks: {
			/**
			 * Standalone: 1<br />
			 * Use: Sets the scrollable area of the overlay<br />
			 * @memberOf HD.Login.Content.AUTHENTICATE
			 */
			BODY: 'hdwcBody',
			
			/**
			 * Standalone: 1<br />
			 * Type: FORM <br/>
			 * Use: Authentication submission form<br />
			 * @memberOf HD.Login.Content.AUTHENTICATE
			 */
			FORM: 'hdForm',
			
			/**
			 * Dependencies: 1: FORM<br />
			 * Type: INPUT <br/>
			 * Attribute: NAME <br/>
			 * Use: Password entry field for authentication<br />
			 * @memberOf HD.Login.Content.AUTHENTICATE
			 */
			PASSWORD: 'password',
			
			/**
			 * Dependencies: 1: FORM<br />
			 * Type: INPUT <br/>
			 * Attribute: NAME <br/>
			 * Use: Email entry field for authentication<br />
			 * @memberOf HD.Login.Content.AUTHENTICATE
			 */
			EMAIL: 'email'
		}
	},
	
	REGISTER : {
		id : 'hdRegisterForm',
		title : 'Register',
		callback : 'onRegistrationSubmit',
		getContent : function(){return comSvcBaseUrl + '/hd/user/assets/register.jsp';},		
		width : "654px",
		height: "510px",
		templates : {
			overlayTitle: 'CREATE AN ONLINE PROFILE',
			errorRequiredFieldsText: 'Fields in bold with an asterisk (*) are required.',
			instructionsText: 'Create your profile by completing the form below.',
			requiredFieldLabel: '*',
			requiredFieldText: 'Indicates required field',
			emailAddressLabel: 'Email Address',
			emailAddressText: 'Email address will be used to log in.',
			passwordLabel: 'Password',
			passwordText: 'Your password must contain 7 or more characters including at least one letter and one number. It can not contain spaces.',
			verifyPasswordLabel: 'Verify Password',
			firstNameLabel: 'First Name',
			middleInitialLabel: 'MI',
			lastNameLabel: 'Last Name',
			zipLabel: 'ZIP Code',
			birthdateLabel: 'Birth Date',
			birthdateText: '(mm/dd/yyyy)',
			screenNameLabel: 'Screen Name',
			screenNameText: 'Your screen name will be used to identify any content you submit on Harley-Davidson websites. <b>Once you submit your screen name, you will not be able to change your screen name later.</b>',
			checkAvailabilityLabel: 'CHECK AVAILABILITY',
			optInSectionLabel : 'My Email Subscriptions',
			optInLabel: 'I WANT TO RECEIVE PROMOTIONAL EMAIL FROM HARLEY-DAVIDSON.',
			optInText: 'By checking the above box, I agree that I have read the <a onclick="javascript:window.open(\'http://www.harley-davidson.com/wcm/Content/Pages/Utility/privacy_policy.jsp?locale=en_US\', \'\', \'width=598,height=540,scrollbars=yes,resizable=yes,toolbar=no,location=no,menubar=no,directories=no,status=no\')" href="javascript:void(0)">Privacy Policy</a> and that I want to receive promotional email from Harley-Davidson.',
			createProfileLabel: 'Create Profile',
			cancelLabel: 'CANCEL',
			
			getOverlayTitle: function() { return this.overlayTitle; },
			getErrorRequiredFieldsText: function() { return this.errorRequiredFieldsText; },
			getInstructionsText: function() { return this.instructionsText; },
			getRequiredFieldLabel: function() { return this.requiredFieldLabel; },
			getRequiredFieldText: function() { return this.requiredFieldText; },
			getEmailAddressLabel: function() { return this.emailAddressLabel; },
			getEmailAddressText: function() { return this.emailAddressText; },
			getPasswordLabel: function() { return this.passwordLabel; },
			getPasswordText: function() { return this.passwordText; },
			getVerifyPasswordLabel: function() { return this.verifyPasswordLabel; },
			getFirstNameLabel: function() { return this.firstNameLabel; },
			getMiddleInitialLabel: function() { return this.middleInitialLabel; },
			getLastNameLabel: function() { return this.lastNameLabel; },
			getZipLabel: function() { return this.zipLabel; },
			getBirthdateLabel: function() { return this.birthdateLabel; },
			getBirthdateText: function() { return this.birthdateText; },
			getScreenNameLabel: function() { return this.screenNameLabel; },
			getScreenNameText: function() { return this.screenNameText; },
			getCheckAvailabilityLabel: function() { return this.checkAvailabilityLabel; },
			getOptInSectionLabel: function() { return this.optInSectionLabel; },
			getOptInLabel: function() { return this.optInLabel; },
			getOptInText: function() { return this.optInText; },
			getCreateProfileLabel: function() { return this.createProfileLabel; },
			getCancelLabel: function() { return this.cancelLabel; },
			getHtml: function() { return this.html; },
			
			html: '\
				{cdata}\
				<script type="text/javascript">\
					(function() {\
						enterClicked = {\
						  	init: function() {\
						    	var ENTER = 13;\
						    	var forms = document.getElementsByTagName("form");\
						    	for (var i=0; i < forms.length; i++) {\
						      		var enterKeyListener = new YAHOO.util.KeyListener(forms[i], {keys:ENTER},{fn:enterClicked.check});\
						      		enterKeyListener.enable();\
						    	}\
						  	},\
						  	check: function(etype,args) {\
						    	var ENTER = 13;\
						    	var keycode = args[0];\
						    	if (keycode == ENTER) {\
					 				var target = YAHOO.util.Event.getTarget(args[1]);\
					 				if(target.id != "screenName"){\
					  					YAHOO.util.Event.stopEvent(args[1]);\
					    			}\
						    	}\
						  	}\
						};\
					})();\
					YAHOO.util.Event.onDOMReady(enterClicked.init);\
				</script>\
				{/cdata}\
		        <div id="hdwcCommCreateProfile">\
		            <div class="dblRuleBtm">\
		                <div class="head">${templates.getOverlayTitle()}</div>\
		            </div>\
					<div id="${hooks.BODY}" class="${hooks.BODY}" style="{if siteName != "Dark Custom"}height:440px;{/if}overflow-y:auto;overflow-x:hidden;">\
						{if errors && errors.length > 0}\
							<div id="hdValidationErrors">\
								{if _MODIFIERS.hasError(errors,["error.required"])}\
									<div class="hdwcValidationError">\
										<p class="formLabel">${templates.getErrorRequiredFieldsText()}</p>\
									</div>\
								{/if}\
								{for error in _MODIFIERS.sortErrors(errors,["error.required"],["user.userName","user.password","user.passwordConfirm","user.firstName","user.lastName","user.dob","user.screenName"])}\
									{if error.errorType == "error.required"}\
										<div id="hdwcErrorOverlayLarge">- ${error|getError}</div>\
									{/if}\
								{/for}\
								{if _MODIFIERS.hasError(errors,["error.required"])}\
									<br />\
								{/if}\
								{for error in errors}\
									{if ((error.errorType != "error.required" && error.errorType != "error.passedSnCheck" && !screenNameCheck) || (screenNameCheck && !error.fieldName && !error.errorType)) && !(error.errorType == "error.passwordsDoNotMatch" && _MODIFIERS.hasError(errors,"error.required","user.passwordConfirm"))}\
										<div id="hdwcErrorOverlayLarge">${error|getError}</div>\
									{/if}\
								{/for}\
							</div>\
						{/if}\
						<form class="${hooks.FORM} hdwcInputContent" id="hdRegisterForm" name="registerForm">\
			                <div class="hdwcMedPadBtm">\
			                    <p id="hdwcInstructions">\
			                        ${templates.getInstructionsText()}\
			                    </p>\
			                </div>\
			                <div class="hdwcLrgPadBtm">\
			                    <p>\
			                        ${templates.getRequiredFieldLabel()} ${templates.getRequiredFieldText()}\
			                    </p>\
			                </div>\
			                <div id="hdwcContentMessageError" class="hdwcErrorMsgOff">\
					            <!--Error-->\
			                </div>\
			                <div id="hdwcValidateArea" style="width: 100%">\
		                        <div class="hdwcMedPadBtm {if _MODIFIERS.hasError(errors,null,"user.userName")|| _MODIFIERS.hasError(errors,"duplicateEmail","user.userName")}${" "}hdwcValidationError{/if}">\
		                            <div class="formLabel">\
		                                ${templates.getEmailAddressLabel()}<span class="reqIndicator">${templates.getRequiredFieldLabel()}</span>\
		                                </div>\
		                                <div class="hdwcMedPadBtm">${templates.getEmailAddressText()}\
		                                <span class="formLabelErrorTextOff"></span>\
		                            </div>\
		                            <input type="text" class="hdwcInput" name="${hooks.EMAIL}" id="${hooks.EMAIL}" size="30" style="width:200px; margin:0px; padding:2px;" {if user}${" "}value="${user.userName}"{/if}/>\
		                        </div>\
		                        <div class="hdwcMedPadBtm {if _MODIFIERS.hasError(errors,null,"user.password")}${" "}hdwcValidationError{/if}">\
		                            <div class="formLabel">\
		                                ${templates.getPasswordLabel()}<span class="reqIndicator">${templates.getRequiredFieldLabel()}</span>\
		                                </div>\
		                                <div class="hdwcMedPadBtm">${templates.getPasswordText()}\
		                                <span class="formLabelErrorTextOff"></span>\
		                            </div>\
		                            <input type="password" class="hdwcInput" name="${hooks.PASSWORD}" id="${hooks.PASSWORD}" size="30" style="width:200px; margin:0px; padding:2px;" {if user}${" "}value="${user.password}"{/if}/>\
		                        </div>\
		                        <div class="hdwcMedPadBtm {if _MODIFIERS.hasError(errors,null,"user.passwordConfirm")}${" "}hdwcValidationError{/if}">\
		                            <div class="formLabel">\
		                                ${templates.getVerifyPasswordLabel()}<span class="reqIndicator">${templates.getRequiredFieldLabel()}</span>\
		                                <span class="formLabelErrorTextOff"></span>\
		                            </div>\
		                            <input type="password" class="hdwcInput" name="${hooks.PASSWORD_CONFIRM}" id="${hooks.PASSWORD_CONFIRM}" size="30" style="width:200px; margin:0px; padding:2px;" {if user && user.password.length > 0}${" "}value="${user.passwordConfirm}"{/if}/>\
		                        </div>\
		                        <div class="hdwcMedPadBtm">\
		                            <div class="hdwcFormRow {if _MODIFIERS.hasError(errors,null,"user.firstName")}${" "}hdwcValidationError{/if}" style="width:103px;">\
		                                <div class="formLabel">\
		                                    ${templates.getFirstNameLabel()}<span class="reqIndicator">${templates.getRequiredFieldLabel()}</span>\
		                                    <span class="formLabelErrorTextOff"></span>\
		                                </div>\
		                                <input type="text" class="hdwcInput" name="${hooks.FIRST_NAME}" size="15" style="width:100px; margin:0px; padding:2px;" {if user}${" "}value="${user.firstName}"{/if}/>\
		                            </div>\
		                            <div class="hdwcFormRow" style="width:43px;">\
		                                <div class="formLabel">\
		                                    ${templates.getMiddleInitialLabel()}\
		                                </div>\
		                                <input type="text" class="hdwcInput" name="${hooks.MIDDLE_NAME}" size="5" style="width:40px; margin:0px; padding:2px;" {if user}${" "}value="${user.middleName}"{/if}/>\
		                            </div>\
		                            <div class="hdwcFormRow {if _MODIFIERS.hasError(errors,null,"user.lastName")}${" "}hdwcValidationError{/if}" style="width:190px;">\
		                                <div class="formLabel">\
		                                    ${templates.getLastNameLabel()}<span class="reqIndicator">${templates.getRequiredFieldLabel()}</span>\
		                                    <span class="formLabelErrorTextOff"></span>\
		                                </div>\
		                                <input type="text" class="hdwcInput" name="${hooks.LAST_NAME}" size="30" style="width:190px; margin:0px; padding:2px;" {if user}${" "}value="${user.lastName}"{/if}/>\
		                            </div>\
		                            <br class="clear"/>\
		                        </div>\
		                        <div class="hdwcMedPadBtm {if _MODIFIERS.hasError(errors,null,"user.zip")}${" "}hdwcValidationError{/if}"">\
		                            <div class="formLabel">${templates.getZipLabel()}</div>\
		                            <input type="text" class="hdwcInput" name="hdwcZip" id="${hooks.ZIP}" size="7" maxlength="5" style="margin:0px; padding:2px;" {if user}${" "}value="${user.zip}"{/if}/>\
		                        </div>\
		                        <div class="hdwcLrgPadBtm {if _MODIFIERS.hasError(errors,null,"user.dob")}${" "}hdwcValidationError{/if}">\
		                            <div class="formLabel">\
		                            	${templates.getBirthdateLabel()}<span class="reqIndicator">${templates.getRequiredFieldLabel()}</span>\
		                            </div>\
		                            <div class="hdwcFormRow">\
		                                <input type="text" size="2" style="margin:0px; padding:2px;" class="hdwcInput" maxlength="2" name="${hooks.DOB_MONTH}" {if user && user.dobMonth}${" "}value="${user.dobMonth}"{/if}/>\
		                            	<input type="text" style="margin:0px; padding:2px;" size="2" class="hdwcInput" maxlength="2" name="${hooks.DOB_DAY}" {if user && user.dobDay}${" "}value="${user.dobDay}"{/if}/>\
										<input type="text" size="4" style="margin:0px; padding:2px;" class="hdwcInput" maxlength="4" name="${hooks.DOB_YEAR}" {if user && user.dobYear}${" "}value="${user.dobYear}"{/if}/>\
		                            </div><p>${templates.getBirthdateText()}</p>\
		                            <br class="clear" />\
		                        </div>\
		                        <div class="hdwcSmlPadBtm {if _MODIFIERS.hasError(errors,null,"user.screenName") || ((screenNameCheck || errors && errors.length == 1) && _MODIFIERS.hasError(errors,"",""))}${" "}hdwcValidationError{/if}">\
		                            <div class="subhead2">\
		                                ${templates.getScreenNameLabel()}<span class="reqIndicator">${templates.getRequiredFieldLabel()}</span>\
		                            </div>\
		                            <div class="hdwcSmlPadBtm">${templates.getScreenNameText()}</div>\
		                            <div id="hdwcContentMessageError" class="hdwcErrorMsgOff">\
			                      		<!--Error-->\
		                            </div>\
		                        </div>\
		                        <div class="hdwcLrgPadBtm formElement" style="float:left;">\
		                        	<input id="checkingScreenname" name="checkingScreenname" type="hidden" value="false"></input>\
		                            <input type="text" maxlength="23" class="hdwcInput" name="${hooks.SCREEN_NAME}" id="${hooks.SCREEN_NAME}" size="35" onchange="var el = document.getElementById(\'screenNameMessage\'); if (el) el.parentNode.removeChild(el)" onkeypress="var el = document.getElementById(\'screenNameMessage\'); if (el) el.parentNode.removeChild(el)" style="width:280px; margin:0px; padding:2px;" {if user}${" "}value="${user.screenName}"{/if}/>\
		                        </div>\
		                        <div class="hdwcLrgPadBtm submitCheckScreenName" style="overflow: hidden; float:left; position: relative; left: 10px;">\
			                    	<input type="submit" onclick="document.getElementById(\'checkingScreenname\').value = \'true\';" style="background-color:#333333;" class="btnDarkGrey hdAuthenticateBtn" value="{if siteName != "Dark Custom"}${templates.getCheckAvailabilityLabel()}{/if}"/>\
			                    </div>\
			          			{if screenNameCheck}\
									{for error in _MODIFIERS.selectErrors(errors,null,["snFeedback","user.screenName"],1)}\
										{if error.errorType == "error.failedSnCheck"}\
						          			<div id="screenNameMessage" class="hdwcValidationError" style="clear:both;">\
						          				<div class="formLabel snLabel">${error|getError}</div>\
						          			</div>\
										{elseif error.errorType == "error.passedSnCheck"}\
						          			<div id="screenNameMessage" class="screennameValidationPassed" style="clear:both;">\
						          				<div class="snLabel">${error|getError}</div>\
						          			</div>\
										{else}\
						          			<div id="screenNameMessage" class="hdwcValidationError" style="clear:both;">\
						          				<div class="formLabel snLabel">${error|getError}</div>\
						          			</div>\
										{/if}\
					               	{/for}\
				          		{/if}\
			                </div>\
			                <br class="clear" />\
			                <div class="hdwcLrgPadBtm" style="overflow: hidden; width: 100%">\
			                	{if showRegFullOptIn}\
				                	<div class="formLabel">\
				                		${templates.getOptInSectionLabel()}\
		                            </div>\
		                            <div class="hdwcCheckContainer">\
				                        <div class="hdwcCheckBox">\
				                            <input name="${hooks.OPT_IN}" type="checkbox" class="${hooks.OPT_IN}" {if (user && user.optIn) || !user}${" "}checked="checked"{/if}/>\
				                        </div>\
				                        <div class="hdwcCheckText">\
				                            <p>\
				                                ${templates.getOptInLabel()}\
				                                <br/>\
				                                ${templates.getOptInText()}\
				                            </p>\
				                            {for choice in regOptInChoices}\
					                            <div class="hdwcCheckBox">\
						                            <input name="${choice.elName}" type="checkbox" class="${hooks.OPT_IN_SUB}" {if (user && user[choice.elName]) || (!user && choice.checkedByDefault)}${" "}checked="checked"{/if}/>\
						                        </div>\
						                        <div class="hdwcCheckText">\
						                            <p>\
						                            	${choice.label}\
						                            </p>\
						                        </div>\
						                        <br class="clear" />\
						                    {/for}\
				                        </div>\
				                        <br class="clear" />\
				                    </div>\
			                	{else}\
			                	<div class="hdwcCheckContainer">\
			                        <div class="hdwcCheckBox">\
			                            <input name="${hooks.OPT_IN}" type="checkbox" class="${hooks.OPT_IN}" {if (user && user.optIn) || !user}${" "}checked="checked"{/if}/>\
			                        </div>\
			                        <div class="hdwcCheckText">\
			                            <p>\
			                                ${templates.getOptInLabel()}\
			                                <br/>\
			                                ${templates.getOptInText()}\
			                            </p>\
			                        </div>\
			                        <br class="clear" />\
			                    </div>\
			                    {/if}\
			                </div>\
			                <div class="hdwcSmlPadBtm" id="${hooks.FORM_BOTTOM}">\
			                    <input type="submit" id="submitProfile" style="display:none;"  value="${templates.getCreateProfileLabel()}"/>\
				                <div class="btnOrange">\
						        	<a id="hdwcLoginSaveButton" href="javascript:void(0)" onclick="document.getElementById(\'submitProfile\').click();">{if siteName != "Dark Custom"}${templates.getCreateProfileLabel()}{/if}</a>\
						       	</div>\
			                    <div class="btnDarkGrey hdClose">\
			                        <a class="closeOverlay" href="javascript:void(0)">${templates.getCancelLabel()}</a>\
			                    </div>\
			                    <br class="clear" />\
			              	</div>\
						</form>\
		            </div>\
		        </div>'
		},
		hooks: {
			/**
			 * Standalone: 1<br />
			 * Use: Sets the scrollable area of the overlay<br />
			 * @memberOf HD.Login.Content.REGISTER
			 */
			BODY: 'hdwcBody',
			
			/**
			 * Standalone: 1<br />
			 * Type: FORM <br/>
			 * Use: Registration form<br />
			 * @memberOf HD.Login.Content.REGISTER
			 */
			FORM: 'hdForm',
			
			/**
			 * Standalone: 1<br />
			 * Use: Form submission area<br />
			 * @memberOf HD.Login.Content.REGISTER
			 */
			FORM_BOTTOM: 'formBottom',
			
			/**
			 * Dependencies: 1: FORM<br />
			 * Type: INPUT <br/>
			 * Attribute: NAME <br/>
			 * Use: Password entry field for registration<br />
			 * @memberOf HD.Login.Content.REGISTER
			 */
			PASSWORD: 'hdwcPassword',
			
			/**
			 * Dependencies: 1: FORM<br />
			 * Type: INPUT <br/>
			 * Attribute: NAME <br/>
			 * Use: Password confirmation entry field for registration<br />
			 * @memberOf HD.Login.Content.REGISTER
			 */
			PASSWORD_CONFIRM: 'hdwcPassword2',
			
			/**
			 * Dependencies: 1: FORM<br />
			 * Type: INPUT <br/>
			 * Attribute: NAME <br/>
			 * Use: First name entry field for registration<br />
			 * @memberOf HD.Login.Content.REGISTER
			 */
			FIRST_NAME: 'hdwcFirstName',
			
			/**
			 * Dependencies: 1: FORM<br />
			 * Type: INPUT <br/>
			 * Attribute: NAME <br/>
			 * Use: Middle name entry field for registration<br />
			 * @memberOf HD.Login.Content.REGISTER
			 */
			MIDDLE_NAME: 'hdwcMiddleName',
			
			/**
			 * Dependencies: 1: FORM<br />
			 * Type: INPUT <br/>
			 * Attribute: NAME <br/>
			 * Use: Last name entry field for registration<br />
			 * @memberOf HD.Login.Content.REGISTER
			 */
			LAST_NAME: 'hdwcLastName',
			
			/**
			 * Dependencies: 1: FORM<br />
			 * Type: INPUT <br/>
			 * Attribute: NAME <br/>
			 * Use: Email entry field for registration<br />
			 * @memberOf HD.Login.Content.REGISTER
			 */
			EMAIL: 'hdwcEmailAddress',
			
			/**
			 * Dependencies: 1: FORM<br />
			 * Type: INPUT <br/>
			 * Attribute: NAME <br/>
			 * Use: Date of birth month entry field for registration<br />
			 * @memberOf HD.Login.Content.REGISTER
			 */
			DOB_MONTH: 'hdwcSelectMonth',
			
			/**
			 * Dependencies: 1: FORM<br />
			 * Type: INPUT <br/>
			 * Attribute: NAME <br/>
			 * Use: Date of birth day entry field for registration<br />
			 * @memberOf HD.Login.Content.REGISTER
			 */
			DOB_DAY: 'hdwcSelectDay',
			
			/**
			 * Dependencies: 1: FORM<br />
			 * Type: INPUT <br/>
			 * Attribute: NAME <br/>
			 * Use: Date of birth year entry field for registration<br />
			 * @memberOf HD.Login.Content.REGISTER
			 */
			DOB_YEAR: 'hdwcSelectYear',
			
			/**
			 * Dependencies: 1: FORM<br />
			 * Type: INPUT:checkbox <br/>
			 * Attribute: NAME <br/>
			 * Use: Newsletter opt in field for registration<br />
			 * @memberOf HD.Login.Content.REGISTER
			 */
			OPT_IN: 'optIn',
			
			/**
			 * Dependencies: 1: FORM<br />
			 * Type: INPUT:checkbox <br/>
			 * Attribute: NAME <br/>
			 * Use: Granular newsletter opt in field for registration<br />
			 * @memberOf HD.Login.Content.REGISTER
			 */
			OPT_IN_SUB: 'optInSub',
			
			/**
			 * Dependencies: 1: FORM<br />
			 * Type: INPUT <br/>
			 * Attribute: NAME <br/>
			 * Use: Screen name entry field for registration<br />
			 * @memberOf HD.Login.Content.REGISTER
			 */
			SCREEN_NAME: 'screenName',
			
			/**
			 * Dependencies: 1: FORM<br />
			 * Type: INPUT <br/>
			 * Attribute: NAME <br/>
			 * Use: Zip code entry field for registration<br />
			 * @memberOf HD.Login.Content.REGISTER
			 */
			ZIP: 'hdwcZip'
		}
	},
	
	SCREENNAME : {
		id : 'hdScreenNameForm',
		title : 'Screen Name',
		callback : 'onScreenNameSubmit',
		getContent : function(){return comSvcBaseUrl + '/hd/user/assets/screenName.jsp';},	
		width : "634px",
		height: "300px",
		templates : {
			overlayTitle: 'PROVIDE YOUR SCREEN NAME',
			errorRequiredFieldsText: 'Fields in bold with an asterisk (*) are required.',
			requiredFieldLabel: '*',
			requiredFieldText: 'Indicates required field',
			screenNameLabel: 'Screen Name',
			screenNameText: 'Your screen name will be used to identify any content you submit on Harley-Davidson websites. <span class="bold">Once you submit your screen name, you will not be able to change your screen name later.</span>',
			validateLabel: 'VALIDATE SCREEN NAME',
			saveLabel: 'SAVE',
			cancelLabel: 'CANCEL',
			
			getOverlayTitle: function() { return this.overlayTitle; },
			getErrorRequiredFieldsText: function() { return this.errorRequiredFieldsText; },
			getRequiredFieldLabel: function() { return this.requiredFieldLabel; },
			getRequiredFieldText: function() { return this.requiredFieldText; },
			getScreenNameLabel: function() { return this.screenNameLabel; },
			getScreenNameText: function() { return this.screenNameText; },
			getValidateLabel: function() { return this.validateLabel; },
			getSaveLabel: function() { return this.saveLabel; },
			getCancelLabel: function() { return this.cancelLabel; },
			getHtml: function() { return this.html; },
			
			html: '\
				<div id="hdwcLoginUnrecognized" class="hdwcLoginScreenName">\
			    	<div id="${hooks.BODY}" class="${hooks.BODY}">\
			        	<div id="{if siteName == "Dark Custom"}hdwcContentMain{else}hdwcContentTwoColumnOverlayNormal{/if}">\
							<div class="dblRuleBtm"><span class="head">${templates.getOverlayTitle()}</span></div>\
							{if errors && errors.length > 0}\
								<div id="hdwcErrorOverlayLarge">\
								{if _MODIFIERS.hasError(errors,"error.required")}\
									<div class="hdwcValidationError">\
										<p class="formLabel">${templates.getErrorRequiredFieldsText()}</p>\
									</div>\
								{/if}\
								{for error in _MODIFIERS.sortErrors(errors,["error.required"])}\
									{if error.errorType == "error.required"}\
										<div id="hdwcErrorOverlayLarge">- ${error|getError}</div>\
									{elseif error.fieldName != "snFeedback"}\
										<div id="hdwcErrorOverlayLarge" class="hdwcSmlPadBtm">${error|getError}</div>\
									{/if}\
								{/for}\
								</div>\
							{/if}\
							<div class="hdwcMedPadBtm">\
								<p><span class="reqIndicator">${templates.getRequiredFieldLabel()}</span> ${templates.getRequiredFieldText()}</p>\
							</div>\
							<form class="${hooks.FORM}" id="hdScreenNameForm" name="screenNameForm">\
								<div>\
									<div class="hdwcSmlPadBtm {if _MODIFIERS.hasError(errors,null,"user.screenName")}${" "}hdwcValidationError{/if}">\
					                    <div class="subhead2">\
					                        ${templates.getScreenNameLabel()} <span class="reqIndicator">${templates.getRequiredFieldLabel()}</span>\
					                    </div>\
					                    <p>${templates.getScreenNameText()}</p>\
					                    <div id="hdwcContentMessageError" class="hdwcErrorMsgOff">\
							              <!--Error-->\
					                    </div>\
					             	</div>\
					                <div class="formElement" style="float:left;">\
					                    <input id="checkingScreenname" name="checkingScreenname" type="hidden" value="false"></input>\
					                	<input type="text" maxlength="23" class="hdwcInput" name="${hooks.SCREEN_NAME}" id="${hooks.SCREEN_NAME}" size="35" onchange="var el = document.getElementById(\'screenNameMessage\'); if (el) el.parentNode.removeChild(el)" onkeypress="var el = document.getElementById(\'screenNameMessage\'); if (el) el.parentNode.removeChild(el)" style="width:300px; margin:0px; padding:2px;" {if user && user.screenName}value="${user.screenName}"{/if}/>\
					                </div>\
									{if siteName == "HOG"}\
					                    <input type="submit" id="submitScreenNameCheck" style="display:none;" value="${templates.getValidateLabel()}"/>\
										<a class="btnCheckName submitCheckScreenName" href="javascript:void(0)" title="${templates.getValidateLabel()}" onclick="document.getElementById(\'checkingScreenname\').value = \'true\';document.getElementById(\'submitScreenNameCheck\').click();" id="hdwcLoginSaveButton"></a>\
									{else}\
						                <div class="hdwcMedPadBtm submitCheckScreenName" style="overflow: hidden; float:left; position: relative; left: 10px;">\
						                 	<input type="submit" onclick="document.getElementById(\'checkingScreenname\').value = \'true\';"  style="background-color:#333333;" class="btnDarkGrey hdAuthenticateBtn" value="{if siteName != "Dark Custom"}${templates.getValidateLabel()}{/if}"/>\
					                    </div>\
									{/if}\
				          			{if screenNameCheck}\
										{for error in _MODIFIERS.selectErrors(errors,null,["snFeedback","user.screenName"],1)}\
						          			<br class="clear" />\
											{if error.errorType == "error.failedSnCheck"}\
							          			<div id="screenNameMessage" class="hdwcValidationError" style="clear:both;">\
							          				<div class="formLabel snLabel">${error|getError}</div>\
							          			</div>\
											{elseif error.errorType == "error.passedSnCheck"}\
							          			<div id="screenNameMessage" class="screennameValidationPassed" style="clear:both;">\
							          				<div class="snLabel">${error|getError}</div>\
							          			</div>\
											{else}\
							          			<div id="screenNameMessage" class="hdwcValidationError" style="clear:both;">\
							          				<div class="formLabel snLabel">${error|getError}</div>\
							          			</div>\
											{/if}\
						               	{/for}\
					          		{/if}\
				          			<br class="clear" />\
								</div>\
								<div class="hdwcSmlPadBtm screennameSubmission" id="${hooks.FORM_BOTTOM}">\
									{if siteName == "HOG"}\
					                    <input type="submit" id="submitScreenName" style="display:none;" value=""/>\
										<a class="btnSave" href="javascript:void(0)" title="{if siteName == "HOG"}Save{else}${templates.getSaveLabel()}{/if}" onclick="document.getElementById(\'submitScreenName\').click();" id="hdwcLoginSaveButton"></a>\
										<a class="btnCancel hdClose" id="cancel" href="javascript:void(0)" title="{if siteName == "HOG"}Cancel{else}${templates.getCancelLabel()}{/if}"></a>\
									{else}\
					                    <input type="submit" id="submitScreenName" style="display:none;" value=""/>\
						                <div class="btnOrange">\
								        	<a id="hdwcLoginSaveButton" href="javascript:void(0)" onclick="document.getElementById(\'submitScreenName\').click();">${templates.getSaveLabel()}</a>\
								       	</div>\
					                    <div class="btnDarkGrey hdClose">\
					                        <a class="closeOverlay" href="javascript:void(0)">${templates.getCancelLabel()}</a>\
					                    </div>\
					                    <br class="clear" />\
									{/if}\
				                </div>\
							</form>\
						</div>\
					</div>\
				</div>'
		},
		hooks: {
			/**
			 * Standalone: 1<br />
			 * Use: Sets the scrollable area of the overlay<br />
			 * @memberOf HD.Login.Content.SCREENNAME
			 */
			BODY: 'hdwcBody',
			
			/**
			 * Standalone: 1<br />
			 * Type: FORM <br/>
			 * Use: Screen name creation form<br />
			 * @memberOf HD.Login.Content.SCREENNAME
			 */
			FORM: 'hdForm',
			
			/**
			 * Standalone: 1<br />
			 * Use: Form submission area<br />
			 * @memberOf HD.Login.Content.SCREENNAME
			 */
			FORM_BOTTOM: 'formBottom',
			
			/**
			 * Dependencies: 1: FORM<br />
			 * Type: INPUT <br/>
			 * Attribute: NAME <br/>
			 * Use: Screen name entry field for screen name create<br />
			 * @memberOf HD.Login.Content.SCREENNAME
			 */
			SCREEN_NAME: 'screenName'
		}
	},
	
	CONFIRMATION : {
		id : 'hdConfirmation',
		title : '',
		callback : '',
		getContent : function(){return comSvcBaseUrl + '/hd/user/assets/profileCreationConfirmationOverlay.jsp';},		
		width : "654px",
		height: "150px",
		templates : {
			overlayTitle: 'ONLINE PROFILE CONFIRMATION',
			descriptionText : 'Congratulations, your online profile has been created.  You will receive a confirmation email shortly.',
			closeLabel : "CONTINUE",
			
			getOverlayTitle: function() { return this.overlayTitle; },
			getDescriptionText: function() { return this.descriptionText; },
			getCloseLabel: function() { return this.closeLabel; },
			getHtml: function() { return this.html; },
			
			html: '\
				<div id="hdwcProfileConfirmation" style="{if siteName != "Dark Custom"}height:170px;{/if}">\
			    	<div class="dblRuleBtm">\
				    	<div class="head">${templates.getOverlayTitle()}</div>\
					</div>\
					<div class="hdwcLrgPadBtm">\
					  	<p>${templates.getDescriptionText()}</p>\
					</div>\
			        <div class="hdwcMedPadBtm">\
			            <div class="btnOrange hdClose"><a href="javascript:void(0)">${templates.getCloseLabel()}</a></div>\
			        </div>\
			    </div>'
		},
		hooks: {}
	},
	
	SN_CONFIRMATION : {
		id : 'hdConfirmation',
		title : '',
		callback : '',
		getContent : function(){return '';},		
		width : "654px",
		height: "150px",
		templates : {
			overlayTitle: 'THANKS FOR CREATING YOUR SCREEN NAME',
			descriptionText : 'Your new screen name has been added to your H-D.com profile. You are currently logged in. ',
			closeLabel : "CONTINUE",
			
			getOverlayTitle: function() { return this.overlayTitle; },
			getDescriptionText: function() { return this.descriptionText; },
			getCloseLabel: function() { return this.closeLabel; },
			getHtml: function() { return this.html; },
			
			html: '\
				<div id="hdwcProfileConfirmation">\
			    	<div class="dblRuleBtm">\
				    	<div class="head">${templates.getOverlayTitle()}</div>\
					</div>\
					<div class="hdwcLrgPadBtm">\
					  	<p>${templates.getDescriptionText()}</p>\
					</div>\
			        <div class="hdwcMedPadBtm">\
			            <div class="btnOrange hdClose"><a href="javascript:void(0)">${templates.getCloseLabel()}</a></div>\
			        </div>\
			    </div>'
		},
		hooks: {}
	},
	
	RESET_PASSWORD : {
		id : 'hdResetPasswordForm',
		callback : 'onResetPasswordSubmit',
		getContent : function(){return '';},
		width : "600px",
		height: "510px",
		templates : {
			errorRequiredFieldsText: 'Fields in bold with an asterisk (*) are required.',
			getSaveLabel: function() { return this.saveLabel; },
			getHtml: function() { return this.html; },
			getErrorRequiredFieldsText: function() { return this.errorRequiredFieldsText; },
			html: '\
				<div id="hdwcCommCreateProfile">\
					<div id="hdwcHeader" class="dblRuleBtm">\
		    		   <div class="head">RESET PASSWORD</div>\
				    </div>\
                    <div class="hdwcMedPadBtm">\
					{if errors && errors.length > 0}\
						{if _MODIFIERS.hasError(errors,["error.required"])}\
							<div class="hdwcValidationError">\
								<p class="formLabel">${templates.getErrorRequiredFieldsText()}</p>\
							</div>\
						{/if}\
						{for error in _MODIFIERS.sortErrors(errors,["error.required"],["user.userName","user.password","user.passwordConfirm","user.firstName","user.lastName","user.dob","user.screenName"])}\
							{if error.errorType == "error.required"}\
								<div class="hdwcValidationError">\
							      <p class="formLabel">- ${error|getError}</p>\
							    </div>\
							{/if}\
						{/for}\
						{for error in errors}\
							{if ((error.errorType != "error.required" && error.errorType != "error.passedSnCheck" && !screenNameCheck) || (screenNameCheck && !error.fieldName && !error.errorType)) && !(error.errorType == "error.passwordsDoNotMatch" && _MODIFIERS.hasError(errors,"error.required","user.passwordConfirm"))}\
								<div class="hdwcValidationError">\
							      <p class="formLabel">${error|getError}</p>\
							    </div>\
							{/if}\
						{/for}\
						<br/>\
				    {/if}\
	                    <p id="hdwcInstructions">\
	                        We have updated our system to improve how we secure our data.\
	                        Your current password does not meet these new standards.<br/><br/>\
							Please update your password to contain 7 or more characters including\
							at least one letter and one number. It cannot contain spaces.<br/><br/>\
	            		</p>\
	                </div>\
	                <div id="hdwcValidateArea" style="width: 100%">\
	                   <form class="${hooks.FORM}" id="hdResetPasswordForm">\
	                   <input type="hidden" name="hdwcOldPassword"  value="${user.oldPassword}"/>\
	                   <input type="hidden" name="hdwcUserName"  value="${user.userName}"/>\
	                   		<div class="hdwcMedPadBtm">\
	                            <div class="hdwcFormRow" style="width:230px;">\
	                                <div class="formLabel">\
	                                    Password<span class="reqIndicator">*</span>\
	                                    <span class="formLabelErrorTextOff"></span>\
	                                </div>\
	                                <input type="password" class="hdwcInput" name="hdwcPassword" id="hdwcPassword" size="30" style="width:200px; margin:0px; padding:2px;" />\
	                            </div>\
	                            <div class="hdwcFormRow" style="width:230px;">\
	                                <div class="formLabel">\
	                                    Verify Password<span class="reqIndicator">*</span>\
	                                    <span class="formLabelErrorTextOff"></span>\
	                                </div>\
	                                <input type="password" class="hdwcInput" name="hdwcPassword2" id="hdwcPassword2" size="30" style="width:200px; margin:0px; padding:2px;" />\
	                            </div>\
	                            <br class="clear"/>\
	                            <input type="submit" id="submitResetPassword" style="display:none;"  value=""/>\
	                        </div>\
	                    </form>\
	                </div>\
	                <br class="clear" />\
	                <div class="hdwcLrgPadBtm">\
			           <div class="btnOrange ${hooks.FORM}"><a href="javascript:void(0)" onclick="document.getElementById(\'submitResetPassword\').click();" >SAVE</a></div>\
			        </div>\
			    </div>'
		},
		hooks: {
			/**
			 * Standalone: 0..1<br />
			 * Use: Reset Password on click<br />
			 */
			FORM: 'hdForm'
		}
	},
	
	LOGOUT : {
		id : 'hdLogout',
		title : '',
		callback : '',
		getContent : function(){return comSvcBaseUrl + '/hd/user/assets/logout.jsp';},
		width : "584px",
		height: "150px",
		templates : {
			overlayTitle: 'ARE YOU SURE YOU WANT TO LOGOUT?',
			descriptionText : 'If you have been shopping and have added items to your shopping cart, those items will be moved to your wish list.',
			logoutLabel : "YES, LOGOUT",
			closeLabel : "NO, I'LL CONTINUE",
			
			getOverlayTitle: function() { return this.overlayTitle; },
			getDescriptionText: function() { return this.descriptionText; },
			getLogoutLabel: function() { return this.logoutLabel; },
			getCloseLabel: function() { return this.closeLabel; },
			getHtml: function() { return this.html; },
			
			html: '\
				<div id="hdwcLogoutConfirm" style="height:140px;">\
			    	<div id="hdwcHeader" class="dblRuleBtm">\
			    		<div class="head">${templates.getOverlayTitle()}</div>\
					</div>\
					<div class="hdwcLrgPadBtm">\
				        <div id="hdwcText">${templates.getDescriptionText()}</div>\
			        </div>\
					<div class="hdwcLrgPadBtm">\
			           <div class="btnOrange ${hooks.LOGOUT}"><a href="javascript:void(0)">${templates.getLogoutLabel()}</a></div>\
			           <div class="btnDarkGrey hdClose"><a href="javascript:void(0)">${templates.getCloseLabel()}</a></div>\
			        </div>\
			    </div>'
		},
		hooks: {
			/**
			 * Standalone: 0..1<br />
			 * Use: Logs out on click<br />
			 * @memberOf HD.Login.Content.LOGOUT
			 */
			LOGOUT: 'hdLogout'
		}
	},
	
	SUBSCRIPTIONS : {
		id : 'hdSubscriptionsForm',
		title : 'Manage Subscriptions',
		callback : 'onSubscriptionsSubmit',	
		width : "634px",
		height: "510px",
		templates : {
			overlayGuestTitle: 'EMAIL SIGN UP',
			overlayUserTitle: 'CHANGE MY EMAIL SUBSCRIPTIONS',
			overlayGuestDescription: 'To sign up and receive email from Harley-Davidson, please provide us with the following information. If you have previously signed up for email on Harley-Davidson.com or have created an Online Profile, please <a href="javascript:void(0)" onclick="javascript:login.view.promptAuthentication.call(login.view);">login</a>. ',
			overlayUserDescription: 'To change your email subscriptions, please complete the fields below.',
			errorRequiredFieldsText: 'Fields in bold with an asterisk (*) are required.',
			emailAddressLabel: 'Email Address',
			emailAddressText: 'Note: The email address you enter here will update the existing email address saved in your H-D.com profile.',
			saveGuestLabel: 'SIGN UP',
			saveUserLabel: 'SAVE CHANGES',
			requiredFieldLabel: '*',
			optInGuestLabel: 'I WANT TO RECEIVE PROMOTIONAL EMAIL FROM HARLEY-DAVIDSON.',
			optInUserLabel: 'I would you like to receive additional email periodically regarding Harley-Davidson&#174; products and services.',
			optInGuestText: 'By checking the above box, I agree that I have read the <a onclick="javascript:window.open(\'http://www.harley-davidson.com/wcm/Content/Pages/Utility/privacy_policy.jsp?locale=en_US\', \'\', \'width=598,height=540,scrollbars=yes,resizable=yes,toolbar=no,location=no,menubar=no,directories=no,status=no\')" href="javascript:void(0)">Privacy Policy</a> and that I want to receive promotional email from Harley-Davidson.',
			optInUserText: 'By checking the above box, I agree that I have read the <a onclick="javascript:window.open(\'http://www.harley-davidson.com/wcm/Content/Pages/Utility/privacy_policy.jsp?locale=en_US\', \'\', \'width=598,height=540,scrollbars=yes,resizable=yes,toolbar=no,location=no,menubar=no,directories=no,status=no\')" href="javascript:void(0)">Privacy Policy</a> and that I want to receive email from Harley-Davidson.',
			firstNameLabel: 'First Name',
			lastNameLabel: 'Last Name',
			zipLabel: 'ZIP Code',
			birthdateLabel: 'Birth Date',
			birthdateText: '(mm/dd/yyyy)',
			birthdateDisclaimerText: 'Birth date is required for privacy reasons as we do not collect or maintain information from children. ',
			genderLabel: 'Gender',
			ownershipLabel: 'Are you a current or previous owner of a motorcycle?',
			cancelLabel: 'CANCEL',
			genderValues: [{label:'Choose One',value:''},{label:'Male',value:'Male'}, {label:'Female',value:'Female'}],
			ownershipValues: [{label:'Yes, current owner',value:'Yes, current owner', showBikes: true},{label:'Yes, previous owner',value:'Yes, previous owner', showBikes: true}, {label:'No, never owned',value:'No, never owned', showBikes: false}],
			bikeValues: [{label: 'Select Brand', value: ''}, 
			             {label: 'Harley', value: 'Harley'},
			             {label: 'Buell', value: 'Buell'},
			             {label: 'Aprilia', value: 'Aprilia'},
			             {label: 'BMW', value: 'BMW'},
			             {label: 'Cagiva', value: 'Cagiva'},
			             {label: 'Ducati', value: 'Ducati'},
			             {label: 'Honda', value: 'Honda'},
			             {label: 'KTM', value: 'KTM'},
			             {label: 'Kawasaki', value: 'Kawasaki'},
			             {label: 'Moto Guzzi', value: 'Moto Guzzi'},
			             {label: 'Piaggio', value: 'Piaggio'},
			             {label: 'Suzuki', value: 'Suzuki'},
			             {label: 'Triumph', value: 'Triumph'},
			             {label: 'Yamaha', value: 'Yamaha'},
			             {label: 'Other', value: 'Other'}],
			licenseLabel: 'Do you have your motorcycle license?',             
			licenseValues: [{label:'Yes',value:'Yes'},{label:'No',value:'No'}],             
			signupText: 'By signing up for emails, you are also creating a profile on Harley-Davidson.com. After signing up, you will be emailed a password that will allow you to login to make changes in your preferences or personal information. ',
			subscriptionLabel: 'Available Email Subscriptions',
			
			
			getOverlayTitle: function(loggedInLevel) { 
				if (loggedInLevel > 0){
					return this.overlayUserTitle;
				}else{
					return this.overlayGuestTitle;
				}
			},
			getOverlayDescription: function(loggedInLevel) { 
				if (loggedInLevel > 0){
					return this.overlayUserDescription;
				}else{
					return this.overlayGuestDescription;
				}	
			},
			getErrorRequiredFieldsText: function() { return this.errorRequiredFieldsText; },
			getRequiredFieldLabel: function() { return this.requiredFieldLabel; },
			getRequiredFieldText: function() { return this.requiredFieldText; },
			getEmailAddressLabel: function() { return this.emailAddressLabel; },
			// Currently used on women's roadmap
			getEmailAddressText: function() { return this.emailAddressText; },
			getSaveLabel: function(loggedInLevel) { 
				if (loggedInLevel > 0){
					return this.saveUserLabel;
				}else{
					return this.saveGuestLabel; 
				}	
			},
			getOptInSectionLabel: function() { return this.optInSectionLabel; },
			getOptInLabel: function(loggedInLevel) { 
				if (loggedInLevel > 0){
					return this.optInUserLabel;
				}else{
					return this.optInGuestLabel;
				}
			},
			getOptInText: function(loggedInLevel) { 
				if (loggedInLevel > 0){
					return this.optInUserText;
				}else{
					return this.optInGuestText;
				}	
			},
			getHtml: function() { return this.html; },
			getFirstNameLabel: function() { return this.firstNameLabel; },
			getLastNameLabel: function() { return this.lastNameLabel; },
			getZipLabel: function() { return this.zipLabel; },
			getBirthdateLabel: function() { return this.birthdateLabel; },
			getBirthdateText: function() { return this.birthdateText; },
			getBirthdateDisclaimerText: function() { return this.birthdateDisclaimerText; },
			getGenderLabel: function() { return this.genderLabel; },
			getOwnershipLabel: function() { return this.ownershipLabel; },
			getCancelLabel: function() { return this.cancelLabel; },
			getGenderValues: function() { return this.genderValues; },
			getOwnershipValues: function() { return this.ownershipValues; },
			getBikeValues: function() { return this.bikeValues; },
			getLicenseLabel: function() { return this.licenseLabel; },
			getLicenseValues: function() { return this.licenseValues; },
			getSignupText: function() { return this.signupText; },
			getSubscriptionLabel: function() { return this.subscriptionLabel; },
			
			html: '\
				<div id="hdwcLoginSubscriptions" class="hdwcLoginSubscriptions">\
					<div class="dblRuleBtm"><span class="head">${templates.getOverlayTitle(loggedInLevel)}</span></div>\
			    	<div id="${hooks.BODY}" class="${hooks.BODY}" style="height:440px;overflow-y:auto;overflow-x:hidden;">\
			        	<div id="hdwcContentMain">\
							<div class="hdwcMedPadBtm">\
								<p>${templates.getOverlayDescription(loggedInLevel)}</p>\
							</div>\
							<form class="${hooks.FORM}" id="hdSubscriptionsForm" name="hdSubscriptionsForm">\
							<input type="hidden" name="hdwcIlTicket"  value="{if (user)}${user.ilTicket}{/if}"/>\
							<input type="hidden" name="screenName"  value="{if (user)}${user.screenName}{/if}"/>\
				                <div id="hdwcValidateArea" style="width: 100%">\
					                {if errors && errors.length > 0}\
										<div id="hdValidationErrors">\
											{if _MODIFIERS.hasError(errors,["error.required"])}\
												<div class="hdwcValidationError">\
													<p class="formLabel">${templates.getErrorRequiredFieldsText()}</p>\
												</div>\
											{/if}\
											{for error in _MODIFIERS.sortErrors(errors,["error.required"],["user.userName","user.firstName","user.lastName","user.zip","user.dob","user.gender","user.ownABike","user.makeOfBikeOwnedOrOwn","user.haveMotorcycleLicense"])}\
												{if error.errorType == "error.required"}\
													<div id="hdwcErrorOverlayLarge">- ${error|getError}</div>\
												{/if}\
											{/for}\
											{if _MODIFIERS.hasError(errors,["error.required"])}\
												<br />\
											{/if}\
											{for error in errors}\
												{if (error.errorType != "error.required")}\
													<div id="hdwcErrorOverlayLarge">${error|getError}</div>\
												{/if}\
											{/for}\
										</div>\
									{/if}\
									<br class="clear" />\
					                <div class="hdwcLrgPadBtm" style="overflow: hidden; width: 100%">\
					                	{if loggedInLevel > 0}\
				                            <div class="hdwcCheckContainer">\
						                        <div class="hdwcCheckBox">\
						                            <input name="${hooks.OPT_IN}" type="checkbox" class="${hooks.OPT_IN}" {if (user && user.optIn) || !user}${" "}checked="checked"{/if}/>\
						                        </div>\
						                        <div class="hdwcCheckText">\
						                            <p>\
						                            ${templates.getOptInLabel(loggedInLevel)}\
					                                <br/><br />\
					                                ${templates.getOptInText(loggedInLevel)}\
					                                <br /><br /></p>\
					                                <p class="formLabel">${templates.getSubscriptionLabel()}\
					                                <br /><br />\
						                            </p>\
						                            {for choice in regOptInChoices}\
							                            <div class="hdwcCheckBox">\
								                            <input name="${choice.elName}" type="checkbox" class="${hooks.OPT_IN_SUB}" {if (user && user[choice.elName]) || !user}${" "}checked="checked"{/if}/>\
								                        </div>\
								                        <div class="hdwcCheckText">\
								                            <p class="formLabel">${choice.label}<br /></p>\
								                            <p>${choice.description}</p>\
								                        </div>\
								                        <input name="womensRoadMapSMSOptIn" type="hidden" class="${hooks.OPT_IN_SUB}" {if user}${" "}value="${user.womensRoadMapSMSOptIn}"{else}${" "}value="null"{/if} />\
								                        <br class="clear" />\
								                    {/for}\
						                        </div>\
						                        <br class="clear" />\
						                        <input type="hidden" class="hdwcInput" name="${hooks.EMAIL}" id="${hooks.EMAIL}" {if user}${" "}value="${user.userName}"{/if}/>\
						                        <input type="hidden" class="hdwcInput" name="${hooks.FIRST_NAME}" {if user}${" "}value="${user.firstName}"{/if}/>\
					                            <input type="hidden" class="hdwcInput" name="${hooks.LAST_NAME}" {if user}${" "}value="${user.lastName}"{/if}/>\
					                            <input type="hidden" class="hdwcInput" name="${hooks.ZIP}" id="${hooks.ZIP}" {if user}${" "}value="${user.zip}"{/if}/>\
						                        <input type="hidden" class="hdwcInput" name="${hooks.DOB_MONTH}" {if user && user.dobMonth}${" "}value="${user.dobMonth}"{/if}/>\
					                            <input type="hidden" class="hdwcInput" name="${hooks.DOB_DAY}" {if user && user.dobDay}${" "}value="${user.dobDay}"{/if}/>\
												<input type="hidden" class="hdwcInput" name="${hooks.DOB_YEAR}" {if user && user.dobYear}${" "}value="${user.dobYear}"{/if}/>\
												<select name="${hooks.GENDER}" style="display: none;">\
					                            	{for value in templates.getGenderValues()}\
					                                	<option value="${value.value}"{if user && user.gender == value.value}${" "}selected{/if}>${value.label}</option>\
					                            	{/for}\
					                            </select>\
					                            {for value in templates.getOwnershipValues()}\
				                            		<input type="radio" value="${value.value}" class="${hooks.OWNERSHIP}" name="${hooks.OWNERSHIP}"{if user && user.ownABike == value.value}${" "}checked{/if} style="display: none">\
				                                {/for}\
				                                <select style="display:none;" id="${hooks.OWNERSHIP_BIKE}" name="${hooks.OWNERSHIP_BIKE}">\
				                            	{for bike in templates.getBikeValues()}\
				                            		<option value="${bike.value}"{if user && user.makeOfBikeOwnedOrOwn == bike.value}${" "}selected{/if}>${bike.label}</option>\
				                                {/for}\
				                                </select>\
				                                {for value in templates.getLicenseValues()}\
			                            			<input type="radio" value="${value.value}" name="${hooks.LICENSE}"{if user && user.haveMotorcycleLicense == value.value}${" "}checked{/if} style="display:none;">\
			                            		{/for}\
						                    </div>\
					                	{else}\
					                	<div class="hdwcCheckContainer">\
					                        <div class="hdwcCheckBox">\
					                            <input name="${hooks.OPT_IN}" type="checkbox" class="${hooks.OPT_IN}" {if (user && user.optIn) || !user}${" "}checked="checked"{/if}/>\
					                            <input name="hdInterest" type="hidden" class="${hooks.OPT_IN_SUB}" {if user}${" "}value="${user.hdInterest}"{else}${" "}value="null"{/if} />\
					                            <input name="womensRoadMapOptIn" type="hidden" class="${hooks.OPT_IN_SUB}" {if user}${" "}value="${user.womensRoadMapOptIn}"{else}${" "}value="null"{/if} />\
					                            <input name="womensRoadMapSMSOptIn" type="hidden" class="${hooks.OPT_IN_SUB}" {if user}${" "}value="${user.womensRoadMapSMSOptIn}"{else}${" "}value="null"{/if} />\
					                        </div>\
					                        <div class="hdwcCheckText">\
					                            <p>\
					                                ${templates.getOptInLabel(loggedInLevel)}\
					                                <br/>\
					                                ${templates.getOptInText(loggedInLevel)}\
					                            </p>\
					                        </div>\
					                        <br class="clear" />\
					                    </div>\
					                    {/if}\
					                </div>\
					                {if loggedInLevel < 1}\
				                        <div class="hdwcMedPadBtm {if _MODIFIERS.hasError(errors,null,"user.userName")}${" "}hdwcValidationError{/if}">\
				                            <div class="formLabel">\
				                                ${templates.getEmailAddressLabel()}<span class="reqIndicator">${templates.getRequiredFieldLabel()}</span>\
				                                <span class="formLabelErrorTextOff"></span>\
				                            </div>\
				                            <input type="text" class="hdwcInput" name="${hooks.EMAIL}" id="${hooks.EMAIL}" size="30" style="width:275px; margin:0 10px 0 0; float: left; padding:2px;" {if user}${" "}value="${user.userName}"{/if}/>\
				                            <br class="clear"/>\
				                        </div>\
					                    <br class="clear" />\
					                    <div class="hdwcMedPadBtm">\
				                            <div class="hdwcFormRow {if _MODIFIERS.hasError(errors,null,"user.firstName")}${" "}hdwcValidationError{/if}" style="width:103px;">\
				                                <div class="formLabel">\
				                                    ${templates.getFirstNameLabel()}<span class="reqIndicator">${templates.getRequiredFieldLabel()}</span>\
				                                    <span class="formLabelErrorTextOff"></span>\
				                                </div>\
				                                <input type="text" class="hdwcInput" name="${hooks.FIRST_NAME}" size="15" style="width:100px; margin:0px; padding:2px;" {if user}${" "}value="${user.firstName}"{/if}/>\
				                            </div>\
				                            <div class="hdwcFormRow {if _MODIFIERS.hasError(errors,null,"user.lastName")}${" "}hdwcValidationError{/if}" style="width:192px;">\
				                                <div class="formLabel">\
				                                    ${templates.getLastNameLabel()}<span class="reqIndicator">${templates.getRequiredFieldLabel()}</span>\
				                                    <span class="formLabelErrorTextOff"></span>\
				                                </div>\
				                                <input type="text" class="hdwcInput" name="${hooks.LAST_NAME}" size="30" style="width:190px; margin:0px; padding:2px;" {if user}${" "}value="${user.lastName}"{/if}/>\
				                            </div>\
				                            <div class="hdwcFormRow {if _MODIFIERS.hasError(errors,null,"user.zip")}${" "}hdwcValidationError{/if}"">\
					                            <div class="formLabel">${templates.getZipLabel()}<span class="reqIndicator">${templates.getRequiredFieldLabel()}</span></div>\
					                            <input type="text" class="hdwcInput" name="${hooks.ZIP}" id="${hooks.ZIP}" size="7" maxlength="5" style="margin:0px; padding:2px;" {if user}${" "}value="${user.zip}"{/if}/>\
					                        </div>\
				                            <br class="clear"/>\
				                        </div>\
				                        <div class="hdwcLrgPadBtm">\
				                            <div class="hdwcFormRow {if _MODIFIERS.hasError(errors,null,"user.dob")}${" "}hdwcValidationError{/if}">\
					                            <div class="formLabel">\
					                            	${templates.getBirthdateLabel()}<span class="reqIndicator">${templates.getRequiredFieldLabel()}</span>\
					                            </div>\
				                                <input type="text" size="2" style="margin:0px; padding:2px;" class="hdwcInput" maxlength="2" name="${hooks.DOB_MONTH}" {if user && user.dobMonth}${" "}value="${user.dobMonth}"{/if}/>\
				                            	<input type="text" style="margin:0px; padding:2px;" size="2" class="hdwcInput" maxlength="2" name="${hooks.DOB_DAY}" {if user && user.dobDay}${" "}value="${user.dobDay}"{/if}/>\
												<input type="text" size="4" style="margin:0px; padding:2px;" class="hdwcInput" maxlength="4" name="${hooks.DOB_YEAR}" {if user && user.dobYear}${" "}value="${user.dobYear}"{/if}/>\
												${templates.getBirthdateText()}\
				                            </div>\
				                            <div class="hdwcFormRow {if _MODIFIERS.hasError(errors,null,"user.gender")}${" "}hdwcValidationError{/if}">\
				                            <div class="formLabel">${templates.getGenderLabel()}<span class="reqIndicator">${templates.getRequiredFieldLabel()}</span></div>\
				                                <select name="${hooks.GENDER}">\
				                                {for value in templates.getGenderValues()}\
				                                	<option value="${value.value}"{if user && user.gender == value.value}${" "}selected{/if}>${value.label}</option>\
				                                {/for}\
				                                </select>\
				                            </div>\
				                            <br class="clear" />\
				                            <p>${templates.getBirthdateDisclaimerText()}</p>\
				                        </div>\
			                            <br class="clear"/>\
			                            <div class="hdwcLrgPadBtm {if _MODIFIERS.hasError(errors,null,"user.ownABike")}${" "}hdwcValidationError{/if}">\
				                            <div class="formLabel">\
			                            		${templates.getOwnershipLabel()}<span class="reqIndicator">${templates.getRequiredFieldLabel()}</span>\
			                            	</div>\
			                            	<div class="hdwcFormRow">\
				                            	{for value in templates.getOwnershipValues()}\
				                            	<input type="radio" value="${value.value}" class="${hooks.OWNERSHIP}" name="${hooks.OWNERSHIP}"{if user && user.ownABike == value.value}${" "}checked{/if} onclick="{if value.value == templates.getOwnershipValues()[2].value}HD.get(\'makeOfBikeOwnedOrOwn\').style.visibility = \'hidden\';{else}HD.get(\'makeOfBikeOwnedOrOwn\').style.visibility = \'visible\';{/if}"> ${value.label}<br />\
				                                {/for}\
			                            	</div>\
			                            	<div class="hdwcFormRow">\
			                            		<select style="height: 17px; visibility: hidden; margin:10px 15px;" id="${hooks.OWNERSHIP_BIKE}" name="${hooks.OWNERSHIP_BIKE}">\
				                            	{for bike in templates.getBikeValues()}\
				                            		<option value="${bike.value}"{if user && user.makeOfBikeOwnedOrOwn == bike.value}${" "}selected{/if}>${bike.label}</option>\
				                                {/for}\
				                                </select>\
			                            	</div>\
			                            	<br class="clear"/>\
			                            </div>\
			                            <div class="hdwcLrgPadBtm {if _MODIFIERS.hasError(errors,null,"user.haveMotorcycleLicense")}${" "}hdwcValidationError{/if}">\
				                            <div class="formLabel">\
			                            		${templates.getLicenseLabel()}<span class="reqIndicator">${templates.getRequiredFieldLabel()}</span>\
			                            	</div>\
			                            	<div class="hdwcFormRow">\
				                            	{for value in templates.getLicenseValues()}\
				                            		<input type="radio" value="${value.value}" name="${hooks.LICENSE}"{if user && user.haveMotorcycleLicense == value.value}${" "}checked{/if}> ${value.label}<br />\
				                                {/for}\
			                            	</div>\
			                            	<br class="clear"/>\
			                            </div>\
			                            ${templates.getSignupText()}\
			                        {/if}\
		                            <br class="clear"/><br />\
		                            <div class="btnOrange">\
					                    <input type="submit" id="submitSubscriptions" style="display:none;" value=""/>\
							        	<a id="hdwcLoginSaveButton" href="javascript:void(0)" onclick="document.getElementById(\'submitSubscriptions\').click();">${templates.getSaveLabel(loggedInLevel)}</a>\
									</div>\
									<div class="btnDarkGrey hdClose">\
				                        <a class="closeOverlay" href="javascript:void(0)">${templates.getCancelLabel()}</a>\
				                    </div>\
				                    <br class="clear" />\
								</div>\
							</form>\
						</div>\
					</div>\
				</div>'
		},
		hooks: {
			/**
			 * Standalone: 1<br />
			 * Use: Sets the scrollable area of the overlay<br />
			 * @memberOf HD.Login.Content.SUBSCRIPTIONS
			 */
			BODY: 'hdwcBody',
			
			/**
			 * Standalone: 1<br />
			 * Type: FORM <br/>
			 * Use: Email subscription management form<br />
			 * @memberOf HD.Login.Content.SUBSCRIPTIONS
			 */
			FORM: 'hdForm',
			
			/**
			 * Dependencies: 1: FORM<br />
			 * Type: INPUT:checkbox <br/>
			 * Attribute: NAME <br/>
			 * Use: Newsletter opt in field for registration<br />
			 * @memberOf HD.Login.Content.SUBSCRIPTIONS
			 */
			OPT_IN: 'optIn',
			
			/**
			 * Dependencies: 1: FORM<br />
			 * Type: INPUT:checkbox <br/>
			 * Attribute: NAME <br/>
			 * Use: Granular newsletter opt in field for registration<br />
			 * @memberOf HD.Login.Content.SUBSCRIPTIONS
			 */
			OPT_IN_SUB: 'optInSub',
			
			/**
			 * Dependencies: 1: FORM<br />
			 * Type: INPUT <br/>
			 * Attribute: NAME <br/>
			 * Use: Email entry field for registration<br />
			 * @memberOf HD.Login.Content.SUBSCRIPTIONS
			 */
			EMAIL: 'hdwcEmailAddress',
			
			/**
			 * Dependencies: 1: FORM<br />
			 * Type: INPUT <br/>
			 * Attribute: NAME <br/>
			 * Use: First name entry field for registration<br />
			 * @memberOf HD.Login.Content.SUBSCRIPTIONS
			 */
			FIRST_NAME: 'hdwcFirstName',
			
			/**
			 * Dependencies: 1: FORM<br />
			 * Type: INPUT <br/>
			 * Attribute: NAME <br/>
			 * Use: Middle name entry field for registration<br />
			 * @memberOf HD.Login.Content.SUBSCRIPTIONS
			 */
			MIDDLE_NAME: 'hdwcMiddleName',
			
			/**
			 * Dependencies: 1: FORM<br />
			 * Type: INPUT <br/>
			 * Attribute: NAME <br/>
			 * Use: Last name entry field for registration<br />
			 * @memberOf HD.Login.Content.SUBSCRIPTIONS
			 */
			LAST_NAME: 'hdwcLastName',
			
			/**
			 * Dependencies: 1: FORM<br />
			 * Type: INPUT <br/>
			 * Attribute: NAME <br/>
			 * Use: Date of birth month entry field for registration<br />
			 * @memberOf HD.Login.Content.SUBSCRIPTIONS
			 */
			DOB_MONTH: 'hdwcSelectMonth',
			
			/**
			 * Dependencies: 1: FORM<br />
			 * Type: INPUT <br/>
			 * Attribute: NAME <br/>
			 * Use: Date of birth day entry field for registration<br />
			 * @memberOf HD.Login.Content.SUBSCRIPTIONS
			 */
			DOB_DAY: 'hdwcSelectDay',
			
			/**
			 * Dependencies: 1: FORM<br />
			 * Type: INPUT <br/>
			 * Attribute: NAME <br/>
			 * Use: Date of birth year entry field for registration<br />
			 * @memberOf HD.Login.Content.SUBSCRIPTIONS
			 */
			DOB_YEAR: 'hdwcSelectYear',
			
			/**
			 * Dependencies: 1: FORM<br />
			 * Type: INPUT <br/>
			 * Attribute: NAME <br/>
			 * Use: Zip code entry field for subscription registration<br />
			 * @memberOf HD.Login.Content.SUBSCRIPTIONS
			 */
			ZIP: 'hdwcZip',
			
			/**
			 * Dependencies: 1: FORM<br />
			 * Type: INPUT <br/>
			 * Attribute: NAME <br/>
			 * Use: Ownership entry field for registration<br />
			 * @memberOf HD.Login.Content.SUBSCRIPTIONS
			 */
			OWNERSHIP: 'ownABike',
			
			/**
			 * Dependencies: 1: FORM<br />
			 * Type: INPUT <br/>
			 * Attribute: NAME <br/>
			 * Use: Ownership entry field for registration<br />
			 * @memberOf HD.Login.Content.SUBSCRIPTIONS
			 */
			OWNERSHIP_BIKE: 'makeOfBikeOwnedOrOwn',
			
			/**
			 * Dependencies: 1: FORM<br />
			 * Type: INPUT <br/>
			 * Attribute: NAME <br/>
			 * Use: License entry field for registration<br />
			 * @memberOf HD.Login.Content.SUBSCRIPTIONS
			 */
			LICENSE: 'haveMotorcycleLicense',
			/**
			 * Dependencies: 1: FORM<br />
			 * Type: INPUT <br/>
			 * Attribute: NAME <br/>
			 * Use: Gender entry field for registration<br />
			 * @memberOf HD.Login.Content.REGISTER
			 */
			GENDER: 'gender'
		}
	},
	
	UPDATED : {
		id : 'hdConfirmation',
		title : '',
		callback : '',	
		width : "654px",
		height: "150px",
		templates : {
			overlayTitle: 'THANK YOU',
			descriptionText : 'You\'ve successfully updated your email subscriptions. ',
			closeLabel : "CONTINUE",
			
			getOverlayTitle: function() { return this.overlayTitle; },
			getDescriptionText: function() { return this.descriptionText; },
			getCloseLabel: function() { return this.closeLabel; },
			getHtml: function() { return this.html; },
			
			html: '\
				<div id="hdwcProfileConfirmation" style="{if siteName != "Dark Custom"}height:170px;{/if}">\
			    	<div class="dblRuleBtm">\
				    	<div class="head">${templates.getOverlayTitle()}</div>\
					</div>\
					<div class="hdwcLrgPadBtm">\
					  	<p>${templates.getDescriptionText()}</p>\
					</div>\
			        <div class="hdwcMedPadBtm">\
			            <div class="btnOrange hdClose"><a href="javascript:void(0)">${templates.getCloseLabel()}</a></div>\
			        </div>\
			    </div>'
		},
		hooks: {}
	}
};

// Initialize all overlays.
for (var name in HD.Login.Content) {
	// Create overlay object and register as HD.Login.Overlay.NAME.
	HD.Login.Overlay[name] = new HD.Login.Overlay(name);
}

HD.register('hd_login_content', HD.Login.Content, {version: "1.0", build: "1"});
