hs.graphicsDir = '-images/';

hs.outlineType = 'drop-shadow';



loading=0;

function get_module_data()

{

	$.post('admin/browse', {module:'news', entity:'category', page:'1'},

	function (data)

	{

		eval("rc="+data);

		result = "<table border='1'>";

		for(i=0;i<rc["count"];i++)

		{

			result = result + "<tr><td>"+rc[i]['title']+"</td><td>"+rc[i]['text']+"</td><td>"+rc[i]['date']+"</td></tr>";

		}

		result = result + "</table>";

		$("#windowContent").html(result);

	}

	);

}





function get_content(id, page, div_id, cont)

{	

    if(loading==1){ return false; }

    loading = 1;

    $(div_id).fadeOut(200,

        function(){

            $('#preloader').fadeIn(100,

            function(){

                $.post("/mods/"+cont+"/show",

                        {

                            "ajax":"1",

                            "id" : id,

                            "p" : page

                        },

                        function (data)

                        {

                            $('#preloader').fadeOut(100,

                            function(){

                                    $(div_id).html(data);

                                    $(div_id).fadeIn(200, function(){ loading = 0; });

                            });

                            

                        }

                        );

            });

            

        });

    return false;

}

function toggle_article(id)
{
	 if(loading==1){ return false; }

    loading = 1;
    $("#article_dec_"+id).slideToggle(300,function(){
    				$("#article_"+id).slideToggle(500,function(){ loading=0; });
   													});
    
	return false;
}