function CheckInput(){

	if (!checkstring(document.theForm.brand_name ,"brand name")){
		document.theForm.brand_name.focus();
		return (false);
	}
	
	if (!radio_button_checker(document.theForm.franchise ,"Please Select the franchise")){
		return (false);
	}

	if ((document.theForm.country.value == "0") & (document.theForm.franchise[0].checked)){
		document.theForm.country.focus();
		alert("Please Select a country");
		return (false);
	}
	
	if (!checkstring(document.theForm.store_location ,"store location")){
		document.theForm.store_location.focus();
		return (false);
	}
	
	if (!isNumber(document.theForm.age_group_from ,1)){
		document.theForm.age_group_from.focus();
		return (false);
	}
	
	if (!isNumber(document.theForm.age_group_to ,1)){
		document.theForm.age_group_to.focus();
		return (false);
	}
	
	if(eval(document.theForm.age_group_to.value) <= eval(document.theForm.age_group_from.value)){
		alert("field \"to age\" has to be higher than group \"from age\"")	
		document.theForm.age_group_to.focus();
		return (false);
	}
	
	if (!radio_button_checker(document.theForm.price_points ,"Please Select the targeted price points")){
		return (false);
	}
	
	if (!radio_button_checker(document.theForm.sex ,"Please Select the targeted sex")){
		return (false);
	}
	
	if (!isNumber(document.theForm.space_min ,1)){
		document.theForm.space_min.focus();
		return (false);
	}
	
	if (!isNumber(document.theForm.space_max ,1)){
		document.theForm.space_max.focus();
		return (false);
	}
	
	if(eval(document.theForm.space_max.value)<=eval(document.theForm.space_min.value)){
		alert("\"Maximum space\" has to be higher than \"minumum space\"")	
		document.theForm.space_max.focus();
		return (false);
	}

	if (!checkstring(document.theForm.company_name ,"company name")){
		document.theForm.company_name.focus();
		return (false);
	}
	
	if (!checkstring(document.theForm.address ,"address")){
		document.theForm.address.focus();
		return (false);
	}
	
	if (!checkstring(document.theForm.telephone ,"telephone")){
		document.theForm.telephone.focus();
		return (false);
	}
	
	if (!checkstring(document.theForm.fax ,"fax")){
		document.theForm.fax.focus();
		return (false);
	}
	
	if (!checkstring(document.theForm.contact_person ,"contact person")){
		document.theForm.contact_person.focus();
		return (false);
	}
	
	if (!checkstring(document.theForm.designation ,"designation")){
		document.theForm.designation.focus();
		return (false);
	}
	
	if (!checkstring(document.theForm.mobile ,"mobile")){
		document.theForm.mobile.focus();
		return (false);
	}

	if (!isEmail(document.theForm.email)){
		document.theForm.email.focus();
		return (false);
	}
	return true;
}
