	function ordervalidate()
		{
			if(document.order.name1.value=="")
				{
					alert("Please enter client name !!!");
					document.order.name1.focus();
					return false;
				}
				
			if(document.order.email.value=="")
				{
					alert("Please enter email id !!!");
					document.order.email.focus();
					return false;
				}
			if (!checkemail1(document.order.email.value))
				{ 
						alert(document.order.email.value + " is not a valid email id !!!");
						document.order.email.focus();	 
						return false;	
				}
			if (document.order.contactno.value == "")
			  {
				alert("Please enter Contact No. !!!");
				document.order.contactno.focus();
				return (false);
			  }
			if(document.order.code.value=="")
				{
					alert("Please enter verification code !!!");
					document.order.code.focus();
					return false;
				}
		
		function checkemail1(emailadd)
			{	
			var result = false;
			var theStr = new String(emailadd);
			var index = theStr.indexOf("@");
				if (index > 0)
				{
					var pindex = theStr.indexOf(".",index);
					if ((pindex > index+1) && (theStr.length > pindex+2))
					result = true;
				}
				
			return result;
			}			
			
			  // only allow numbers to be entered
			 /* var checkOK = "0123456789";
			  var checkStr = document.order.contactno.value;
			  var allValid = true;
			  var allNum = "";
			  for (i = 0;  i < checkStr.length;  i++)
			  {
				ch = checkStr.charAt(i);
				for (j = 0;  j < checkOK.length;  j++)
				  if (ch == checkOK.charAt(j))
					break;
				if (j == checkOK.length)
				{
				  allValid = false;
				  break;
				}
				if (ch != ",")
				  allNum += ch;
			  }
			  if (!allValid)
			  {
				alert("Please enter only digit characters in the \"Contact Number\" field.");
				document.order.contactno.focus();
				return (false);
			  }	*/
		}
		
		var highlightcolor="#CCCCCC"
		
		var ns6=document.getElementById&&!document.all
		var previous=''
		var eventobj
		
		//Regular expression to highlight only form elements
		var intended=/INPUT|TEXTAREA|SELECT|OPTION/
		
		//Function to check whether element clicked is form element
		function checkel(which){
		if (which.style&&intended.test(which.tagName)){
		if (ns6&&eventobj.nodeType==3)
		eventobj=eventobj.parentNode.parentNode
		return true
		}
		else
		return false
		}
		
		//Function to highlight form element
		function highlight(e){
		eventobj=ns6? e.target : event.srcElement
		if (previous!=''){
		if (checkel(previous))
		previous.style.backgroundColor=''
		previous=eventobj
		if (checkel(eventobj))
		eventobj.style.backgroundColor=highlightcolor
		}
		else{
		if (checkel(eventobj))
		eventobj.style.backgroundColor=highlightcolor
		previous=eventobj
		}
}
