function checkfields_order() {

	surname = document.orderForm.surname.value;
	name = document.orderForm.name.value;
	patronymic = document.orderForm.patronymic.value;

	firmtitle = document.orderForm.firmtitle.value;
	branch = document.orderForm.branch.value;
	specialization = document.orderForm.specialization.value;
	position = document.orderForm.position.value;
	email = document.orderForm.email.value;

	index = document.orderForm.index.value;
	country = document.orderForm.country.value;
	city = document.orderForm.city.value;
	address = document.orderForm.address.value;
	phone = document.orderForm.phone.value;
	
	if (surname!="" && name!="" && patronymic!="" && firmtitle!="" && branch!="none" && specialization!="" && 
		position!="" && email!="" && index!="" && country!="none" && city!="" && address!="" && phone!="") {
		return true;
	}
	else {
		alert('Заполните корректно форму подачи заявки!');
		return false;
	}

}

function checkfields_feedback() {
	name = document.feedbackForm.name.value;
	email = document.feedbackForm.email.value;
	text = document.feedbackForm.text.value;
	entrance = document.feedbackForm.entrance.value;
	number = document.feedbackForm.number.value;
	
	if (number=="" || entrance=="" || entrance!=number) {
		alert('Код введен неверно! Повторите ввод');
		document.location.replace('/about-feedback.php?name='+name+'&email='+email+'&text='+text+'&number='+number);		
		return false;
	}	
	if (name!="" && email!="" && text!="") {
		return true;
	}
	else {
		alert('Заполните корректно форму обратной связи!');
		return false;
	}
	
}

function checkfields_question() {
	name = document.questionForm.name.value;
	firmtitle = document.questionForm.firmtitle.value;
	berth = document.questionForm.berth.value;
	email = document.questionForm.email.value;
	question = document.questionForm.question.value;
	entrance = document.questionForm.entrance.value;
	number = document.questionForm.number.value;	

	if (number=="" || entrance=="" || entrance!=number) {
		alert('Код введен неверно! Повторите ввод');
		document.location.replace('/question-answer.php?number='+number+'&name='+name+'&firmtitle='+firmtitle+'&berth='+berth+'&email='+email+'&question='+question);		
		return false;
	}
	
	if (name!="" && firmtitle!="" && berth!="" && email!="" && question!="") {
		return true;
	}
	else {
		alert('Заполните корректно все поля формы!');
		return false;
	}
	
}