var PasswordPlaceholder = {

    password : null,
    text : '<input type="text" id="_placeholderPass" name="_placeholderPass" value="Zadejte heslo" style="text-align:center;color:#727272;" />',

    replacePass : function(td){
        td.html(PasswordPlaceholder.text);
    },

    replaceText : function(td){
        td.html(PasswordPlaceholder.password);
        td.children().focus();
        td.children().focus();
    },

    bindReplaceText : function(td, action, elem){
        $(elem).bind(action, function(){PasswordPlaceholder.replaceText(td);});
    }
}


$(document).ready(function(){
    var td = $('#pass').parent();

    PasswordPlaceholder.password = td.html();
    PasswordPlaceholder.replacePass(td);
    PasswordPlaceholder.bindReplaceText(td, 'focus', '#_placeholderPass');

});

function checkAll (where, query)
{
    var list = $(where);
    $(query, list).attr('checked', true);
                        
    return false;
}

function uncheckAll(where, query)
{
    var list = $(where);
    $(query, list).attr('checked', false);

    return false;
}

function Print(block_id, url)
{
    var block = $('#'+ block_id);

    var checkboxes = $('*:checkbox:checked', block);

    if (checkboxes.length == 0)
    {
        return false;
    }

    var params = new Array();
    for (var i = 0; i<checkboxes.length; i++)
    {
        params.push($(checkboxes[i]).val());
    }

    var newWindow = window.open(url+ '/?items='+ params, 'print');

    return true;
}

