// ==ClosureCompiler== // @compilation_level SIMPLE_OPTIMIZATIONS // @output_file_name register.min.js // ==/ClosureCompiler== /***************************************************************** * file: register.js * * Displays the registration menu for guest and new users * *****************************************************************/ function demo() { return '
'+ '

' + '

' + '

' + '
' + ''; } function register_guest() { return '

'+ '

'+ '

'+ '

'+ ''+ ''; } function register_pass() { return '

'+ '

' + '

'+ '

'+ '

'+ '

'+ ''; } var referral = 'How did you hear about us?
' + '
' + ''+ '' + '' + '' + '
' + '

' + '
' + '
'; var phone = ''; var notice = '

Please Note

The values shown on the calculator are a pre-valuation.

Item quality needs to be verified for final valuation.

This valuation is not a commitment.

All data is kept private.

'; var invalid_email = '

Email address invalid


Please enter a valid email address.

'; var nomatch_email = '

Email Addresses don\'t match!


Please check your email address to make sure it is correct.

'; var regular_finish = '

Email Addresses don\'t match!


Please check your email address to make sure it is correct.

'; function state(passState, finish, callback_to_submit) { return { state1: { html: demo(), buttons: { Cancel: 0, Next: 1 }, focus: 1, submit: function (ev, but, message, val) { mystate=1; fname = message.children('#name_first'); lname = message.children('#name_last'); sexm = message.children('#sex'); if (but != 0) { if (val['sex'] == -1) { sexm.css("border", "solid #ff0000 2px"); return false; } if (val['first_name'] == '') { fname.css("border", "solid #ff0000 2px"); return false; } else { fname.css("border", ""); } if (val['last_name'] == '') { lname.css("border", "solid #ff0000 2px"); return false; } else { lname.css("border", ""); } if (jQuery('#bademail').is(':visible')) { return false; } if (validateEmail(val['email'], val['confirm_email']) == 'nomatch') { jQuery.prompt.goToState('nomatch'); } else if (validateEmail(val['email'], val['confirm_email'])) { mystate += 4 jQuery.prompt.goToState('state' + mystate); } else { jQuery.prompt.goToState('invalid'); } return false; } else { just_logging_in = false; jQuery.prompt.close(); } } }, state5: { html: notice, buttons: [{ title: 'Back', value: -1 }, { title: 'Cancel', value: 0 }, { title: 'Agree and Submit', value: 'submit'}], focus: 2, submit: function (ev, but, message, val) { mystate = 5; if (but == "submit") { jQuery.prompt.goToState('finish'); callback_to_submit(val); return false; } if (but != 0) { if (val['scanner'] == 'on') { mystate += but; } else if (but == -1) { mystate -= 2; } else { mystate += but; } jQuery.prompt.goToState('state' + mystate); return false; } else { just_logging_in = false; jQuery.prompt.close(); } isguest = false; } }, invalid: { html: invalid_email, buttons: { OK: true }, focus: 0, submit: function (v, m, f) { jQuery.prompt.goToState('state1'); return false; } }, nomatch: { html: nomatch_email, buttons: { OK: true }, focus: 0, submit: function (v, m, f) { jQuery.prompt.goToState('state1'); return false; } }, finish: { html: finish, buttons: {} } }; } function Register(pass, finish, call) { jQuery.prompt.close(); var stop = setInterval(function() { clearInterval(stop); jQuery.prompt(state(pass,finish, call)); }, 600); }