function splash_window( href, width, height, window_name )
{
    var left = ( screen.width  - width ) / 2;
    var top  = ( screen.height - height ) / 2;
	if( window_name == null ){
		window_name = href;
	}
    var params = "width=" + width + ",height=" + height + ",menubar=no,location=no,resizable=yes,scrollbars=yes,status=no,left=" + left + ",top=" + top;
    var win = window.open( href, window_name, params );
    win.focus();
}

function splashStdWindow( href, width, height, window_name )
{
    var params = "width=" + width + ",height=" + height + ",menubar=yes,location=yes,resizable=yes,scrollbars=yes";
    var win = window.open( href, window_name, params );
    win.focus();
}

function toggle(elm)
{
    if( $(elm).is(':visible') ){
        $(elm).hide(100);
    } else {
        $(elm).show(100);
    }
}

function loadToCyrillicElm( elm, url, handler )
{
    $.ajax({
        url: url,
        contentType: "text/html; charset=utf-8",
        success: function (data)
        {
            $(elm).html( decodeURIComponent(data) );
            if( handler ) handler( data );
        }
    });
}