	function menuEffect() {
		$('.mainMenu li:has(ul) a').addClass("dash");
		$('.mainMenu li:has(ul) li a').removeClass("dash");
	    $('.mainMenu ul[className!="current"]').hide();
	    $('.mainMenu .cur').slideDown('fast');
	    $('.mainMenu a').click(function () {
	        cur = $(this).parent().attr('className') == "cur";
	        hc = $(this).next(":has(LI)").length == 1;
	        if (cur && hc) {
	            $(this).next().slideUp('fast');
	            $(this).parent().removeClass('cur');
	            return false;
	        }
	        if (!cur && hc) {
	            el = $('.mainMenu');
	            el.find('UL[className!="current"]').slideUp('fast');
	            el.removeClass('cur');
	            $(this).parent().addClass('cur');
	            $(this).next().slideDown('fast');
	            return false;
	        }
	    });
	}

	function ajaxVoteSendChecker(voteId, isMulty, div) {
		if (typeof(answerId) == 'string' && isMulty == true) {
		  var el = document.getElementById(answerId);
		  var a = el.getElementsByTagName('input');
		  var votes = new Array();
		  for (var i = 0; i < a.length; i ++) {
		    if (a[i].checked == true && a[i].name.indexOf('answer') != -1) {
		      answerId = a[i].value
		    }
		  }
		}
		/* Ответ */
		var answerId = $("form[name='vote" + voteId + "'] input[name='answer" + voteId + "']:checked").val();
		  
		if (!answerId) alert('Вы не сделали свой выбор. Пожалуйста, попробуйте ещё раз'); else {
		  $('#voteMainContainer'+voteId).html('');
		  da_ajaxVoteSend(voteId, answerId, div);
		}
	}
	
	function refreshImage() {
	  var id = $(":hidden[name='image_id_antispam']").val();
	  $("#imgAntispam").attr('src', '/antispam.php?id=' + id + '&i=' + Math.floor(Math.random()*100000));
	}
	
	function checkCommentForm() {
      var message = new Array();
      
	  var form = $("form[name='commentform']");
	  var name = $.trim(form.find(":text[name='name']").val());
	  if (name == "") message.push("Заполните пожалуйста поле 'Имя'");
	  var mensaje = $.trim(form.find("textarea[name='message']").val());
	  if (mensaje == "") message.push("Заполните пожалуйста поле 'Сообщение'");
	  var code = $.trim(form.find(":text[name='image_value_antispam']").val());
	  if (code == "") message.push("Заполните пожалуйста поле 'Подтверждение'");
	  if (message.length) alert(message.join("\n")); else form.submit();
	}