function OpenNamedPopup(url, name, width, height) {
        var top=Math.round((screen.height-height)/2);
        var left=Math.round((screen.width-width)/2);
        var wnd=this.open(url, name, "top="+top+",left="+left+",width="+width+",height="+height+",buttons=no,scrollbars=yes,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no");
        wnd.focus();
}

function OpenNamedRPopup(url, name, width, height) {
	var rnd = (Math.round((Math.random()*999)+1));
        var top=Math.round((screen.height-height)/2);
        var left=Math.round((screen.width-width)/2);
        this.open(url, name, "top="+top+",left="+left+",width="+width+",height="+height+",buttons=no,scrollbars=yes,location=no,menubar=no,resizable=yes,status=no,directories=no,toolbar=no");
//	wnd.focus();
}

function onButtonOver(id, css_prefix)
{
	document.getElementById(id + "_content").className = css_prefix +'_content_hover';
	document.getElementById(id + "_top_left").className = css_prefix +'_top_left_hover';
	document.getElementById(id + "_top_right").className = css_prefix +'_top_right_hover';
	if (document.getElementById(id + "_bottom_left"))
	{
		document.getElementById(id + "_bottom_left").className = css_prefix +'_bottom_left_hover';
		document.getElementById(id + "_bottom_right").className = css_prefix +'_bottom_right_hover';
	}
}

function onButtonOut(id, css_prefix)
{
	document.getElementById(id + "_content").className = css_prefix +'_content';
	document.getElementById(id + "_top_left").className = css_prefix +'_top_left';
	document.getElementById(id + "_top_right").className = css_prefix +'_top_right';
	if (document.getElementById(id + "_bottom_left"))
	{
		document.getElementById(id + "_bottom_left").className = css_prefix +'_bottom_left';
		document.getElementById(id + "_bottom_right").className = css_prefix +'_bottom_right';
	}
}

function isEnterPressed(e) {
	var code = 0;
	if (!e)
		var e = window.event;
	if (e.which)
		code = e.which;
	else if (e.keyCode)
		code = e.keyCode;

	if (code == 13) {
		return true;
	}
	return false;
}

function gebi(e) {
	return document.getElementById(e);
}