/* 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_10383: 'Please enter the required details', txt_10384: 'Please enter the required details', txt_10385: 'Please enter the required details', txt_10386: 'Please enter the required details', txt_10387: 'Please enter the required details', txt_10389: 'Please enter the required details', txt_10390: 'Please enter the required details', txt_10391: 'Enter the booking ID number that is on the booking confirmation email.', txt_10392: 'Please enter the required details'}, init: function() { this.YE.on(this.YD.get('txt_10383'), 'blur', function(event) { var e = event || window.event; if (e.keyCode != 9 && this.value.length > 0) { FV.showStatus(FV.validate('txt_10383', this.value, 'txt_10383'), 'txt_10383', FV.codes.txt_10383,'textinput'); } }); this.YE.on(this.YD.get('txt_10384'), 'blur', function(event) { var e = event || window.event; if (e.keyCode != 9 && this.value.length > 0) { FV.showStatus(FV.validate('txt_10384', this.value, 'txt_10384'), 'txt_10384', FV.codes.txt_10384,'textinput'); } }); this.YE.on(this.YD.get('txt_10385'), 'blur', function(event) { var e = event || window.event; if (e.keyCode != 9 && this.value.length > 0) { FV.showStatus(FV.validate('txt_10385', this.value, 'txt_10385'), 'txt_10385', FV.codes.txt_10385,'textinput'); } }); this.YE.on(this.YD.get('txt_10386'), 'blur', function(event) { var e = event || window.event; if (e.keyCode != 9 && this.value.length > 0) { FV.showStatus(FV.validate('txt_10386', this.value, 'txt_10386'), 'txt_10386', FV.codes.txt_10386,'textinput'); } }); this.YE.on(this.YD.get('txt_10387'), 'blur', function(event) { var e = event || window.event; if (e.keyCode != 9 && this.value.length > 0) { FV.showStatus(FV.validate('txt_10387', this.value, 'txt_10387'), 'txt_10387', FV.codes.txt_10387,'textinput'); } }); this.YE.on(this.YD.get('txt_10389'), 'blur', function(event) { var e = event || window.event; if (e.keyCode != 9 && this.value.length > 0) { FV.showStatus(FV.validate('txt_10389', this.value, 'txt_10389'), 'txt_10389', FV.codes.txt_10389,'textinput'); } }); this.YE.on(this.YD.get('txt_10390'), 'blur', function(event) { var e = event || window.event; if (e.keyCode != 9 && this.value.length > 0) { FV.showStatus(FV.validate('txt_10390', this.value, 'txt_10390'), 'txt_10390', FV.codes.txt_10390,'textinput'); } }); this.YE.on(this.YD.get('txt_10391'), 'blur', function(event) { var e = event || window.event; if (e.keyCode != 9 && this.value.length > 0) { FV.showStatus(FV.validate('txt_10391', this.value, 'txt_10391'), 'txt_10391', FV.codes.txt_10391,'textinput'); } }); this.YE.on(this.YD.get('txt_10392'), 'blur', function(event) { var e = event || window.event; if (e.keyCode != 9 && this.value.length > 0) { FV.showStatus(FV.validate('txt_10392', this.value, 'txt_10392'), 'txt_10392', FV.codes.txt_10392,'textinput'); } }); }, validate: function(t, v, n, sl) { switch(t) { case 'txt_10383': var r = new RegExp(".","gi"); break; case 'txt_10384': var r = new RegExp(".","gi"); break; case 'txt_10385': var r = new RegExp(".","gi"); break; case 'txt_10386': var r = new RegExp(".","gi"); break; case 'txt_10387': var r = new RegExp(".","gi"); break; case 'txt_10389': var r = new RegExp(".","gi"); break; case 'txt_10390': var r = new RegExp(".","gi"); break; case 'txt_10391': var r = new RegExp(".","gi"); break; case 'txt_10392': 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