function show()
{
		//alert("Hello");
		document.getElementById('other_services').style.display="block";
		document.getElementById('other').other.focus();
		//document.getElementById('comment_box').style.display="block";
}
function hide()
{
		//alert("Hello");
		document.getElementById('other_services').style.display="none";
		//document.getElementById('comment_box').style.display="none";
		//document.getElementById('other_services').checked="checked";
}
function validation()
{
		var my_car=document.form1.name.value;
		var fn = my_car.replace(/^\s+|\s+$/, '');
		if(fn=='')
		{
		alert('Please Enter Name.');
		document.form1.name.focus();
		return false;
		}
		/*var my_car=document.form1.company.value;
		var fn = my_car.replace(/^\s+|\s+$/, '');
		if(fn=='')
		{
		alert('Please Enter Company Name.');
		document.form1.company.focus();
		return false;
		}
		var my_car=document.form1.address.value;
		var fn = my_car.replace(/^\s+|\s+$/, '');
		if(fn=='')
		{
		alert('Please Enter Address.');
		document.form1.address.focus();
		return false;
		}*/
		var my_car=document.form1.email.value;
		var fn = my_car.replace(/^\s+|\s+$/, '');
		if(fn=='')
		{
		alert('Please Enter Email ID.');
		document.form1.email.focus();
		return false;
		}
		if(!is_email(document.form1.email.value))
			{
			alert('Please Enter the Correct email id!');
			document.form1.email.value=="";
			document.form1.email.focus();
			return false;
			}
		var my_car=document.form1.phone.value;
		var fn = my_car.replace(/^\s+|\s+$/, '');
		if(fn=='')
		{
		alert('Please Enter Contact Number.');
		document.form1.phone.focus();
		return false;
		}
		if(!is_number(document.form1.phone.value))
			{
			alert('Contact Number Should be Numeric!');
			document.form1.phone.value=="";
			document.form1.phone.focus();
			//document.form1.txtCustZip.select();
			return false;
			}
		/*var my_car=document.form1.url.value;
		var fn = my_car.replace(/^\s+|\s+$/, '');
		if(fn=='')
		{
		alert('Please Enter Url.');
		document.form1.url.focus();
		return false;
		}*/
	var a=document.form1['services[]'];
	//alert("Length:"+a.length);
	var p=0;
	for(i=0;i<a.length;i++){
		if(a[i].checked)
		{
			var other_service=(a[i].value);
			//alert(other_service);
			if(other_service=="Other")
			{
				var my_car=document.form1.other.value;
				var fn = my_car.replace(/^\s+|\s+$/, '');
				if(fn=='')
				{
					alert('Please Enter Other Services Detail.');
					document.form1.other.focus();
					return false;
		}
				
			}
			
			p=1;
		}
	}
	if (p==0)
	{
		alert('Please Select at Least One Service.');
		return false;
	}
	//alert(a[i].value);
	//var a=document.form1['services[]'];
	//alert(a);
	
		var my_car=document.form1.query.value;
		var fn = my_car.replace(/^\s+|\s+$/, '');
		if(fn=='')
		{
		alert('Please Enter Comments.');
		document.form1.query.focus();
		return false;
		}
		var my_car=document.form1.captcha_input.value;
  		var fn = my_car.replace(/^\s+|\s+$/, '');
  	    if(fn=='')
 	    {
	      alert('Please Enter Verification Code !');
	      document.form1.captcha_input.focus();
	      return false;
        }
		return true;
}
//##########################################

	function is_email(email)
	{
		if(!email.match(/^[A-Za-z0-9\._\-+]+@[A-Za-z0-9_\-+]+(\.[A-Za-z0-9_\-+]+)+$/))
			return false;
		return true;
	}
// End of is_email Function

//  this function checks the given number is signed/unsigned number
//  and return true or false accordingly.
	function is_number(number)
	{
		if(!number.match(/^[\-\+0-9e1-9]+$/))
			return false;
		return true;
	}
// End of is_number Function

//  this function checks the given number is unsigned number
//  and return true or false accordingly.
	function is_unsign_number(number)
	{
		if(!number.match(/^[\+0-9]+$/))
			return false;
		return true;
	}
	function is_double(number)
	{
		if(!number.match(/^[0-9]*\.?[0-9]*$/))
			return false;
		return true;
	}
// End of is_unsign_number Function
	
//  this function checks the given string is alphanumeric word or not
//  and return true or false accordingly.
	function is_alpha_numeric(str)
	{
		if(!str.match(/^[A-Za-z0-9 ]+$/))
			return false;
		return true;
	}
// End of is_alpha_numeric Function

//  this function checks the given string is empty or not
//  and return true or false accordingly.
	function is_empty(str)
	{
  		 str=trim(str);
		 if ((str.length==0)||(str==null))
			return true;
		 return false;
	}
// End of is_empty Function
	
	
	function is_date(d)
	{
		if(d.search(/^(\d){1,2}[-\/\\](\d){1,2}[-\/\\]\d{4}$/)!=0)
			return -1;//Bad Date Format
		var T = d.split(/[-\/]/);
		var M = T[0];
		var D = T[1];
		var	Y = T[2];
		return D>0 && (D<=[,31,28,31,30,31,30,31,31,30,31,30,31][M] ||	D==29 && Y%4==0 && (Y%100!=0 || Y%400==0) ) 
	}

