
/*
 * Показать всплывающее окно
 */
var show_pop_stat = 0;
function showPopup(el){
    el = '#'+el;
    if(show_pop_stat == 0){
        $(el).show('fast');
        show_pop_stat = 1;
    }
    else{
        $(el).hide('fast');
        show_pop_stat = 0;
    }
}

/*
 * Сделать всплывающее окно сверху со статусом
 */
function popupStatus(msg){
    var html = "<div style='position:absolute; z-index: 10000; top:0px; width: 100%; background:#fff;'>"+msg+"</div>";
    
    $('body').append(html);
}

/*
 * Функция печати
 */
var printStat = 1;
function printPage(){
    
    if(printStat){
        $("#header").hide('fast');
        $("#leftcol").hide('fast');
        $("#footer").hide('fast');
        
        $("#printHeader").show('fast');
        printStat = 0;
    }
    else{
        $("#header").show('fast');
        $("#leftcol").show('fast');
        $("#footer").show('fast');
        
        $("#printHeader").hide('fast');
        printStat = 1;
    }
    
}

// Проверка, на печать ли страница
$(document).ready(function(){
    var path = window.location.hash.split('#')[1];
    
    if(path == 'print'){
        printPage();
    }
    
});
