// For all ROOT LEVEL pages

// The following JavaScript is Copyright (c) 1999,2000, 2001 Matthew Gardner.
// Tested on all major Win/Mac IE/NN 3.0 and up
// Questions to logic@newmethods.com

//NS6 = (document.getElementById && !document.all);
NS6 = false;

if (document.images) {
    var Buttons_On_Page = 10;     // [1] Name your images: Prefix + Button + State + Suffix, ex. "b13.jpg"
    var Image_Path = "images/";    // [3] Name the IMGs in the document b1, b2, b3, etc.
    var Image_Prefix = "b";       // [4] Call the fuctions with the button you wish to change, ex. s1(4), s0(4)
    var Image_Suffix = ".gif";    // [5] Animation adjustments can be made to the functions

    Buttons_On_Page++;
    var b = new Array( Buttons_On_Page );  // b[x] is the Array of Buttons on the Page

    for ( button = 0; button < Buttons_On_Page; button++ )
    {
        b[button] = new Array(2);

        for ( state = 0; state < 2; state++ )
        { 
            b[button][state] = new Image();
	        b[button][state].src = Image_Path + Image_Prefix + button + (state+1) + Image_Suffix;
        }
    }
}

function s1(button) { if (document.images && !NS6) {
  document.images['b'+button].src = b[button][1].src;
}}
function s0(button) { if (document.images && !NS6) {
  document.images['b'+button].src = b[button][0].src;
}}
