
	$(document).ready(function() {
		$("a.zoom").fancybox({
			'zoomSpeedIn'		:	500,
			'zoomSpeedOut'		:	500
		});
		$(".tablespec tr:odd").css("background-color", "#fff");
		$(".tablespec tr:even").css("background-color", "#D0F8FF");
		$("#table-compare tr:odd").css("background-color", "#fff");
		$("#table-compare tr:even").css("background-color", "#D0F8FF");
	});

	//creates a function to check the email field
	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 Inquiry');
		return true;
	}
	
	function cek(){
	var counter=0;
	var elemen=document.compareform.elements;
	var jumlah_semua=elemen.length
	for(var i=0;i<jumlah_semua;i++){
	if(elemen[i].name=='id[]'){
	if(elemen[i].checked==true) counter++;
	}
	}

	//cek counter
	if(counter==2)
	return true;
	else
	alert ('Please Select 2 Product To Compare');
	return false
	}