function showCoverPropNew(cat,id)
{
	var url='/discs/?cat='+cat+'&cover='+id;
	window.location=url;
}

function showCoverPropNewB(cat,id)
{
	var url='/books/?cat='+cat+'&cover='+id;
	window.location=url;
}

function showCoverPropNewL(cat,id)
{
	var url='/museum/?cat='+cat+'&cover='+id;
	window.location=url;
}

function showCoverProp(factory, land,descr,year,name) {
    $('#cover_factory').replaceWith('<span id="cover_factory">'+factory+'</span>');
    $('#cover_land').replaceWith('<span id="cover_land">'+land+'</span>');
    $('#cover_descr').replaceWith('<span id="cover_descr">'+descr+'</span>');
    $('#cover_year').replaceWith('<span id="cover_year">'+year+'</span>');
    $('#mCover').attr('src','/images/discs/top/thmb/'+name);
}

function otherCoversShow(id) {
    id2 = newWindow_2('', 800, 400);
    $('#'+id2+'_content').html('<div style="float:left;width: 100%;height: 100%;overflow: auto;">'+$('#otherCovers_'+id).html()+'</div>');
}

function ShowAllCovers()
{
    id2 = newWindow_2('', 1000, 500);
    $('#'+id2+'_content').html('<div style="float:left;width: 100%;height: 100%;overflow: auto;">'+$('#AllCovers').html()+'</div>');
}

function newWindowShow(objid, width, height) {
    if(width === undefined) width = 800;
    if(height === undefined) height = 400;
    id2 = newWindow_2('', width, height);
    $('#'+id2+'_content').html('<div style="float:left;width: 100%;height: 100%;overflow: auto;">'+$(objid).html()+'</div>');
}

function delPict(id, tab) {
    $("#del_"+id).click(function(event){
        $.post('/encyclopaedia/functions/', {
            idel: id,
            tab: tab
        }, function(){
            /*$('#phg_'+tab).html(msg);*/
            $("#pict_"+id).html('');
        });
        event.preventDefault();
    });
}

function editPict(id, tab) {
    $("#edit_"+id).click(function(event){
        $('.actions').hide();
        $.post('/encyclopaedia/functions/', {
            picedit: id
        }, function(msg) {
            $(document).append(msg);
            $('.actions').show();
        });
        event.preventDefault();
    });
}