/**
 * Toggle help visibility
 * 
 * @param string Help box id to toggle visibility
 * @return void
 */
function toggleHelp($help_box_id)
{
    $help_box = document.getElementById($help_box_id);

    if ($help_box.className == 'help hide') {
        $help_box.className = 'help show';
    } else {
        $help_box.className = 'help hide';
    }
}

/**
 * Close a help box
 * 
 * @param string Help box id to close
 * @return void
 */
function closeHelp($help_box_id)
{
    $help_box = document.getElementById($help_box_id);
    $help_box.className = 'help hide';
}

/**
 * Open new window
 * 
 * @return void
 */
function NewWindow(mypage, myname, w, h, t, l, scroll) {
    var winl = (screen.width - w) / 2;
    var wint = (screen.height - h) / 2;
    winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
    win = window.open(mypage, myname, winprops)
    if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

// <a href="invoer.php" onclick="NewWindow(this.href,'Byelex','600','660','10','10','yes');return false;" target="_blank" class="directlink">Start de taxatie</a>

/**
 * Print current document
 * 
 * @return void
 */
function printdoc() {
    if (window.print) {
        window.print();
    } else {
        var WebBrowser = "<OBJECT ID='WebBrowser1' WIDTH=0 HEIGHT=0 " +
        "CLASSID='CLSID:8856F961-340A-11D0-A96B-00C04FD705A2'></OBJECT>";
        document.body.insertAdjacentHTML("beforeEnd", WebBrowser);
        WebBrowser1.ExecWB(6, 2);//Use a 1 vs. a 2 for a prompting dialog box
        WebBrowser1.outerHTML = "";
    }
}