function manageUboxEvents(){ if( $('cbutton') ){ if ($('email')){ $('email').addEvent('focus', function(e){ /* // no hint for registered user if ($('ur') && $('ur').checked) return; if ($('newusercb') && !$('newusercb').checked) return; */ if ($('hint')){ cleanError (); $('hint').set('html', 'A valid email address is required for access.'); } $('email').setStyle('background-color', '#fa5ffb'); }); $('email').addEvent('blur', function(e){ if ($('hint')){ $('hint').set('txt', ""); } $('email').setStyle('background-color', '#ffffff'); }); } if ($('password')){ $('password').addEvent('focus', function(e){ // no hint for registered user /* if ($('ur') && $('ur').checked) return; if ($('newusercb') && !$('newusercb').checked) return; */ if ($('hint')){ cleanError (); $('hint').set('html', 'Minimum of Six characters (letters and digits)'); } $('password').setStyle('background-color', '#fa5ffb'); }); $('password').addEvent('blur', function(e){ if ($('hint')){ $('hint').set('txt', ""); } if($('password') != null) $('password').setStyle('background-color', '#ffffff'); }); } } } function cleanError (){ if ($('showError')) $('showError').set('html', '') } window.addEvent('domready', function(){ manageUboxEvents(); });