/* 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_8630: 'Please enter the required details', txt_8632: 'Please enter the required details', txt_8633: 'Please enter the required details', txt_8636: 'Please enter the required details', txt_8884: 'Please enter the required details', txt_8885: 'Please enter the required details', txt_8638: 'Please enter the required details', txt_8639: 'Please enter the required details', txt_8640: 'Please enter the required details', txt_8641: 'Please enter the required details', txt_8643: 'Please enter the required details'}, init: function() { this.YE.on(this.YD.get('txt_8630'), 'blur', function(event) { var e = event || window.event; if (e.keyCode != 9 && this.value.length > 0) { FV.showStatus(FV.validate('txt_8630', this.value, 'txt_8630'), 'txt_8630', FV.codes.txt_8630,'textinput'); } }); this.YE.on(this.YD.get('txt_8632'), 'blur', function(event) { var e = event || window.event; if (e.keyCode != 9 && this.value.length > 0) { FV.showStatus(FV.validate('txt_8632', this.value, 'txt_8632'), 'txt_8632', FV.codes.txt_8632,'textinput'); } }); this.YE.on(this.YD.get('txt_8633'), 'blur', function(event) { var e = event || window.event; if (e.keyCode != 9 && this.value.length > 0) { FV.showStatus(FV.validate('txt_8633', this.value, 'txt_8633'), 'txt_8633', FV.codes.txt_8633,'textinput'); } }); this.YE.on(this.YD.get('txt_8636'), 'blur', function(event) { var e = event || window.event; if (e.keyCode != 9 && this.value.length > 0) { FV.showStatus(FV.validate('txt_8636', this.value, 'txt_8636'), 'txt_8636', FV.codes.txt_8636,'textinput'); } }); this.YE.on(this.YD.get('txt_8884'), 'blur', function(event) { var e = event || window.event; if (e.keyCode != 9 && this.value.length > 0) { FV.showStatus(FV.validate('txt_8884', this.value, 'txt_8884'), 'txt_8884', FV.codes.txt_8884,'textinput'); } }); this.YE.on(this.YD.get('txt_8885'), 'blur', function(event) { var e = event || window.event; if (e.keyCode != 9 && this.value.length > 0) { FV.showStatus(FV.validate('txt_8885', this.value, 'txt_8885'), 'txt_8885', FV.codes.txt_8885,'textinput'); } }); this.YE.on(this.YD.get('txt_8638'), 'blur', function(event) { var e = event || window.event; if (e.keyCode != 9 && this.value.length > 0) { FV.showStatus(FV.validate('txt_8638', this.value, 'txt_8638'), 'txt_8638', FV.codes.txt_8638,'textinput'); } }); this.YE.on(this.YD.get('txt_8639'), 'blur', function(event) { var e = event || window.event; if (e.keyCode != 9 && this.value.length > 0) { FV.showStatus(FV.validate('txt_8639', this.value, 'txt_8639'), 'txt_8639', FV.codes.txt_8639,'textinput'); } }); this.YE.on(this.YD.get('txt_8640'), 'blur', function(event) { var e = event || window.event; if (e.keyCode != 9 && this.value.length > 0) { FV.showStatus(FV.validate('txt_8640', this.value, 'txt_8640'), 'txt_8640', FV.codes.txt_8640,'textinput'); } }); this.YE.on(this.YD.get('txt_8641'), 'blur', function(event) { var e = event || window.event; if (e.keyCode != 9 && this.value.length > 0) { FV.showStatus(FV.validate('txt_8641', this.value, 'txt_8641'), 'txt_8641', FV.codes.txt_8641,'textinput'); } }); this.YE.on(this.YD.get('txt_8643'), 'blur', function(event) { var e = event || window.event; if (e.keyCode != 9 && this.value.length > 0) { FV.showStatus(FV.validate('txt_8643', this.value, 'txt_8643'), 'txt_8643', FV.codes.txt_8643,'textinput'); } }); }, validate: function(t, v, n, sl) { switch(t) { case 'txt_8630': var r = new RegExp(".","gi"); break; case 'txt_8632': var r = new RegExp(".","gi"); break; case 'txt_8633': var r = new RegExp(".","gi"); break; case 'txt_8636': var r = new RegExp(".","gi"); break; case 'txt_8884': var r = new RegExp(".","gi"); break; case 'txt_8885': var r = new RegExp(".","gi"); break; case 'txt_8638': var r = new RegExp(".","gi"); break; case 'txt_8639': var r = new RegExp(".","gi"); break; case 'txt_8640': var r = new RegExp(".","gi"); break; case 'txt_8641': var r = new RegExp(".","gi"); break; case 'txt_8643': 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