/*
	MAGIC Solutions Validation Library.
	Copyright (c) 2001 MAGIC Solutions
	Visit http://www.magic-solutions.com/ for
	documentation as well as more cool stuff.
	Please do not remove these lines.
*/

function Validation(Y){var w='a-zA-Z',r=w+'\\d',A='['+r+']['+r+'\\-]*['+r+']',f=false,t=true,g,j,s;function W(u){g=((u=u.toUpperCase())=='AR')?'X0CX1BX21-X3AX40-X51'.replace(/X/g,'\\u06'):((u=='FR')?w+'ΰβηιθκλξοτωϋόζΐΒΗΙΘΚΛΞΟΤΩΫάΖ':w);j=g+'\\d'}function h(e,a,b,d,F){var i=x(e,a),F=new RegExp(F);s=i?t:f;return e.n?f:((d&&!i.length)?p(e,a,b,1):((d&&!F.test(i))?p(e,a,b,2):i))}function L(e,a,b,o){var i=x(e,a);return e.n?f:((i.length&&i.length<o)?p(e,a,b,5):t)}function B(e,a,b,y,m){var i=x(e,a);return e.n?f:((i>m)?p(e,a,b,3):((i<y)?p(e,a,b,4):i))}function x(e,a){return eval('e.v.'+a+'.value')}function p(e,a,b,q){q=(q==1)?'Missing':((q==2)?'Invalid':((q==3)?'Large':((q==4)?'Small':'Short')));alert(eval('e.err'+q+'.replace(/FIELDNAME/g,b)'));eval('e.v.'+a+'.focus()');e.isValid=f;e.n=t;return f}function E(J,H,I,b,d){var C,m,k,z;C=h(this,I,b,d,'^\\d+$');if(!C)return f;C=h(this,H,b,d,'^\\d+$')?(s?B(this,H,b,1,12):t):f;if(!C)return f;k=x(this,H);z=x(this,I);m=((k==1)||(k==3)||(k==5)||(k==7)||(k==8)||(k==10))?31:((k==2)?(z%400==0)?29:((z%100==0)?28:((z%4==0)?29:28)):30);return h(this,J,b,d,'^\\d+$')?(s?B(this,J,b,1,m):t):f}function a1(){return !this.n}function M(a,b,d){return h(this,a,b,d,'^['+w+'][\\w\\.\\-]*['+r+']@'+A+'(\\.'+A+')+$')}function N(a,b,d){return h(this,a,b,d,'^['+g+']['+g+'\\s\\.\\-]*['+g+']$')}function O(a,b,d,o){return L(this,a,b,o)?h(this,a,b,d,'^['+r+']{'+o+',}$'):f}function P(a,b,d){return h(this,a,b,d,'^(\\+\\d+[\\s\\-]{0,1})?(\\(\\d+\\))?[\\d+\\-\\s]{4,}\\d$')}function Q(a,b,d){with(this){for(var l=0,Z;l<=eval('v.'+a+'.length')-1;l++)Z=Z||eval('v.'+a+'['+l+'].checked');return n?f:(Z?t:p(this,a+'[0]',b,1))}}function R(a,b,d,y,m){return h(this,a,b,d,'^(\\+|\\-)?\\d*(\\.\\d+)?$')?(s?B(this,a,b,y,m):t):f}function S(a,b,d){with(this)return n?f:(d&&eval('v.'+a+'.selectedIndex<1')?p(this,a,b,1):t)}function X(a,b,d){return h(this,a,b,d,'')}function T(a,b,d){return h(this,a,b,d,'^(http:\\/\\/)?'+A+'(\\.'+A+')+[\\?\\/]')}function U(a,b,d,o){return L(this,a,b,o)?h(this,a,b,d,'^['+w+'][\\w\\.\\-]{'+(parseInt(o)-2)+',}['+r+']$'):f}function V(a,b,d,y,m){return h(this,a,b,d,'^\\d+$')?(s?B(this,a,b,y,m):t):f}var Z=new String('Date|Date2|Email|Name|Password|Phone|Real|Radio|Select|URL|UserID|Whole|Text').split('|'),a0=new String('E|a1|M|N|O|P|R|Q|S|T|U|V|X').split('|');for(var l=0;l<13;l++)eval('this.add'+Z[l]+'='+a0[l]);this.n=f;this.isValid=t;this.v=eval('document.forms.'+Y);this.setLanguage=W;W('EN');var K='The FIELDNAME ',D=K+'that you entered is ';this.errMissing=K+'is required.';this.errInvalid=D+'invalid.';this.errLarge=D+'too large.';this.errSmall=D+'too small.';this.errShort=D+'too short.'}