HELP! website programming struggles

heres what im trying to do in words:

i have 5 buttons, when on the home page, when a button is clicked i want it to do the following:

  1. play an “unload” animation, where the homepage is cleared
  2. play the “load” animation of a specified page

i.e. when on the homepage you click about, it unloads the home page, and loads on the about page.

now, heres how im trying to achieve this:

on frame 20 the home page loads, the actions for the gallery button and about button are on the actions layer of this frame:
**[SIZE=2][COLOR=#000080]_root.menu_mc.galleriestext.onRelease = function() {
var myvar = “gal”;
**[SIZE=2][COLOR=#000080]_root.menu_mc.abouttext.onRelease = function() {
var myvar = “about”;
the unload animation is on the main timeline from frame 60 - 84, labeled “HOMEUNLOAD”
on frame 84, flash checks for the variables:

**[SIZE=2][COLOR=#000080]if (myvar = “gal”) {
**[SIZE=2][COLOR=#000080]if (myvar = “about”) {
the gallery page is on frame 136, labeled “GALLERIES”
the about page is on frame 85, labeled “ABOUT”.

here is whats happening:
when either button is clicked, it unloads, but loads the about page

please help me!