﻿var preference_sysids = [];
// ------------------------------------------------ //
hide_quick_menus = function(){
    $('quick_menu_user', 'quick_menu_preferences').invoke('hide'); 
};
// ------------------------------------------------ //
resize_canvas = function(){
    //summary: function is called onload and onresize to ensure OakDocs uses entire browser window.
    var myWidth = 0, myHeight = 0;
    if( typeof( window.innerWidth ) == 'number' ) {
        myWidth = window.innerWidth; myHeight = window.innerHeight;
    } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
        myWidth = document.documentElement.clientWidth; myHeight = document.documentElement.clientHeight;
    } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
        myWidth = document.body.clientWidth; myHeight = document.body.clientHeight;
    }   
    if(document.getElementById(ext_prefix + 'CONTENT_AREA')){
       document.getElementById(ext_prefix + 'CONTENT_AREA').height = myHeight - 50;
    }
};
// ------------------------------------------------ //
toggle_nav = function(value){
    //summary: show/hide the primary vertical navigation.
    if(value==1){
        $(app_prefix + 'PANEL_PAGE_NAVIGATION').invoke('show'); 
        $(app_prefix + 'PANEL_PAGE_CONTENT').style.width = '79%';
    } else {
        $(app_prefix + 'PANEL_PAGE_NAVIGATION').invoke('hide'); 
        $(app_prefix + 'PANEL_PAGE_CONTENT').style.width = '100%';
    }
};
// ------------------------------------------------ //
screen_full = function(){
    $('ctl00_PANEL_PAGE_HEADER', 'ctl00_PANEL_PAGE_NAVIGATION').invoke('hide'); 
    $('screen_size').show();
};
// ------------------------------------------------ //
screen_standard = function(){
    $('ctl00_PANEL_PAGE_HEADER', 'ctl00_PANEL_PAGE_NAVIGATION').invoke('show');  
    $('screen_size').hide();
};
// ------------------------------------------------ //
toggle_tool_tips = function(){
    //summary: tool tips are only shown if ws_over = 1.
    //ws_over = (ws_over == 0) ? 1 : 0;
    var display_tooltip = $('ctl00_display_tooltip');
    if(display_tooltip.checked === true){
       ws_over = 1;
    } else {
       ws_over = 0;
    }
};
// ------------------------------------------------ //
    //summary: list of functions called from onXXXXX events.
    //window_onload(resize_canvas);
    //window.onresize = resize_canvas;
// ------------------------------------------------ //

