﻿// JScript File

function Max7000(TargetObject)
{
    LenString = TargetObject.value.length;
    if (LenString > 7000)
    {
        TargetObject.value = TargetObject.value.substring(0,7000);
    }
}
    
function Instellingen()
{
    parent.document.frames[1].location.href = 'Main/Instellingen.aspx';
}

function Afmelden()
{
    parent.document.location.href = 'Afmelden.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;
}


