<!--

////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
// FUNCTION(S) & VARIABLES TO HANDLE ROLLOVER BUTTONS FOR LEFT NAVIGATION

   // ----------------------------------------------------------------------------------------------
   // ----------------------------------------------------------------------------------------------
   // BREAK OUT OF FRAMES

   if( top.location != document.location ) {
      window.top.location.href = document.location.href;
   } // end if

   // ----------------------------------------------------------------------------------------------
   // ----------------------------------------------------------------------------------------------

   var rolloversOK = 0;

   // Check browser version being used...
   browserName = navigator.appName;
   browserVer = parseInt(navigator.appVersion);

   if (browserName == "Netscape" && browserVer >= 3)
      rolloversOK = 1;
   else if (browserName == "Microsoft Internet Explorer" && browserVer >= 4)
      rolloversOK = 1;

   // Create image objects, preload all active and inactive images.

   if (rolloversOK) {
      // Load mouseover animated images, second column.

      imageCount = 6;
      navImages = new Array(imageCount+1);
      statusBar = new Array(imageCount+1);

      navImagePath = "/en/_images/kids/templates/";

      navImages[1] = "bt_games";
      statusBar[1] = "Play some fun games!";

      navImages[2] = "bt_projects";
      statusBar[2] = "Wanna do a cool project?";

      navImages[3] = "bt_animations";
      statusBar[3] = "See some cool animations!";

      navImages[4] = "bt_cool_subjects";
      statusBar[4] = "See some of our favorite subjects.";

      navImages[5] = "bt_amazing";
      statusBar[5] = "Read about Dr. Marc's Amazing Facts.";

      navImages[6] = "bt_friends_share";
      statusBar[6] = "See what our friends have to share with us.";

   } // end if

   function preLoadImages() {
      for(i = 1; i < navImages.length; i++ ) {
         img = new Image();
         img.src = navImagePath + navImages[i] + "_on.gif";
      } // end for
   } // end function preLoadImages

   function menuOn(imgName,imgIndex) {
      eval( "document." + imgName + ".src = \"" + navImagePath + navImages[imgIndex] + "_on.gif\";");
   } // end function imgOn
   
   function menuOff(imgName,imgIndex) {
      eval( "document." + imgName + ".src = \"" + navImagePath + navImages[imgIndex] + "_off.gif\";");
   } // end function imgOff

   function imgSwap(imgName,imgPath) {
      eval( "document." + imgName + ".src = \"" + imgPath + "\";");
   } // end function imgOn

   function setStatusBar(mIndex) {
      if( mIndex > 0 ) {
         window.status = statusBar[mIndex];
      } else {
         window.status = " ";
      } // end if-else
   } // end function setStatusBar

   function openWindow(path,window_name,width,height,resizeable,directories,loc,menubar,status,titlebar,toolbar,scrollbar) {

      var myBars = '';

      ( toolbar )    ? myBars += 'toolbar=yes,'           : myBars += 'toolbar=no,';
      ( loc )        ? myBars += 'location=yes,'          : myBars += 'location=no,';
      ( status )     ? myBars += 'status=yes,'            : myBars += 'status=no,';
      ( menubar )    ? myBars += 'menubar=yes,'           : myBars += 'menubar=no,';
      ( scrollbar )  ? myBars += 'scrollbars=yes,'        : myBars += 'scrollbars=no,';
      ( resizeable ) ? myBars += 'resizable=yes,'         : myBars += 'resizable=no,';
      ( width )      ? myBars += 'width=' + width + ','   : myBars += 'width=' + 800 + ',';
      ( height )     ? myBars += 'height=' + height + ',' : myBars += 'height=' + 500 + ',';

      myOptions = "top=50,left=50";

      window.open(path,window_name,myBars + ',' + myOptions);

   } // end function openWindow

   preLoadImages();

////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
// FUNCTION(S) & VARIABLES TO HANDLE SCROLLING STATUS BAR MESSAGE

   messages = new Array();

   // 1 Home Page Status Bar Message
   messages.push("When you look at the world with your very good eyes           You see all that is there . . . or so you surmise.           Ha!            Of the light all around you, you see nary a whit!             You need special tools to unfold every bit.             See all the kinds of light with the Cosmic Colors viewer!             Go to 'Do spacey things.");

   function scrollMessage(mIndex,seed) {

      var out = " ";
      var c   = 1;

      if (seed > 100) {

         seed--;
         var cmd = "scrollMessage(" + mIndex + "," + seed + ")";
         timerOne = window.setTimeout(cmd,100);

      } else if (seed <= 100 && seed > 0) {

         for (c=0 ; c < seed ; c++) {
            out += " ";
         } // end for
         out += messages[mIndex-1];
         seed--;
         var cmd="scrollMessage(" + mIndex + "," + seed + ")";
         window.status = out;
         timerOne = window.setTimeout(cmd,100);

      } else if (seed <= 0) {

         if (-seed < messages[mIndex-1].length) {
            out += messages[mIndex-1].substring(-seed,messages[mIndex-1].length);
            seed--;
            var cmd = "scrollMessage(" + mIndex + "," + seed + ")";
            window.status = out;
            timerOne = window.setTimeout(cmd,100);
         } else {
            window.status = " ";
            timerOne = window.setTimeout("scrollMessage(" + mIndex + ",100)",75);
         } // end if-else

      } // end if-else

   } // end function scrollMessage

   // INSTRUCTIONS
   // 1.  ADD THE MESSAGE YOU WISH TO USE IF IT DOESN'T EXIST ALREADY TO THE 'messages' ARRAY ABOVE
   // 2.  COPY THE CODE BELOW INTO YOUR HTML PAGE AND CHANGE THE 'MESSAGE_INDEX' TAG TO BE THE 
   //     NUMBER OF THE MESSAGE IN THE 'messages' ARRAY AND IT WILL THEN SHOW THAT MESSAGE

   // CODE:
   // <img src="/en/_images/common/spacer.gif" width="1" height="1" onLoad="timerOne=window.setTimeout('scrollMessage(MESSAGE_INDEX,100)',500);">

////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
// FUNCTIONS TO HANDLE FACT OF THE DAY

   function openFact() {
      window.open("/en/kids/fact_popup.shtml","fact","toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=400,height=270,top=30,left=100");   
   }

////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////

//-->