function reload_captcha () {
	var rndval = new Date().getTime(); 
	document.getElementById('captcha_image').innerHTML = "<img src='/antibot.gif?rnd=" + rndval + "' align='absmiddle' />";
}

function check_name(what, layer){
	var requestFile = "/ajax/users_check_reg/";
	if (what == 'name') {
		$.get(
			requestFile,
			{ "mod": what, "username": document.regist.name.value },
			function(ret) { $("#"+layer).html(ret); }
		);
	}
	if (what == 'login') {
		$.get(
			requestFile,
			{ "mod": what, "userlogin": document.regist.login.value },
			function(ret) { $("#"+layer).html(ret); }
		);
	}
	if (what == 'email') {
		$.get(
			requestFile,
			{ "mod": what, "usermail": document.regist.email.value },
			function(ret) { $("#"+layer).html(ret); }
		);
	}
}

var com_box_id = 'def_comments';
function ch_com( new_id )
{
	var com_box = document.getElementById( com_box_id ).innerHTML;
	document.getElementById( com_box_id ).innerHTML = '';
	document.getElementById( new_id ).innerHTML = com_box;
	document.getElementById( 'after_id' ).value = new_id;
	com_box_id = new_id;
}

var cur_art_id = 0;
function art_plus( art_id )
{
	cur_art_id = art_id;
	$.post(
		'/ajax/art_vote/',
		{ act: 'plus', id: art_id },
		art_ch
	);
}
function art_minus( art_id )
{
	cur_art_id = art_id;
	$.post(
		'/ajax/art_vote/',
		{ act: 'minus', id: art_id },
		art_ch
	);
}
function art_ch(data)
{
	if(data)
		document.getElementById( 'art_' + cur_art_id ).innerHTML = data;
}

function com_plus()
{
}

function com_minus()
{
}
