var baseURL = "http://www.axisart.ca"
var yDepth = 0;
var wCentre = "";
if (navigator.appName == "Microsoft Internet Explorer")
{
    //mac internet explorer
    if(navigator.appVersion.toLowerCase().indexOf('macintosh')!=-1)
    {
        //mac internet explorer OS 9
        if(navigator.userAgent.indexOf('MSIE 5.0')!=-1)
        {
            yDepth = 168;
            wCentre = "window.page.winW()/2 - 4 - menuW/2 - 4";
        }
        //mac internet explorer OS X
        else
        {
            yDepth = 168;
            wCentre = "window.page.winW()/2 - 8 - menuW/2 - 8";
        }
    }
    //windows internet explorer
    else
    {
        //windows opera 8
        if(navigator.userAgent.indexOf('Opera')!=-1)
        {
            yDepth = 176;
            wCentre = "window.page.winW()/2 - 5 - menuW/2 - 5";
        }
        //windows internet explorer
        else
        {
            yDepth = 168;
            wCentre = "window.page.winW()/2 - menuW/2";
        }
    }
}
else
{
    if(navigator.appVersion.toLowerCase().indexOf('macintosh')!=-1)
    {
        //mac netscape version 4
        if(parseInt(navigator.appVersion.substring(0,1))==4)
        {
            yDepth = 176;
            wCentre = "window.page.winW()/2 - 4 - menuW/2 - 4";
        }
        //mac netscape version 6 and Safari
        if(parseInt(navigator.appVersion.substring(0,1))==5)
        {
            yDepth = 168;
            wCentre = "window.page.winW()/2 - 4 - menuW/2 - 4";
        }
    }
    else
    {
        //windows netscape version 4.61
        if(parseInt(navigator.appVersion.substring(0,1))==4)
        {
            yDepth = 176;
            wCentre = "window.page.winW()/2 - 5 - menuW/2 - 4";
        }
        //windows netscape version 6/7 and Firefox 1.0.6
        if(parseInt(navigator.appVersion.substring(0,1))==5)
        {
			yDepth = 168;
            wCentre = "window.page.winW()/2 - 4 - menuW/2 - 4";
        }
    }
}

var hBar = new ItemStyle(190, 0, '', 0, 0, '', '', '', '', '', '', null, null, 'hand', 'hand');
var subM = new ItemStyle(25, 0, '', 0, 3, '#DCDCDC', '#CE0000', 'lowText', 'highText', 'itemBorder', 'itemBorder', null, null, 'hand', 'hand');
var pMenu = new PopupMenu('pMenu');

