function submit_login(frm)
{
//	var frm = document.getElemantById("login_box");
	if(!form_check(frm, "username::Логин::any::req::255;;password::Пароль::any::req::255;;", 'ru')) {
		alert(form_check_msg(",\n"), true);
		form_check_getfield(0).focus();
		return false;
	}
	return true;
}
function submit_subscription(frm)
{
//	var frm = document.getElemantById("login_box");\
	if(!form_check(frm, "email::E-mail::any::req::255;;subscription_type::Тип подписки::any::req::5;;", 'ru')) {
		alert(form_check_msg(",\n"), true);
		form_check_getfield(0).focus();
		return false;
	}
	return true;
}


function SendPoll()
{
	var poll,N=0;
	for(var i=1;i<=6;i++){
		poll = document.getElementById("poll_"+i);
		if(poll==null) continue;
		if(poll.checked){
			N=i;
			break;
		}
	}
	if(N==0){
		alert("Выбирите вариант ответа");
	}else{
		if(servicePoll_ajax==null)
		servicePoll_ajax =new carservice(servicePollCallback);
		var poll_id = document.getElementById("poll_id");
		servicePoll_ajax.voitpoll(poll_id.value,N);
	}
	
	return false;
}
function ShowVoitPoll(result){
	var poll =document.getElementById("poll");
	poll.innerHTML = result;
}

var servicePollCallback = {
    // after a review we get a chunk of html that we can update the reviewList with
	    voitpoll: function(result) {
			ShowVoitPoll(result);
	    }
}
var servicePoll_ajax    ;//= new CarService(serviceCarCallback);

