/* 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_11828: 'Please enter the required details', txt_11834: 'Please enter the required details', men_11841: 'Please enter the required details', men_11884: 'Please enter the required details'}, init: function() { this.YE.on(this.YD.get('txt_11828'), 'blur', function(event) { var e = event || window.event; if (e.keyCode != 9 && this.value.length > 0) { FV.showStatus(FV.validate('txt_11828', this.value, 'txt_11828'), 'txt_11828', FV.codes.txt_11828,'textinput'); } }); this.YE.on(this.YD.get('txt_11834'), 'blur', function(event) { var e = event || window.event; if (e.keyCode != 9 && this.value.length > 0) { FV.showStatus(FV.validate('txt_11834', this.value, 'txt_11834'), 'txt_11834', FV.codes.txt_11834,'textinput'); } }); this.YE.on(this.YD.get('men_11841'), 'change', function() { FV.validate('men_11841', this.options.selectedIndex, 'men_11841', true); }); this.YE.on(this.YD.get('men_11841'), 'blur', function() { FV.validate('men_11841', this.options.selectedIndex, 'men_11841', true); }); this.YE.on(this.YD.get('men_11884'), 'change', function() { FV.validate('men_11884', this.options.selectedIndex, 'men_11884', true); }); this.YE.on(this.YD.get('men_11884'), 'blur', function() { FV.validate('men_11884', this.options.selectedIndex, 'men_11884', true); }); }, validate: function(t, v, n, sl) { switch(t) { case 'txt_11828': var r = new RegExp(".","gi"); break; case 'txt_11834': var r = new RegExp("^(?=\\d)(?:(?!(?:(?:0?[5-9]|1[0-4])(?:\\.|-|\\/)10(?:\\.|-|\\/)(?:1582))|(?:(?:0?[3-9]|1[0-3])(?:\\.|-|\\/)0?9(?:\\.|-|\\/)(?:1752)))(31(?!(?:\\.|-|\\/)(?:0?[2469]|11))|30(?!(?:\\.|-|\\/)0?2)|(?:29(?:(?!(?:\\.|-|\\/)0?2(?:\\.|-|\\/))|(?=\\D0?2\\D(?:(?!000[04]|(?:(?:1[^0-6]|[2468][^048]|[3579][^26])00))(?:(?:(?:\\d\\d)(?:[02468][048]|[13579][26])(?!\\x20BC))|(?:00(?:42|3[0369]|2[147]|1[258]|09)\\x20BC))))))|2[0-8]|1\\d|0?[1-9])([-.\\/])(1[012]|(?:0?[1-9]))\\2((?=(?:00(?:4[0-5]|[0-3]?\\d)\\x20BC)|(?:\\d{4}(?:$|(?=\\x20\\d)\\x20)))\\d{4}(?:\\x20BC)?))?$","gi"); break; case 'men_11841': if (this.YD.get(n).options[v].value != '') { if (sl) { this.showStatus(true, n, this.codes.men_11841,'menuinput'); } return true; }else{ this.showStatus(false, n, this.codes.men_11841,'menuinput'); return false; } break; case 'men_11884': if (this.YD.get(n).options[v].value != '') { if (sl) { this.showStatus(true, n, this.codes.men_11884,'menuinput'); } return true; }else{ this.showStatus(false, n, this.codes.men_11884,'menuinput'); return false; } 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