with (pMenu)
{
startMenu('root', false, wCentre, yDepth, 51, hBar, '', false);
//logo
addItem( '<img src="/nav/logo03.gif" alt="axis" width="199" height="51" border="0" />', '', 'sm:', null, 199).onclick='window.location.href="' + baseURL + '/"';
//about
if(document.location.pathname.indexOf("/about/") == 0) {
    addItem('<img src="/nav/aboutMarker.gif" alt="About Us" name="about" width="109" height="51" border="0" id="about" />', 'mAbout', 'sm:', null, 109).onclick='window.location.href="' + baseURL + '/about/"';
}
else {
    addItem('SWAP:<img src="/nav/about.gif" alt="About Us" name="about" width="109" height="51" border="0" id="about" />^<img src="/nav/aboutOver.gif" alt="About Us" name="about" width="109" height="51" border="0" id="about" />', 'mAbout', 'sm:', null, 109).onclick='window.location.href="' + baseURL + '/about/"';
}
//artists
if(document.location.pathname.indexOf("/artists/") == 0) {
	addItem('<img src="/nav/artistsMarker.gif" alt="Artists" name="artists" width="109" height="51" border="0" id="artists" />', 'mArtists', 'sm:', null, 109).onclick='window.location.href="' + baseURL + '/artists/"';
}
else {
    addItem('SWAP:<img src="/nav/artists.gif" alt="Artists" name="artists" width="109" height="51" border="0" id="artists" />^<img src="/nav/artistsOver.gif" alt="Artists" name="artists" width="109" height="51" border="0" id="artists" />', 'mArtists', 'sm:', null, 109).onclick='window.location.href="' + baseURL + '/artists/"';
}
//exhibitions
if(document.location.pathname.indexOf("/exhibitions/") == 0) {
    addItem('<img src="/nav/exhibitionsMarker.gif" alt="Exhibitions" name="exhibitions" width="109" height="51" border="0" id="exhibitions" />', 'mExhibitions', 'sm:', null, 109).onclick='window.location.href="' + baseURL + '/exhibitions/"';
}
else {
    addItem('SWAP:<img src="/nav/exhibitions.gif" alt="Exhibitions" name="exhibitions" width="109" height="51" border="0" id="exhibitions" />^<img src="/nav/exhibitionsOver.gif" alt="Exhibitions" name="exhibitions" width="109" height="51" border="0" id="exhibitions" />', 'mExhibitions', 'sm:', null, 109).onclick='window.location.href="' + baseURL + '/exhibitions/"';
}
//membership
if(document.location.pathname.indexOf("/membership/") == 0) {
    addItem('<img src="/nav/membershipMarker.gif" alt="Membership" name="membership" width="109" height="51" border="0" id="membership" />', '', 'sm:', null, 109).onclick='window.location.href="' + baseURL + '/membership/"';
}
else {
    addItem('SWAP:<img src="/nav/membership.gif" alt="Membership" name="membership" width="109" height="51" border="0" id="membership" />^<img src="/nav/membershipOver.gif" alt="Membership" name="membership" width="109" height="51" border="0" id="membership" />', '', 'sm:', null, 109).onclick='window.location.href="' + baseURL + '/membership/"';
}
//contact us
if(document.location.pathname.indexOf("/contact/") == 0) {
    addItem('<img src="/nav/contactMarker.gif" alt="Contact" name="contact" width="109" height="51" border="0" id="contact" />', '', 'sm:', null, 109).onclick='window.location.href="' + baseURL + '/contact/"';
}
else {
    addItem('SWAP:<img src="/nav/contact.gif" alt="Contact" name="contact" width="109" height="51" border="0" id="contact" />^<img src="/nav/contactOver.gif" alt="Contact" name="contact" width="109" height="51" border="0" id="contact" />', 'mOurHotel', 'sm:', null, 109).onclick='window.location.href="' + baseURL + '/contact/"';
}

startMenu('mAbout', true, 1, 51, 109, subM, '', false);
addItem('Art Consulting', '/about/artConsulting.php', '');
addItem('Press', '/about/press.php', '');
addItem('Hours', '/about/hours.php', '');
addItem('Submissions', '/about/submissions.php', '');

startMenu('mArtists', true, 1, 51, 109, subM, '', false);
addItem('A - F', 'mAF', 'sm:').onclick='window.location.href="' + baseURL + '/artists/"';
addItem('G - L', 'mGL', 'sm:').onclick='window.location.href="' + baseURL + '/artists/"';
addItem('M - Z', 'mMZ', 'sm:').onclick='window.location.href="' + baseURL + '/artists/"';

startMenu('mAF', true, 109, 0, 155, subM, '', false);
addItem('Jackie Bagley', '/artists/jackieBagley.php', '');
addItem('Anthony Baker', '/artists/anthonyBaker.php', '');
addItem('Mike Binzer', '/artists/mikeBinzer.php', '');
addItem('Norah Borden', '/artists/norahBorden.php', '');
addItem('Lisa Brawn', '/artists/lisaBrawn.php', '');
addItem('Maguy Carpentier', '/artists/maguyCarpentier.php', '');
addItem('Othon Castaneda', '/artists/othonCastaneda.php', '');
addItem('Nevada Christianson', '/artists/nevadaChristianson.php', '');
addItem('Amy Dryer', '/artists/amyDryer.php', '');
addItem('Simon Fleming', '/artists/simonFleming.php', '');
addItem('Steven Friedman', '/artists/stevenFriedman.php', '');

startMenu('mGL', true, 109, 0, 155, subM, '', false);
addItem('Timothy Hoey', '/artists/timothyHoey.php', '');
addItem('Stevnn Hall', '/artists/stevnnHall.php', '');
addItem('Ira Hoffecker', '/artists/iraHoffecker.php', '');
addItem('Caroline James', '/artists/carolineJames.php', '');
addItem('Douglas Kirkland', '/artists/douglasKirkland.php', '');
addItem('Ron Kostyniuk', '/artists/ronKostyniuk.php', '');
addItem('Grant Leier', '/artists/grantLeier.php', '');
addItem('Eric Louie', '/artists/ericLouie.php', '');
addItem('Darlene Lobos', '/artists/darleneLobos.php', '');
addItem('Lori Lukasewich', '/artists/loriLukasewich.php', '');

startMenu('mMZ', true, 109, 0, 155, subM, '', false);
addItem('Audrey Mabee', '/artists/audreyMabee.php', ''); 
addItem('Mychael Maier', '/artists/mychaelMaier.php', '');
addItem('Michael Markowsky', '/artists/michaelMarkowsky.php', '');
addItem('Stuart McCall', '/artists/stuartMcCall.php', '');
addItem('Tim Okamura', '/artists/timOkamura.php', '');
addItem('Seka Owen', '/artists/sekaOwen.php', '');
addItem('Sara Robichaud', '/artists/saraMcIntosh.php', '');
addItem('Jay Senetchko', '/artists/jaySenetchko.php', '');
addItem('Mandy Stobo', '/artists/mandyStobo.php', '');
addItem('Alejandro Uzeta', '/artists/alejandroUzeta.php', '');
addItem('Jose Angel Vincench', '/artists/joseAngelVincench.php', '');
addItem('Verna Vogel', '/artists/vernaVogel.php', '');
addItem('Shirley Watson', '/artists/shirleyWatson.php', '');
addItem('Christine Wignall', '/artists/christineWignall.php', '');

startMenu('mExhibitions', true, 1, 51, 109, subM, '', false);
addItem('Upcoming', '/exhibitions/upcoming.php', '');
addItem('Previous', '/exhibitions/previous.php', '');

}

page.elmPos=function(e,p)
{
 var x=0,y=0,w=p?p:this.win;
 e=e?(e.substr?(isNS4?w.document.anchors[e]:getRef(e,w)):e):p;
 if(isNS4){if(e&&(e!=p)){x=e.x;y=e.y};if(p){x+=p.pageX;y+=p.pageY}}
 else if (e && e.focus && e.href && this.MS && 
/Mac/.test(navigator.platform))
 {
  e.onfocus = new Function('with(event){self.tmpX=clientX-offsetX;' +
   'self.tmpY=clientY-offsetY}');
  e.focus();x=tmpX;y=tmpY;e.blur()
 }
 else while(e){x+=e.offsetLeft;y+=e.offsetTop;e=e.offsetParent}
 return{x:x,y:y};
};
