function launchGuestBook(navURL)

{

    // alert("We are opening another window for the Guestbook.\nPlease close the Guestbook window to return to OnlineSmiles.com.\n\nThank you.");

    window.open(navURL, "GuestBook", "width=650, resizable=yes, scrollbars=yes");

}



function swapBtn(img, idx, bHi)

{

    if (idx == curMenuIndex)

        return;



    var curMenu = document.images["i" + aMenus[curMenuIndex].menuName];



    if (bHi)

    {

        img.src = aMenus[idx].menuImgHi.src;

	  curMenu.src = aMenus[curMenuIndex].menuImgLo.src

    }

    else

    {

        img.src = aMenus[idx].menuImgLo.src;

	  curMenu.src = aMenus[curMenuIndex].menuImgHi.src

    }

}



function writeMenu()

{

    var s = "";



    for (var i=0; i < aMenus.length; i++)

    {

        s += '<a href="' + aMenus[i].navURL + '"><img name=i' + aMenus[i].menuName + ' ';

	  s += 'onMouseOver="swapBtn(this, ' + i + ', true)"' ;

	  s += 'onMouseOut="swapBtn(this, ' + i + ', false)"' ;



        if (i == curMenuIndex)

	      s += 'border=0 src=' + aMenus[i].menuImgHi.src + ' width=144 height=20></a><br>';

        else

	      s += 'border=0 src=' + aMenus[i].menuImgLo.src + ' width=144 height=20></a><br>';

    }



    document.write(s);

}



function Menu(mName, nurl)

{

    this.menuName = "i" + mName;

    var temp = new Image();

    temp.src = "images/" + "m" + mName + ".jpg";

    this.menuImgLo = temp;

    temp = new Image();

    temp.src = "images/" + "m" + mName + "Hi.jpg";

    this.menuImgHi = temp;

    this.navURL = nurl;

}



function bookMarkLink()

{

    if (navigator.appName == 'Microsoft Internet Explorer' && 

        parseInt(navigator.appVersion) >= 4)

    {

        window.external.AddFavorite('http://www.onlinesmiles.com', 'OnlineSmiles.com - Jeremy J. Velasco, DDS');

    }

    else

    {

        var s="";

        s += "To bookmark this page, either:\n";

        s += '\n';

        s += '1) close this window and press "D" while holding down the "<CTRL>" button\n';

        s += '\nOR\n\n';

        s += '2) close this window, click the "Bookmarks" menu option and select the "Bookmark This Page" option.';



        alert (s);

    }

}



var aMenus = new Array();



aMenus[0] = new Menu("Home", "Home.shtml");

aMenus[1] = new Menu("Objective", "Objective.shtml");

aMenus[2] = new Menu("Profile", "Profile.shtml");

aMenus[3] = new Menu("Staff", "Staff.shtml");

aMenus[4] = new Menu("Office", "Office.shtml");

aMenus[5] = new Menu("Map", "Map.shtml");

aMenus[6] = new Menu("Contact", "Contact.shtml");

aMenus[7] = new Menu("Forms", "Forms.shtml");

aMenus[8] = new Menu("FAQ", "FAQ.shtml");

aMenus[9] = new Menu("Guest", "javascript:launchGuestBook('http://titan.guestworld.com/wgb/wgbsign.dbm?owner=onlinesmiles_1')");

aMenus[10] = new Menu("ViewGuest", "javascript:launchGuestBook('http://titan.guestworld.com/wgb/wgbview.dbm?owner=onlinesmiles_1')");


