// JavaScript Document
	var s="";
	
	String.prototype.trim = function () {
		return this.replace(/^\s*/, "").replace(/\s*$/, "");
	}
	
	function WorkingMessage() {
		
		
		s=document.contactUsForm.nameTB.value.trim();
		document.contactUsForm.nameTB.value=s;
		
		if (s == ""){
			alert ("Please enter your name.");
			contactUsForm.nameTB.focus();
			return false;
		}
		
		s=document.contactUsForm.contactTB.value.trim();
		document.contactUsForm.contactTB.value=s;
		
		if(s != "") { 
			var val= contactUsForm.contactTB.value;
			var len = val.length;
				
			for(i=0;i<len ;++i)
			{
				var str = val.substring(i,i+1);
				if((str < "0") || (str > "9"))
				{
					alert("Please enter only numbers for contact number.") ;
					contactUsForm.contactTB.value = "";
					contactUsForm.contactTB.focus(); 
					return false;
				}
			}
		}
		
		s=document.contactUsForm.emailTB.value.trim();
		document.contactUsForm.emailTB.value=s;
		
		if (s == ""){
			alert ("Please enter either your email address.");
			contactUsForm.emailTB.focus();
			return false;
		}
		else{
			invalidChars = " /:,;&$#*()!+=<>?%^'~|\`";
			
			email = contactUsForm.emailTB.value
				
			for (i=0; i<invalidChars.length; i++) 	
			{
				have = false;
				badChar = invalidChars.charAt(i); 
				// Assigns invalid chars to badChar
				if (email.indexOf(badChar) != -1) 
				// Search email string for bad char. If bad char exists fail 
				{          
					have = true;
					// indexOF method of String Object returns -1 if not found. 
				}
				if(have == true)
				{
					alert ("Email address contains Bad Char!");   
				   contactUsForm.emailTB.focus();
					return false;
				}
				// != -1 means NOT NOT Found means Found.
			}
				
				atPos = email.indexOf("@");			
			// there must be one "@" symbol
			if (atPos == -1) 
			{
				alert ("Email address has @ symbol missing!");
				contactUsForm.emailTB.focus();
				return false;
			} // End check for "@"
		
			if (email.charAt(email.length-1)=="@"||email.charAt(email.length-2)=="@") 
			{ // Lookig for "@" 1 or 2 positions from the end. 
				
				alert("Email address cannot have abc@ or abc@x");
				contactUsForm.emailTB.focus();
				return false;
			}
					
			dot = email.indexOf(".");
			if(dot == -1)
			{
				alert ("Dot is missing!");
				contactUsForm.emailTB.focus();
				return false;
			}
					
			if (email.charAt(email.length-1)=="." || email.charAt(email.length-2)==".") 
			{ // Lookig for "@" 1 or 2 positions from the end. 			
				alert("Email address cannot have abc@abc. or abc@abc.c");
				contactUsForm.emailTB.focus();
				return false;
			}
			
			for (i=0; i<email.length; i++)
			{ 	
				if (email.charAt(i) == "@")
				{
					place = i
					
					for (j=i; j<email.length; j++)
					{
						if (email.charAt(j) == "_") 
						// Search email string for bad char. 
						//If bad char exists fail 
						{
						// indexOF method of string Object returns -1 if not found. 
							alert ("Email address after @ cannot contains \"_\"");  
							// != -1 means NOT NOT Found means Found.
							contactUsForm.emailTB.focus();
							return false;
						}
					}
				}
			}
		}
		 var interest="";
		   var count=0;
		   for (var i=0; i < document.contactUsForm.interestCB.length; i++)
			{
				if (document.contactUsForm.interestCB[i].checked)
				{
					count = count + 1;
					
					if (count==1){
						interest = document.contactUsForm.interestCB[i].value;
					}
					else if (count>1){
						interest = interest + ", " + document.contactUsForm.interestCB[i].value;
					}
				}
			}
			document.contactUsForm.interestTB.value = interest;
			
			
		s=document.contactUsForm.commentTB.value.trim();
		document.contactUsForm.commentTB.value=s;
		
		var url="http://www.st701.com/processContactUs.html"; 
		// URL
		var height = 100;            // Height of popup
		var width = 450;             // Width of popup
		var att='width=' + width + ',height=' + height;
		WorkingMessagePopup=window.open(url,"wmp",att);
		
	} 