/* Form Validation */ function FV() {} FV.prototype = { YD: YAHOO.util.Dom, YE: YAHOO.util.Event, YA: YAHOO.util.Anim, YC: YAHOO.util.Connect, strength: -1, uidcount: 0, uids: {}, codes: { txt_11787: 'Please enter the required details', txt_11788: 'Please enter the required details', txt_11789: 'Please enter the required details', txt_11790: 'Please enter the required details', txt_11791: 'Please enter the required details', txt_11793: 'Please enter the required details', txt_11794: 'Please enter the required details', txt_11795: 'Please enter the required details', txt_11796: 'Please enter the required details', txt_11797: 'Please enter the required details'}, init: function() { this.YE.on(this.YD.get('txt_11787'), 'blur', function(event) { var e = event || window.event; if (e.keyCode != 9 && this.value.length > 0) { FV.showStatus(FV.validate('txt_11787', this.value, 'txt_11787'), 'txt_11787', FV.codes.txt_11787,'textinput'); } }); this.YE.on(this.YD.get('txt_11788'), 'blur', function(event) { var e = event || window.event; if (e.keyCode != 9 && this.value.length > 0) { FV.showStatus(FV.validate('txt_11788', this.value, 'txt_11788'), 'txt_11788', FV.codes.txt_11788,'textinput'); } }); this.YE.on(this.YD.get('txt_11789'), 'blur', function(event) { var e = event || window.event; if (e.keyCode != 9 && this.value.length > 0) { FV.showStatus(FV.validate('txt_11789', this.value, 'txt_11789'), 'txt_11789', FV.codes.txt_11789,'textinput'); } }); this.YE.on(this.YD.get('txt_11790'), 'blur', function(event) { var e = event || window.event; if (e.keyCode != 9 && this.value.length > 0) { FV.showStatus(FV.validate('txt_11790', this.value, 'txt_11790'), 'txt_11790', FV.codes.txt_11790,'textinput'); } }); this.YE.on(this.YD.get('txt_11791'), 'blur', function(event) { var e = event || window.event; if (e.keyCode != 9 && this.value.length > 0) { FV.showStatus(FV.validate('txt_11791', this.value, 'txt_11791'), 'txt_11791', FV.codes.txt_11791,'textinput'); } }); this.YE.on(this.YD.get('txt_11793'), 'blur', function(event) { var e = event || window.event; if (e.keyCode != 9 && this.value.length > 0) { FV.showStatus(FV.validate('txt_11793', this.value, 'txt_11793'), 'txt_11793', FV.codes.txt_11793,'textinput'); } }); this.YE.on(this.YD.get('txt_11794'), 'blur', function(event) { var e = event || window.event; if (e.keyCode != 9 && this.value.length > 0) { FV.showStatus(FV.validate('txt_11794', this.value, 'txt_11794'), 'txt_11794', FV.codes.txt_11794,'textinput'); } }); this.YE.on(this.YD.get('txt_11795'), 'blur', function(event) { var e = event || window.event; if (e.keyCode != 9 && this.value.length > 0) { FV.showStatus(FV.validate('txt_11795', this.value, 'txt_11795'), 'txt_11795', FV.codes.txt_11795,'textinput'); } }); this.YE.on(this.YD.get('txt_11796'), 'blur', function(event) { var e = event || window.event; if (e.keyCode != 9 && this.value.length > 0) { FV.showStatus(FV.validate('txt_11796', this.value, 'txt_11796'), 'txt_11796', FV.codes.txt_11796,'textinput'); } }); this.YE.on(this.YD.get('txt_11797'), 'blur', function(event) { var e = event || window.event; if (e.keyCode != 9 && this.value.length > 0) { FV.showStatus(FV.validate('txt_11797', this.value, 'txt_11797'), 'txt_11797', FV.codes.txt_11797,'textinput'); } }); }, validate: function(t, v, n, sl) { switch(t) { case 'txt_11787': var r = new RegExp(".","gi"); break; case 'txt_11788': var r = new RegExp(".","gi"); break; case 'txt_11789': var r = new RegExp(".","gi"); break; case 'txt_11790': var r = new RegExp(".","gi"); break; case 'txt_11791': var r = new RegExp(".","gi"); break; case 'txt_11793': var r = new RegExp("[A-PR-UWYZ][A-HK-Y0-9][A-HJKSTUW0-9]?[ABEHMNPRVWXY0-9]? *[0-9][ABD-HJLN-UW-Z]{2}","gi"); break; case 'txt_11794': var r = new RegExp(".","gi"); break; case 'txt_11795': var r = new RegExp("[a-zA-Z0-9+%-._]+@[a-zA-Z0-9.\\-_]+\\.[a-zA-Z]{2,4}","gi"); break; case 'txt_11796': var r = new RegExp(".","gi"); break; case 'txt_11797': var r = new RegExp(".","gi"); break; } if (r) { if (r.exec(v)) { return true; }else{ return false; } } }, showStatus: function(s, id, m, c) { FV.YD.get('status-'+id).className = 'l'; FV.YD.setStyle('status-'+id, 'opacity', 1); FV.YD.get('status-'+id).innerHTML = ''; clearTimeout(FV.YD.get('status-'+id).statim); FV.YD.get('status-'+id).statim = setTimeout(function() { FV.YD.get(id).className = c; if (s) { FV.YD.get('status-'+id).className = 's'; if (FV.YD.get('strength-'+id)) { FV.YD.get('strength-'+id).style.display = 'block'; FV.YD.get(id).className = c; } }else{ FV.YD.setStyle('status-'+id, 'opacity', 1); FV.YD.get('status-'+id).className = 'f'; FV.YD.get('status-'+id).innerHTML = m; FV.YD.get(id).className = c + ' fail'; } }, 500); return s; }, getType: function(form) { var e = 0; for(i=0;i