function show__btn_request__on_annotationPage () {
	if ($('View1_p_child')) {
		$('btn_request_ware').style.display='';
	}
}

function show__callmeForm__on_annotationPage () {
	if (!$('View1_p_child')) {
		$('callme_form').style.marginTop='80px';
	}
}

function getWareName(){return $('ware_name').innerHTML;}

function show__question_form () {$('question_form').style.display=''; set1Field__question_form();}
function hide__question_form () {$('question_form').style.display='none';}

function clearFieds__question_form(){
	$('your_name').value='';
	$('your_city').value='';
	$('your_tel').value='';
	$('your_email').value='';
	$('your_question').value='';
}

function set1Field__question_form (){$('your_name').focus();}

function chk_question_form() {
	var res=false;
	if ($('your_name').value=='') return false;
	if ($('your_city').value=='') return false;
	if ($('your_question').value=='') return false;
	if (($('your_tel').value=='')&&($('your_email').value=='')) return false;
	return true;
}

function messageError01__question_form () {
	alert ('Поля отмеченные красной звездочкой обязательный для заполнения.\nТакже: или телефон или Email должны быть заполнены.');
}


function send_message_question_form (){
	var your_name = escape2($('your_name').value);
	var your_city = escape2($('your_city').value);
	var your_email = escape2($('your_email').value);
	var your_tel = escape2($('your_tel').value);
	var message = escape2($('your_question').value);
	var ware_name = escape2(getWareName());
	var url = escape2 (window.location.href);

	if (!jxs.x2) jxs.x2 = new jx();
	jxs.x2.jx.bind ({
		"url":	"/ajax/respondents/sendQuestion.php?your_name="+your_name+"&your_city="+your_city+"&your_email="+your_email+"&your_tel="+your_tel+"&message="+message+"&ware_name="+ware_name+"&url="+url,
		"onSuccess":	function(a){
			$('process_loadind').style.display='none';
			if (a=='OK') alert ('Ваше вопрос успешно отправлен. Спасибо!');
			clearFieds__question_form ();
			overlayer.hide();
			hide__question_form ();
		},
		"fomat":	"text",
		"method":	"post",
		"onError":	function (status) {
			$('process_loadind').style.display='none';
			alert ("\"Ашипка\": "+status);
			overlayer.hide();
		}
	});
	overlayer.show();
	$('process_loadind').style.display='';
}



function chk_callme_form() {
	var res=false;
	if (($('callme_phone').value=='')||($('callme_phone').value=='номер телефона')) return false;
	if ($('callme_fio').value=='') return false;
	return true;
}

function show__callme_form () {$('callme_form').style.display='';}

function messageError01__callme_form () {
	alert ('Поля отмеченные красной звездочкой обязательны для заполнения.');
}


function send_message_callme_form (){
	var callme_phone = escape2($('callme_phone').value);
	var callme_fio = escape2($('callme_fio').value);
	var ware_name = escape2(getWareName());
	var url = escape2 (window.location.href);

	if (!jxs.x2) jxs.x2 = new jx();
	jxs.x2.jx.bind ({
		"url":	"/ajax/respondents/sendCallme.php?callme_phone="+callme_phone+"&callme_fio="+callme_fio+"&ware_name="+ware_name+"&url="+url,
		"onSuccess":	function(a){
			$('process_loadind').style.display='none';
			if (a=='OK') alert ('Ваш запрос на звонок успешно отправлен. Спасибо!');
			clearFieds__callme_form ();
			overlayer.hide();
			hide__question_form ();
		},
		"fomat":	"text",
		"method":	"post",
		"onError":	function (status) {
			$('process_loadind').style.display='none';
			alert ("\"Ашипка\": "+status);
			overlayer.hide();
		}
	});
	overlayer.show();
	$('process_loadind').style.display='';
}

function clearFieds__callme_form(){
	$('callme_phone').value='номер телефона';
	$('callme_fio').value='';
}




function ClickOnCallme_form (){
	var ware_name = escape2(getWareName());
	var url = escape2 (window.location.href);

	if (!jxs.x2) jxs.x2 = new jx();
	jxs.x2.jx.bind ({
		"url":	"/ajax/respondents/sendClickOnCallme.php?ware_name="+ware_name+"&url="+url,
		"onSuccess":	function(a){},
		"fomat":	"text",
		"method":	"post",
		"onError":	function (status) {}
	});
}

