/* The previous line hides the script from old browsers that can't interpret it
 Assuming the image of the up button is called "button1a.gif"
 And that the image of the down button is called "button1b.gif"
 We can now read these two images into variables
 called button1up and button1down.
*/

button1up = new Image; button1up.src = "images/m1.gif";
button1down = new Image; button1down.src = "images/m1_white.gif";
button2up = new Image; button2up.src = "images/m2.gif";
button2down = new Image; button2down.src = "images/m2_white.gif";
button3up = new Image; button3up.src = "images/m3.gif";
button3down = new Image; button3down.src = "images/m3_white.gif";
button4up = new Image; button4up.src = "images/m4.gif";
button4down = new Image; button4down.src = "images/m4_white.gif";
button5up = new Image; button5up.src = "images/m5.gif";
button5down = new Image; button5down.src = "images/m5_white.gif";
button6up = new Image; button6up.src = "images/m6.gif";
button6down = new Image; button6down.src = "images/m6_white.gif";
// Now the two images are defined.

// Next step is the two functions needed.
// The first function is called MouseOverRoutine,
// and causes button1up to shift to button1down.

function MouseOverRoutine(ButtonName)
{
if (ButtonName=="m1")
{document.m1.src = button1down.src;}
if (ButtonName=="m2")
{document.m2.src = button2down.src;}
if (ButtonName=="m3")
{document.m3.src = button3down.src;}
if (ButtonName=="m4")
{document.m4.src = button4down.src;}
if (ButtonName=="m5")
{document.m5.src = button5down.src;}
if (ButtonName=="m6")
{document.m6.src = button6down.src;}
}

// Now our button will shift from button1up to button1down
// when a mouseover event occurs.
// To complete the script all we need to do
// is make the inverse function, that will do exactly the opposite
// when a mouseout event occurs.

function MouseOutRoutine(ButtonName)
{
if (ButtonName=="m1" && document.title !="Main :: HeMemics.com")
{document.m1.src = button1up.src;}
if (ButtonName=="m2")
{document.m2.src = button2up.src;}
if (ButtonName=="m3"	)
{document.m3.src = button3up.src;}
if (ButtonName=="m4")
{document.m4.src = button4up.src;}
if (ButtonName=="m5")
{document.m5.src = button5up.src;}
if (ButtonName=="m6")
{document.m6.src = button6up.src;}
}

/*
 Thats all there is.
 The final step is ending the script section which is done by two lines:
 The next line causes old-fashion browsers to
 start interpreting the code again.
 */