// JavaScript Document

/*
        -------------------------------------------------------------------------------------------------
        Random Image/Link JavaScript(tm) by Jim Matvichuk

        This code may be used freely as long as this copyright notice
        remains with the code.
        
                        Copyright© 1997, Jim Matvichuk
                        Jim_Matvichuk@compuserve.com
                        All rights reserved

        Last Revision: August 19, 1997  
        -------------------------------------------------------------------------------------------------
        Instructions:
        There are two Script sections on this page to create the
        Random Image/Link. This section (which should be placed between
        your HEAD tags, after the title and any meta tgas) and the section 
        in the body of this document.
 
        You will need both sections to display the Image/link.
   
        Change the array elements:     ae_('your href and/or image');
        in this section AND place the Javascript section in the body of this 
        document between your BODY tags where you want it to appear.

*/

// Global vars----
G_total_sa = 0;                                 // total random elements
G_day = new Date();                             // date for seed
G_seed = G_day.getTime();                       // G_seed for random number


//---CHANGE THESE ARRAY ELEMENTS TO YOUR LINK/IMAGE
//---ADD/SUBTRACT AS MANY AS YOU NEED
// Just replace your URL and image tags between the single quotes:  ae_('   your stuff here   ');

 /*
  *  in order for the navigation drop-downs to    *
  *  go over the flash, add the wmode param tag   *
  *  <param name="wmode" value="transparent" />   *
  *  and the wmode attribute to the embed tag     *
  *  wmode="transparent"                          *
  */

 
//------------------------------------------------------------------------------------
// Function to Create image/link Object Array
//------------------------------------------------------------------------------------
function ae_ (description) {
        G_total_sa++;
        sa [G_total_sa] = description;
}

//-------------------------------------------------------------------------------------
// function to create a random number from 1 to total number
// of array elements
//-------------------------------------------------------------------------------------
function rand() {
RN = parseInt(((G_seed - (parseInt(G_seed/1000,10) * 1000))/10)/100*G_total_sa + 1,10);
        return RN;
}

