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