//********************************************************
// VARS 
       //URLS
        var BaseURL = 'http://dougshotz.smugmug.com/';
        var WWWBaseURL = 'http://www.dougshotz.smugmug.com/';
        var photoDirectory = 'photos/';
        var PhotoURL = BaseURL + photoDirectory;
        var bioType = "?type=Bio";
        var testimonialType = "?type=Testimonial";
        var ratesType = "?type=Rates";
        var linksType = "?type=Links";
        var ShowAllGalleriesBoolean='?ShowAllGalleries=True';
        var slideshowType = "?type=Slideshow";

        
        //Nav Images
        var archiveImg = '411988203_iLfC7-L.jpg'
        var archiveOverImg = '411988207_m7DG9-L.jpg'

        var homeImg = '411988260_h9HNx-L.jpg';
        var homeOverImg = '411988269_NNKKf-L.jpg';

        var scenicImg = '411988301_ReA8u-L.jpg';
        var scenicOverImg = '411988303_9oVPQ-L.jpg';

        var fashionImg = '411988229_8jiKz-L.jpg';
        var fashionOverImg = '411988239_8QnnS-L.jpg';

        var portraitImg = '411988289_WxoiD-L.jpg';
        var portraitOverImg = '411988297_ptozU-L.jpg';

        var glamourImg = '411988244_SkyBm-L.jpg';
        var glamourOverImg = '411988257_SsvEs-XL.jpg';

        var intimateImg = '411988273_j96jm-L.jpg';
        var intimateOverImg = '411988277_xJUV7-L.jpg';

        var eventsImg = '411988247_TZBpz-L.jpg';
        var eventsOverImg = '411988220_HKCKM-L.jpg';
      
        var NavSpacer = '411988204_EUQg7-L.jpg';

        //vars
        var varSelectedNav = '';



//*************************************************************

//*************************************************************
//On Load

        function loadOverImages() {
            //if (homeimage == null) {
                var homeimage = PhotoURL + homeImg;
                var scenicimage = PhotoURL + scenicOverImg;
                var fashionimage = PhotoURL + fashionOverImg;
                var portraitimage = PhotoURL + portraitOverImg;
                var glamourimage = PhotoURL + glamourOverImg;
                var intimateimage = PhotoURL + intimateOverImg;
                var archiveimage = PhotoURL + archiveOverImg;
                var eventsimage = PhotoURL + eventsOverImg;
            //}
        }

      function homeLocation()
      {
       var urlValue = window.location.search;
       var theURL = document.location.href.toUpperCase();

       if ((theURL == BaseURL.toUpperCase())|| (theURL == WWWBaseURL.toUpperCase()))
       {
        //have home link click or www home click
        //  load slideshow
        urlValue=slideshowType;
       }

       if (urlValue!='')
       //have click from footer links
        {

            switch (urlValue) {
                case slideshowType:
                    hideContentDivs();
                    document.getElementById('SlideshowDiv').style.display = "block";
                    break;
                case bioType:
                    hideContentDivs();
                    document.getElementById('BioDiv').style.display = "block";
                    break;
                case testimonialType:
                    hideContentDivs();
                    document.getElementById('TestimonialDiv').style.display = "block";
                    break;
                case ratesType:
                    hideContentDivs();
                    document.getElementById('RatesDiv').style.display = "block";
                    break;
                case linksType:
                    hideContentDivs();
                    document.getElementById('LinksDiv').style.display = "block";
                    break;
                case ShowAllGalleriesBoolean:
                    //show all galleries
                    hideContentDivs();
                    document.getElementById('homepage').style.display = "block";
                    break;
                default:
                    //alert("missed case in homeLocation");
            }

        }
        else
        {
         hideContentDivs();
        }

      }
//*************************************************************


       function hideContentDivs()
        {

           document.getElementById('BioDiv').style.display = "none";
           document.getElementById('TestimonialDiv').style.display = "none";
           document.getElementById('RatesDiv').style.display = "none";
           document.getElementById('LinksDiv').style.display = "none";
           document.getElementById('SlideshowDiv').style.display = "none";

         }




        function NavOver(obj, ImageName, Alt) {
            var HISelectedNav = document.getElementById('selectedNavButton').value;
            if (obj.id != varSelectedNav) {
                obj.src = PhotoURL + ImageName;
                obj.title = Alt;
            }
            else {
                obj.title = Alt;
            }
        }


         function NavOverL(obj, ImageName, Alt) {
                obj.src = PhotoURL + ImageName;
                obj.title = Alt;
        }

        function NavClick(obj, objectid, ImageName, Alt) {
            //set select nav button var
            SelectedNav(objectid);

            //hidden variable set
            hiddeninputSelectedNav(objectid);

            //turn off all other buttons
            OffAllNav();

            //highlight button
            //NavOver(obj, ImageName, Alt);

            //redirect page
             RedirectByObjectID(objectid);




        }

        function RedirectByObjectID(objectid) {
            switch (objectid) {
                case "HOME":
                    document.location.href = BaseURL;
                    break;
                case "SCENIC":
                    document.location.href = BaseURL + 'scenic';
                    break;
                case "FASHION":
                    document.location.href = BaseURL + 'fashion';
                    break;
                case "PORTRAIT":
                    document.location.href = BaseURL + 'portraits';
                    break;
                case "GLAMOUR":
                    document.location.href = BaseURL + 'glamour';
                    break;
                case "INTIMATE":
                    document.location.href = BaseURL + 'intimate';
                    break;
                case "ARCHIVE":
                    document.location.href = BaseURL + 'archives';
                    break;
                case "EVENTS":
                    document.location.href = BaseURL + 'events';
                    break;
                default:
                    //alert("missed case in RedirectByObjectID");
            }
        }

        function OffAllNav() {
            var home = document.getElementById('HOME');
            var scenic = document.getElementById('SCENIC');
            var fashion = document.getElementById('FASHION');
            var portrait = document.getElementById('PORTRAIT');
            var glamour = document.getElementById('GLAMOUR');
            var intimate = document.getElementById('INTIMATE');
            var archive = document.getElementById('ARCHIVE');
            var events = document.getElementById('EVENTS');
            NavOver(home, homeImg);
            NavOver(scenic, scenicImg);
            NavOver(fashion, fashionImg);
            NavOver(portrait, portraitImg);
            NavOver(glamour, glamourImg);
            NavOver(intimate, intimateImg);
            NavOver(archive, archiveImg);
            NavOver(events, eventsImg);
        }

        function SelectedNav(NavName) {
            varSelectedNav = NavName;
        }

       function hiddeninputSelectedNav(NavName) {

            var HISelectedNav = document.getElementById('selectedNavButton');


            HISelectedNav.value = NavName;


        }

//***************************************************************
// bio, testimonial, rates JS





        function Bio()
        {
         document.location.href=BaseURL + bioType;
        }
        function Testimonials()
        {
         document.location.href=BaseURL + testimonialType;
        }
        function Rates()
        {
         document.location.href=BaseURL + ratesType;
        }
        function Links()
        {
         document.location.href=BaseURL + linksType;
        }
 

//***************************************************************

