function OpenPopup(url,w,h)
{
	window.open(url, '', 'scrollbars=yes,resizable=yes,width='+w+',height='+h+',screenX=100,screenY=100');
	return(false);
}
function swap_ssl(c)
{
	var action=$('#login_form').attr('action');
	if (c>0) $('#login_form').attr('action',action.replace('http://', 'https://'));
	else $('#login_form').attr('action',action.replace('http://', 'https://'));
}
t=null;
function field_changed(id,val)
{
	window.clearTimeout(t);
	t=window.setTimeout('set_xajax_img("xajax_img_'+id+'");xajax_check_input("'+id+'","'+escape(val)+'")',800);
}
var xajaxRequestUri="/index.php";
var xajaxDebug=false;
var xajaxStatusMessages=false;
var xajaxWaitCursor=true;
var xajaxDefinedGet=0;
var xajaxDefinedPost=1;
var xajaxLoaded=false;
function xajax_check_input(){xajaxRequestUri='/index.php';return xajax.call("check_input", arguments, 1);}

function show_votes(def_id)
{
	$('#voted_up_'+def_id).hide();
	$('#voted_down_'+def_id).hide();
	$('#voted_'+def_id).hide();
	$('#votes_'+def_id).show();
}
function already_voted(def_id)
{
	$('#votes_'+def_id).hide();
	$('#voted_'+def_id).show();
	window.setTimeout('show_votes('+def_id+')', 1000);
}
function already_voted_up(def_id)
{
	$('#votes_'+def_id).hide();
	$('#voted_up_'+def_id).show();
	window.setTimeout('show_votes('+def_id+')', 1000);
}
function already_voted_down(def_id)
{
	$('#votes_'+def_id).hide();
	$('#voted_down_'+def_id).show();
	window.setTimeout('show_votes('+def_id+')', 1000);
}