﻿///////////////////////////////////////////////////////////////////////
// Study:        N/A
// Protocol:     N/A
//
// Program:      $Archive: $
// Programmer:   M. Dupre
// Date:         8/27/07
// Version:      $Revision: $
//
// Purpose:      Centralized location for JavaScript used by 
//               MasterPage.master to house javascript used 
//               for manipulating the layout.
//
//        Modification History
// ---------------------------------------------------------------------
//
//  $Log: $
//  $NoKeywords: $
///////////////////////////////////////////////////////////////////////
// JScript File
/* SET PAGE SCOPE VARS */
var masterPageVar_oNavBox;
var masterPageVar_oNavBoxControl;
var masterPageVar_oMPNavSub2Open;
var masterPageVar_oMPNavSub2Close;
var masterPageVar_oMPClientIdPrefix;

/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  */
function initializeMPNavSub2JS()
{
    masterPageVar_oMPClientIdPrefix = document.getElementById("MPClientIdPrefix")
    
    if(document.getElementById("MPNavSub2Container"))
    {
        masterPageVar_oNavBox = document.getElementById("MPNavSub2Container");
        masterPageVar_oNavBoxControl = document.getElementById("MPNavSub2ContainerController");               
        masterPageVar_oMPNavSub2Open = document.getElementById(masterPageVar_oMPClientIdPrefix.value + "MPNavSub2Open");
        masterPageVar_oMPNavSub2Close = document.getElementById(masterPageVar_oMPClientIdPrefix.value + "MPNavSub2Close");
        setArrowsMPNavSub2JS();
    }
}

function runMPNavSub2ContainerControllerJS()
{           
    if(masterPageVar_oNavBox.style.display == 'block')
    {
      masterPageVar_oNavBox.style.display = 'none'
    }
    else
    {
      masterPageVar_oNavBox.style.display = 'block' // we do this here so we can watch it grow
    }
    
    setArrowsMPNavSub2JS();
}

function setArrowsMPNavSub2JS()
{
    if(masterPageVar_oNavBox.style.display == 'block')
    {
      masterPageVar_oMPNavSub2Close.className = 'MPNavSub2Hide'
      masterPageVar_oMPNavSub2Open.className = 'MPNavSub2Show'             
      masterPageVar_oNavBoxControl.title = "Hide menu"
    }
    else
    {
      masterPageVar_oMPNavSub2Open.className = 'MPNavSub2Hide'
      masterPageVar_oMPNavSub2Close.className = 'MPNavSub2Show'
      masterPageVar_oNavBoxControl.title = "Show menu"
    }
}

//Needed to notify script manager that script is loaded so that async calls can utilize this include
if (typeof (Sys) !== 'undefined') Sys.Application.notifyScriptLoaded(); 
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  */