/* -------------------------------------------------------- */
/*                                                          */
/* Javascript source for HEP DART 2001 calendar and         */
/* general information rollovers.                           */
/*                                                          */
/* Author:                                                  */
/*                                                          */
/*   Michael T. Patterson                                   */
/*   Virginia-Highland Software, Inc.                       */
/*   http://www.va-hi.com                                   */
/*                                                          */
/* Version 1.0                                              */
/* July 2000                                                */
/*                                                          */
/* -------------------------------------------------------- */

// Define the required global variables for the "Calendar" navigation menu.

var calBase   = new Array();
var calButton = new Array();

// Pre-cache the "Calendar" menu images.
// ------------------------------------

function preloadCal() {

  if(document.images) { // Determine if the images object exists for the browser in use.

    var i,j,k = 0;
    var fileName;

    var preLoad = new Array();

    calBase[0] = "Images/Cal/off-";
    calBase[1] = "Images/Cal/on-";
    
    calButton[0] = "sunday";
    calButton[1] = "monday";
    calButton[2] = "tuesday";
    calButton[3] = "wednesday";
    calButton[4] = "thursday";
  
    for (i=0; i<calBase.length; i++) {
    for (j=0; j<calButton.length; j++) {
      fileName = calBase[i] + calButton[j] + ".gif";
      if (fileName.indexOf("#") !=0 ) {
        preLoad[k] = new Image();
        preLoad[k++].src=fileName;
      }
    } // End j-loop.
    } // End i-loop.
  }   // End if-document.images.
}     // End of function.

// Rollover scripts.
// ----------------

function calOver(active,imgIn,onOff) {
  if(document.images) {
    document[active + imgIn].src = calBase[onOff] + imgIn + ".gif";
    window.status = '';
    return true;
  }
}

function calRestore(active,imgOut,onOff) {
  if(document.images) {
    document[active + imgOut].src = calBase[onOff] + imgOut + ".gif";
    window.status = window.defaultStatus;
    return true;
  }
}
// Define the required global variables for the "General Information" navigation menu.

var genBase   = new Array();
var genButton = new Array();

// -----------------------------------------------
// Pre-cache the "general information" menu images.
// -----------------------------------------------

function preloadGen() {

  if(document.images) { // Determine if the images object exists for the browser in use.

    var i,j,k = 0;
    var fileName;

    var preLoad = new Array();

    genBase[0] = "Images/General/off-";
    genBase[1] = "Images/General/on-";
    
    genButton[0] = "overview";
    genButton[1] = "cme";
    genButton[2] = "venue";
    genButton[3] = "registration";
  
    for (i=0; i<genBase.length; i++) {
    for (j=0; j<genButton.length; j++) {
      fileName = genBase[i] + genButton[j] + ".gif";
      if (fileName.indexOf("#") !=0 ) {
        preLoad[k] = new Image();
        preLoad[k++].src=fileName;
      }
    } // End j-loop.
    } // End i-loop.
  }   // End if-document.images.
}     // End of function.

// Rollover scripts.
// ----------------

function genOver(active,imgIn,onOff) {
  if(document.images) {
    document[active + imgIn].src = genBase[onOff] + imgIn + ".gif";
    window.status = '';
    return true;
  }
}

function genRestore(active,imgOut,onOff) {
  if(document.images) {
    document[active + imgOut].src = genBase[onOff] + imgOut + ".gif";
    window.status = window.defaultStatus;
    return true;
  }
}

