// Title: Tigra Form Validator PRO
// URL: http://www.softcomplex.com/products/tigra_form_validator_pro/
// Version: 1.0d
// Date: 06/23/2004 (mm/dd/yyyy)
// Notes: Registration needed to use this script legally. Visit official site for details.

var A=/^(\d{1,2})\-(\d{1,2})\-(\d{4})$/,B=/^(\d{1,2})\:(\d{1,2})\:(\d{1,2})$/,C=[/^[a-zA-Z\.\-]*$/,/^\w+$/,/^\d+$/,/^[\w-\.]+\@[\w\.-]+\.[a-z]{2,4}$/,/^[\d\.\s\-]+$/,function(n){return n>2&&n<100},/^[\w]+$/,function(n){return n>0&&n<6},/^a?\*?b$/,/^Math\.log?\(c\)$/,/^a?\/=?b$/,/^Math\.sqrt?\(c\)$/,/^Math\.pow?\(a,?b\)$/];function D(F,G,H){var I=['registration','survey','test'];this.J=K;this.L=F==2?['%l must be answered','','"%v" is not correct answer for %l']:['"%l" is a required field','Value for "%l" must be %mn characters or more','"%v" is not valid value for "%l"','"%l" must match "%ml"'];this.M=G;this.N=I[F];this.F=F;this.H=H;this.exec=O}function O(){var P=document.forms[this.N];var Q=R('e'+this.F),S=R('o'+this.F),T=document.body&&document.body.innerHTML;if(typeof(this.M)!='function'&&T){S.style.display='none';S.style.visibility='hidden';Q.innerHTML=''}if(!this.AX){for(var U in this.H){this.H[U]['n']=U;this.H[U]['l']=V[this.F][this.H[U]['l']];this.H[U].W=P.elements[U]}this.AX=1}if(T)for(var U in this.H){var X=R('t_'+U);this.H[U].Y=X;X.className='inputNormal'}for(var U in this.H){W=this.H[U].W;this.H[U]['v']=null;if(W.value||W.checked)this.H[U]['v']=W.value;else if(W.options)this.H[U]['v']=W.options[W.selectedIndex].value;else if(W.length>0)for(var e=0;e<W.length;e++)if(W[e].checked){this.H[U]['v']=W[e].value;break}}var f=0,g,h;for(var U in this.H){h=this.H[U]['f']?(C[this.H[U]['f']]?C[this.H[U]['f']]:this.H[U]['f']):null;this.H[U].i=null;if(this.H[U]['r']&&!this.H[U]['v']){this.H[U].i=1;f++}else if(this.H[U]['mn']&&String(this.H[U]['v']).length<this.H[U]['mn']){this.H[U].i=2;f++}else if(this.H[U]['v']&&this.H[U]['f']&&((typeof(h)=='function'&&!h(this.H[U]['v']))||(typeof(h)!='function'&&!h.test(this.H[U]['v'])))){this.H[U].i=3;f++}else if(this.H[U]['m']){for(var j in this.H)if(j==this.H[U]['m']){g=j;break}if(this.H[g]['v']!=this.H[U]['v']){this.H[U]['ml']=this.H[g]['l'];this.H[U].i=4;f++}}}var k='',l='',m;if(f){for(var U in this.H){var o=this.H[U].i;var p='';if(o){p=this.J(o-1,this.H[U]);if(!m)m=P.elements[U];k+=p+'<br>';l+=p+"\n";if(T&&this.H[U].Y)this.H[U].Y.className='inputHighlighted'}}if(typeof(this.M)!='function'){if(this.M&1)alert(l);if(T){Q.innerHTML=k;S.style.display='block';S.style.visibility='visible'}if(m.focus)m.focus();return false}}if(typeof(this.M)=='function')return this.M(l,k,Q);else{if((this.M&16)&&!confirm('The "registration" form is to be submitted. Are you sure?'))return false;if(T){Q.innerHTML='<font color="red">Submitting ...</font>';S.style.display='block';S.style.visibility='visible'}var q=['Submit','Reset'];for(U in q)if(P.elements[q[U]])P.elements[q[U]].disabled=true}}function K(e){var r=this.L[e],t=1,u;for(;t<arguments.length;t++)for(u in arguments[t])r=r.replace('%'+u,arguments[t][u]);return r}function R(v){return(document.all?document.all[v]:(document.getElementById?document.getElementById(v):null))}function x(F,y){var b_=document.body.filters;if(y){AA.style.visibility='hidden';if(b_)AA.style.filter='revealTrans(TRANSITION=12,DURATION=1)';AB.innerHTML=AC+'<b>'+(F?'Test':'Survey')+' Hint</b>:<br><br>'+y;if(b_)AA.filters[0].apply();AA.style.visibility='visible';if(b_)AA.filters[0].play();AD++;return false}else{AD=0;AA.style.visibility='hidden';alert(F?'Thank you for taking our test!\nYou\'ve made it in '+AD+' tries':'Thank you for taking our survey!');return true}}var V=[['Title','First Name','Last Name','Company','Company Number','Street Address','City','County','Post Code','Country','Telephone Number','E-mail','Number of Employees','Type of Request','General information','Name','E-mail','Password','Password copy'],['Age','Occupation','How often...','Usefulness','One word about...','Rate'],['Question 1','Question 2','Question 3','Question 4','Question 5']]
