			function CheckForm() {
				tError=CheckInput();
				if (tError.length> 0) {
					alert ("Please fill the following fields in correctly:\n\n"+tError);
					return false;
				}
				else {
					return true;
				}
			}
			function CheckFormOther() {
				tError=CheckInputOther();
				if (tError.length> 0) {
					alert ("Please fill the following fields in correctly:\n\n"+tError);
					return false;
				}
				else {
					return true;
				}
			}
			function SubmitForm() {
				tError=CheckInput();
				if (tError.length> 0) {
					alert ("Please fill the following fields in correctly:\n\n"+tError);
				}
				else {
					document.forms['contact'].submit();
				}
			}
			function CheckInput() {
				var Error=''
				if (document.forms['contact'].name.value.length < 2)
					Error=Error+"* Name\n";
				if (document.forms['contact'].country.value.length < 2)
					Error=Error+"* Country\n";
				if (!CheckEmail (document.forms['contact'].email.value))
					Error=Error+"* E-mail\n";
				if (document.forms['contact'].office.value.length < 2)
					Error=Error+"* Office\n";							
				return Error;
			}
			function CheckInputOther() {
				var Error=''
				if (document.forms['contact'].name.value.length < 2)
					Error=Error+"* Name\n";
				if (document.forms['contact'].country.value.length < 2)
					Error=Error+"* Country\n";
				if (!CheckEmail (document.forms['contact'].email.value))
					Error=Error+"* E-mail\n";
					
				if (!CheckTelephone (document.forms['contact'].tel.value))
					Error=Error+"* Telephone shud be numeric\n";
				else	
					Error=Error+"* Telephone is numeric\n";
					
				return Error;
			}
			function CheckEmail (What) {
				What=""+What;
				Ret = true;
		        if (What.length < 3) {
					Ret=false;
				}
		        if (What.indexOf("@") < 0) {
					Ret=false;
				}
		        if (What.indexOf(".") < 0) {
					Ret=false;
				}
				return Ret;
			}
			
			function CheckTelephone(){
				var ret=true;
				var phoneExp = /^([a-zA-Z]+)$/;
				
				if((document.forms['contact'].tel.value!="") && phoneExp.test(document.forms['contact'].tel.value))
					ret = false;
					
				return ret; 						
			}
			
			