function toggleCategory(id, sender)
{
    var tmp_oCategory = document.getElementById(id);
    var tmp_bHide = tmp_oCategory.style.display != "none";
    tmp_oCategory.style.display = (tmp_bHide ? "none" : "");
    
    sender.className = (tmp_bHide ? "QCursusAanbodExpand" : "QCursusAanbodCollapse");
    
    return false;
}

function initializePage()
{
    try {document.execCommand("BackgroundImageCache",false,true); }
    catch (e) { }
}


$(function () {

    $(window).load(function () {
        //Enable Cue texts in browsers that do not support Cue texts
        if (typeof (m_bEditMode) == "undefined") {
            if (!('placeholder' in document.createElement('input'))) {
                $("input[type='text'][placeholder]").each(function () {
                    var tmp_oInput = $(this);
                    tmp_oInput
                .before($("<span></span>")
                    .addClass("PlaceHolder")
                    .text(tmp_oInput.attr("placeholder"))
                    .css({
                        "font-family": tmp_oInput.css("font-family"),
                        "font-size": tmp_oInput.css("font-size"),
                        "height": tmp_oInput.outerHeight() + "px",
                        "width": tmp_oInput.outerWidth() + "px",
                        "line-height": tmp_oInput.height() + "px"
                    })
                    .click(function () { tmp_oInput.focus(); })
                    .hide()
                    )
                .focus(function () { if (!tmp_oInput.val() && tmp_oInput.prev().is(".PlaceHolder")) tmp_oInput.prev().hide(); })
                .blur(function () { if (!tmp_oInput.val() && tmp_oInput.prev().is(".PlaceHolder")) tmp_oInput.prev().show(); })
                .blur();
                });
            }
        }
    });
});
