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