// JavaScript Document
//called when form is submitted to validate all of the fields
		//and to create the SQL statement for the next page
		function validate(){
			//turns off all previous error messages
			//off_imgs();
			//document.getElementById('err_div').innerHTML = "";
			var myForm = document.reg_form.elements;
			var name = myForm['Name'].value;
			var company = myForm['Company'].value;
			var phone = myForm['Phone'].value;
			var num_people = myForm['No. of People'].value;
			var fax = myForm['Fax'].value;
			var con_phone = myForm['Contact Phone'].value;
			var email = myForm['email'].value;
			var events = myForm['Events Name'].value;
			var date = myForm['Date Needed'].value;
			var time = myForm['Time'].value;
			var other = myForm['Other'].value;
			var location = myForm['Location'].value;
			var contact = myForm['Contact at Site'].value;
			var wanted = myForm['What is Wanted'].value;
			var comments = myForm['Comments'].value;
			var special = myForm['Special Request'].value;
			var err_msg = '';
			var valid = true;
			
			//alert(name + "\n" + company);
			name = name.toUpperCase();
			company = company.toUpperCase();
			phone = phone.toUpperCase();
			num_people = num_people.toUpperCase();
			fax = fax.toUpperCase();
			email = email.toUpperCase();
			events = events.toUpperCase();
			date = date.toUpperCase();
			other = other.toUpperCase();
			location = location.toUpperCase();
			contact = contact.toUpperCase();
			wanted = wanted.toUpperCase();
			comments = comments.toUpperCase();
			special = special.toUpperCase();
			time = time.toUpperCase();
			con_phone = con_phone.toUpperCase();
			
			var test = name + company + phone + num_people + fax + email + events + date + time + other + location + contact + wanted + comments + special;
			
			//alert(test);
			
			if(test.indexOf("PORN") != -1 || test.indexOf("SEX") != -1 || test.indexOf("ROLLYO.COM") != -1 ){
				alert("Invalid Entry.  Please Re-Enter Information");
				return false;
			}else{
				return true;
			}
					
			//var a = 'Hello world!';
			//document.write(a.indexOf('w'));
			
			return false;
			
		}