﻿// JScript File

function Handleiding()
{
    var pnl = document.all ? document.all["PanelTitle"] : document.getElementById("PanelTitle");
    pnl.innerHTML = 'Handleiding';
    
    parent.window.frames[1].location.href = 'ViewHandleidingPdf.aspx';
}

function Instellingen()
{
    parent.window.frames[1].location.href = 'Main/Instellingen.aspx';
}

function Users()
{
    parent.window.frames[1].location.href = 'Beheer/Beheerusers.aspx';
}

function Mailtemplate()
{
    parent.window.frames[1].location.href = 'Beheer/Mailtemplate.aspx';
}

function Afmelden()
{
    if( confirm('Weet u zeker dat u wilt afmelden?') )
    {
        parent.document.location.href = 'Afmelden.aspx';
    }
}


function Afmelden2()
{
    Modals.Confirm("idConfirm1",
                "Afmelden",
                "<div style='padding: 25px;'>Weet u zeker dat u wilt afmelden?</div>", {
                    yesButtonText: "Ja",
                    noButtonText: "Nee",
                    onYes: "AfmeldenYes()"
                }
            );
}

function AfmeldenYes()
{
    parent.document.location.href = 'Afmelden.aspx';
}



function Debiteuren()
{
    parent.window.frames[1].location.href = 'Main/Debiteuren.aspx';
}

function Bestuurders()
{
    parent.window.frames[1].location.href = 'Main/Bestuurders.aspx';
}


function Maximize() 
{
    top.window.moveTo(0,0); 
    if (document.all) 
    { 
        top.window.resizeTo(screen.availWidth,screen.availHeight); } 
    else if (document.layers || document.getElementById) 
    { 
        if (top.window.outerHeight < screen.availHeight || top.window.outerWidth < screen.availWidth)
        { 
            top.window.outerHeight = top.screen.availHeight; 
            top.window.outerWidth = top.screen.availWidth; 
        } 
    } 
}

function pause(millisecondi)
{
    var now = new Date();
    var exitTime = now.getTime() + millisecondi;

    while(true)
    {
        now = new Date();
        if(now.getTime() > exitTime) return;
    }
}

//function getWindowHeight() {
//  var myWidth = 0, myHeight = 0;
//  if( typeof( window.innerWidth ) == 'number' ) {
//    //Non-IE
//    myWidth = window.innerWidth;
//    myHeight = window.innerHeight;
//  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
//    //IE 6+ in 'standards compliant mode'
//    myWidth = document.documentElement.clientWidth;
//    myHeight = document.documentElement.clientHeight;
//  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
//    //IE 4 compatible
//    myWidth = document.body.clientWidth;
//    myHeight = document.body.clientHeight;
//  }
//  //window.alert( 'Width = ' + myWidth );
//  //window.alert( 'Height = ' + myHeight );
//  return myHeight;
//}
//        
//        
//function getWindowWidth() {
//  var myWidth = 0, myHeight = 0;
//  if( typeof( window.innerWidth ) == 'number' ) {
//    //Non-IE
//    myWidth = window.innerWidth;
//    myHeight = window.innerHeight;
//  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
//    //IE 6+ in 'standards compliant mode'
//    myWidth = document.documentElement.clientWidth;
//    myHeight = document.documentElement.clientHeight;
//  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
//    //IE 4 compatible
//    myWidth = document.body.clientWidth;
//    myHeight = document.body.clientHeight;
//  }
//  //window.alert( 'Width = ' + myWidth );
//  //window.alert( 'Height = ' + myHeight );
//  return myWidth;
//}







