function validinquery(){
	var projname=document.frminquery.project_name;
	if(projname.value==""){
		alert("Please enter the Project name");
		projname.focus();
		return false;
	}
	else{
		if(projname.value.indexOf(" ") == 0){
			alert("First Character should not be space for site address");
			projname.focus();
			return false;
		}
				
	}

	if((!document.getElementById('proj_rb').checked)&&(!document.getElementById('proj_rb1').checked)) {
		alert("Please select Type of Project");
		document.getElementById('proj_rb').focus();
		return false;
	}

	if(document.getElementById('proj_rb').checked){
		var city=document.frminquery.city;		
		if(city.value==""){
			alert("Please enter the city");
			city.focus();
			return false;
		}
		else{
			if(/[^A-Za-z]+\s/.test(city.value)){
				alert("Please enter the alphabet character for fullname");
				city.focus();
				return false;
			}
			else if(city.value.indexOf(" ") == 0){
				alert("First Character should not be space for fullname");
				city.focus();
				return false;
			}
			
		}
		//check current state of construction
		var check1=document.getElementById('curr_state_rb');
		var check2=document.getElementById('curr_state_rb1');
		var check3=document.getElementById('curr_state_rb2');
		var check4=document.getElementById('curr_state_rb3');
		if(check1.checked || check2.checked ||check3.checked || check4.checked){
			//do nothing
		}
		else{
			alert("Please select any one current state of construction");
			check1.focus();
			return false;
		}
	}
//check Existing/Remodel		
		if(document.getElementById('proj_rb1').checked){
			var addr=document.frminquery.site_addr;
			var city1=document.frminquery.site_city;
			var state=document.frminquery.site_state;
			
			if(addr.value==""){
				alert("Please enter the site address");
				addr.focus();
				return false;
			}
			else{
				if(addr.value.indexOf(" ") == 0){
					alert("First Character should not be space for site address");
					addr.focus();
					return false;
				}
				
			}
			
			if(city1.value==""){
				alert("Please enter the site city");
				city1.focus();
				return false;
			}
			else{
				if(/[^A-Za-z]+\s/.test(city1.value)){
					alert("Please enter the alphabet character for site city");
					city1.focus();
					return false;
				}
				else if(city1.value.indexOf(" ") == 0){
					alert("First Character should not be space for site city");
					city1.focus();
					return false;
				}
				
			}

			if(state.value==""){
				alert("Please enter the site state");
				state.focus();
				return false;
			}
			else{
				if(/[^A-Za-z]+\s/.test(state.value)){
					alert("Please enter the alphabet character for site state");
					state.focus();
					return false;
				}
				else if(state.value.indexOf(" ") == 0){
					alert("First Character should not be space for site state");
					state.focus();
					return false;
				}
				
			}
		}//endif

//check product and service
		var cbox1=document.getElementById('prod_cb1');
		var cbox2=document.getElementById('prod_cb2');
		var cbox3=document.getElementById('prod_cb3');
		var cbox4=document.getElementById('prod_cb4');
		if(cbox1.checked || cbox2.checked ||cbox3.checked || cbox4.checked){
			//do nothing
		}
		else{
			alert("Please select any one product/service");
			cbox1.focus();
			return false;
		}

	if(!document.getElementById('iagree').checked){
		alert("Please select the I agree checkbox");
		document.getElementById('iagree').focus();
		return false;
	}
}// end function



