
function emailverify(email)
	{
	var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
	str=email;
	if(!filter.test(str))
		{
		return false
		}
	else return true;
	}
	function getVal(id)
	{
		return document.getElementById(id).value;
	}
	//--------------------------------------------------------------------------------
	function chkChecks(){
		
		var isChecked=false
		
		for(var i=0;i<document.forms["equiry_form"]["course[]"].length;i++){
		if(document.forms["equiry_form"]["course[]"][i].checked){
		isChecked=true
		}
		}
		
		//alert(isChecked);
		if(!isChecked){alert('Please select the courses of interest');
		return false;
		}
		
	}

	//--------------------------------------------------------



 
 
 
 
function zvalidate_form()
	{
		
		
		//return chkChecks();
		
		if(getVal('name')=='' )
			{
				alert('Please enter your full name.');
				document.getElementById('name').focus();
				return false;
			}
			
		
		
		
			
			if(!emailverify(getVal('email')))
			{
				alert('Please enter your email address.');
				document.getElementById('email').focus();
				return false;
			}
			
				
			if(getVal('address')=='' )
			{
				alert('Please enter your address.');
				document.getElementById('address').focus();
				return false;
			}
			
			if(getVal('comments')=='' )
			{
				alert('Please enter your comments/suggestion.');
				document.getElementById('comments').focus();
				return false;
			}
			
			
		
			return true;
			
	
		
	}



