function validateForm(){

		//a "shorcut" variable to save me typing the form to check each time
		var form_check = document.forms.inquiry.elements;

			//checks if the first name field has been left blank..
		if(form_check.name.value == ''){

			//and if it has, tells them off
			alert("Please enter your Name !");
			return false;
		}
		
		if(form_check.address.value == ''){

			//and if it has, tells them off
			alert("Please enter your Address !");
			return false;
		}
		
		if(form_check.handphone.value == ''){

			//and if it has, tells them off
			alert("Please enter your Handphone Number !");
			return false;
		}

		//if the email field does not have one @ sign..
		else if(form_check.email.value.indexOf('@')<0){

			//then show this message
			alert('Please enter your valid email address\n\nAnd please enter an \"@\" sign !');
			return false;
		}
		
		if(form_check.subject.value == ''){

			//and if it has, tells them off
			alert("Please enter your Subject !");
			return false;
		}
		
		if(form_check.message.value == ''){

			//and if it has, tells them off
			alert("Please enter your Message !");
			return false;
		}

		//if all is well submit the form. Happy days - "Lets validate, and have a good time"
		alert('Thank you for your Inquiry');
		return true;
}
	
//creates a function to check the email field
function validateContactForm(){

		//a "shorcut" variable to save me typing the form to check each time
		var form_check = document.forms.contact.elements;

			//checks if the first name field has been left blank..
		if(form_check.name.value == ''){

			//and if it has, tells them off
			alert("Please enter your Name !");
			return false;
		}
		
		if(form_check.address.value == ''){

			//and if it has, tells them off
			alert("Please enter your Address !");
			return false;
		}
		
		if(form_check.handphone.value == ''){

			//and if it has, tells them off
			alert("Please enter your Handphone Number !");
			return false;
		}

		//if the email field does not have one @ sign..
		else if(form_check.email.value.indexOf('@')<0){

			//then show this message
			alert('Please enter your valid email address\n\nAnd please enter an \"@\" sign !');
			return false;
		}
		
		if(form_check.subject.value == ''){

			//and if it has, tells them off
			alert("Please enter your Subject !");
			return false;
		}
		
		if(form_check.message.value == ''){

			//and if it has, tells them off
			alert("Please enter your Message !");
			return false;
		}

		//if all is well submit the form. Happy days - "Lets validate, and have a good time"
		alert('Thank you for your Contact');
		return true;
}
	
//creates a function to check the email field
function validateConsultation(){

		//a "shorcut" variable to save me typing the form to check each time
		var form_check = document.forms.consulform.elements;

			//checks if the first name field has been left blank..
		if(form_check.name.value == ''){

			//and if it has, tells them off
			alert("Please enter your Name !");
			return false;
		}
		
		if(form_check.phone_hp.value == ''){

			//and if it has, tells them off
			alert("Please enter your Handphone Number !");
			return false;
		}

		//if the email field does not have one @ sign..
		else if(form_check.email.value.indexOf('@')<0){

			//then show this message
			alert('Please enter your valid email address\n\nAnd please enter an \"@\" sign !');
			return false;
		}
		
		if(form_check.content.value == ''){

			//and if it has, tells them off
			alert("Please enter your Content !");
			return false;
		}
		
		//if all is well submit the form. Happy days - "Lets validate, and have a good time"
		alert('Thank you for your Question');
		return true;
}

function validateRegisterForm(){

		//a "shorcut" variable to save me typing the form to check each time
		var form_check = document.forms.registerform.elements;

			//checks if the first name field has been left blank..
		if(form_check.name.value == ''){

			//and if it has, tells them off
			alert("Please enter your Name !");
			return false;
		}
		
		if(form_check.address.value == ''){

			//and if it has, tells them off
			alert("Please enter your Address !");
			return false;
		}
		
		if(form_check.phone.value == ''){

			//and if it has, tells them off
			alert("Please enter your Phone Number !");
			return false;
		}

		//if the email field does not have one @ sign..
		else if(form_check.email.value.indexOf('@')<0){

			//then show this message
			alert('Please enter your valid email address\n\nAnd please enter an \"@\" sign !');
			return false;
		}

		//if all is well submit the form. Happy days - "Lets validate, and have a good time"
		alert('Thank you');
		return true;
}

function seminarsubmit(){
		var form_check = document.forms.seminarregistration.elements;

		if(form_check.nama.value == ''){
			alert("Silahkan tulis nama Anda !");
			return false;
		}
		
		if(form_check.alamat.value == ''){
			alert("Silahkan tulis alamat Anda !");
			return false;
		}
		
		if(form_check.telp_fax.value == ''){
			alert("Silahkan tulis Nomor Telpon atau Nomor Fax Anda !");
			return false;
		}

		else if(form_check.email.value.indexOf('@')<0){
			alert('Silahkan tuliskan alamat email \n\ndan pastikan terdapat simbil\"@\" !');
			return false;
		}

		alert('TERIMA KASIH !\n\nFORMULIR PENDAFTARAN ANDA TELAH KAMI TERIMA.\n\nPANITIA AKAN SEGERA MENGHUBUNGI ANDA \n\nkonfirmasi sebagai peserta seminar ini akan kami kirimkan melalui fax atau email paling lambat 1 atau 2 hari sebelum acara.');
		return true;
}
