/* 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_613: 'Please enter the required details', txt_614: 'Please enter the required details', txt_621: 'Please enter the required details'}, init: function() { this.YE.on(this.YD.get('txt_613'), 'blur', function(event) { var e = event || window.event; if (e.keyCode != 9 && this.value.length > 0) { FV.showStatus(FV.validate('txt_613', this.value, 'txt_613'), 'txt_613', FV.codes.txt_613,'textinput'); } }); this.YE.on(this.YD.get('txt_614'), 'blur', function(event) { var e = event || window.event; if (e.keyCode != 9 && this.value.length > 0) { FV.showStatus(FV.validate('txt_614', this.value, 'txt_614'), 'txt_614', FV.codes.txt_614,'textinput'); } }); this.YE.on(this.YD.get('txt_621'), 'blur', function(event) { var e = event || window.event; if (e.keyCode != 9 && this.value.length > 0) { FV.showStatus(FV.validate('txt_621', this.value, 'txt_621'), 'txt_621', FV.codes.txt_621,'textinput'); } }); }, validate: function(t, v, n, sl) { switch(t) { case 'txt_613': var r = new RegExp(".","gi"); break; case 'txt_614': var r = new RegExp(".","gi"); break; case 'txt_621': 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