// #################################### Declared Variables
// ##

  var thispage;    // Navigation variables
  var prompttext;  // Prompt variable
  var isTT;        // The TT flag, if set to "0" enables the "Back to Doc" links on the SB
  
// ##
// ################################################################## Functions
// ##   Function      : printIt()
// ##   Parameters in : None
// ##   Parameters out: None
// ##   Return value  : None
// ##   Description   : Sends the content of the bodyframe (right frame) to the printer
// #########################################################################
function printIt() {
 if(window.print)    
 { top.bodyframe.focus(); print(); }
 else   
 { alert("This feature is only supported in IE 5.0 or greater. To print this page, right click anywhere on the window and select Print from the pop-up menu."); }
}

// ##
// #########################################################################
// ##   Function      : openWindow(which,w,h)
// ##   Parameters in : which = name of the button being created
// ##                   w = new window width
// ##                   h = new window height
// ##   Parameters out: None 
// ##   Return value  : None
// ##   Description   : Opens sized browser and loads the specified "which" URL.
// #########################################################################
// ##
function openWindow(which,w,h) {
  var NS4 = document.layers;
  var IE4 = document.all;
  var new_window_height = h;  // height of new window
  var new_window_width = w;   // width of new window
  var new_window_top = 2;     // top location of new window
  var new_window_left = 2;    // left location of new window
  var the_window_height = 0;
  var the_window_width = 0;
  var screen_height = 0;
  var screen_width = 0;
  var the_url = "new1.htm";
  var name = "new1";
  var border_width = (NS4) ? 12 : 10;
  var border_height = (NS4) ? 12 : 28;

  screen_height = getScreenHeight();
  screen_width = getScreenWidth();

  new_window_top = ((screen_height / 2) - (new_window_height / 2) - (border_height / 2));
  new_window_left = ((screen_width / 2) - (new_window_width / 2) - (border_width / 2));
 
  popupWin = window.open(which, 'formwindow', "scrollbars,resizable=yes,width=" + w + ",height=" + h + ",screenX=" + new_window_left + ",screenY=" + new_window_top + ",left=" + new_window_left + ",top=" + new_window_top);
}

function getScreenHeight() {
   return screen.availHeight;
}
 
function getScreenWidth() {
   return screen.availWidth;
}

// ##
// ######################################################################### Functions
// ##   Function      :	pageloaded()
// ##   Parameters in :	None
// ##   Parameters out:	None 
// ##   Return value  :	None
// ##   Description   : Triggers the "loadIt()" timer to control
// ## 			the update_storyboards() function
// #########################################################################
// ##
function pageloaded()
{
  loadIt();
}

// ##
// #########################################################################
// ##   Function      :	loadIt()
// ##   Parameters in : None
// ##   Parameters out: None 
// ##   Return value  : None
// ##   Description   : Along with "loadIt_Wait()" function, a timer that verifies the frameset
// ##			is drawn before attempting to write to the storyboard div tags
// #########################################################################
function loadIt()
{
  timerId = setInterval("loadIt_Wait()",70);
}

function loadIt_Wait()
{
  var z = eval("top.rightsbframe.div_right_sb;");
  if(z) {
    clearInterval(timerId);
    update_storyboards();
  }
}

// ##
// #########################################################################


