//  for production environment
var path = 'images/';

// for new tabs, add 4 javascript statements below.  also remember to change
// corresponding onload parameter in body tag of corresponding .htm

if (document.images) {            // load up active Images
            index = new Image();      
            index.src = path + "index.jpg";
            indexOn = new Image();      
            indexOn.src = path + "indexOn.jpg";

            services = new Image();      
            services.src = path +  "services.jpg";
            servicesOn = new Image();      
            servicesOn.src =path +  "servicesOn.jpg";


            customers = new Image();      
            customers.src = path +  "customers.jpg";
            customersOn = new Image();      
            customersOn.src = path +  "customersOn.jpg";
            


            order = new Image();      
            order.src = path +  "order.jpg";
            orderOn = new Image();      
            orderOn.src =path +  "orderOn.jpg";



            consent = new Image();      
            consent.src = path +  "consent.jpg";
            consentOn = new Image();      
            consentOn.src =path +  "consentOn.jpg";

            youtube = new Image();      
            youtube.src = path +  "youtube.jpg";
            youtubeOn = new Image();      
            youtubeOn.src =path +  "youtubeOn.jpg";

            contactus = new Image();      
            contactus.src =path +  "contactus.jpg";
            contactusOn = new Image();      
            contactusOn.src =path +  "contactusOn.jpg";

			reserved = new Image();      
            reserved.src =path +  "reserved.jpg";
            reservedOn = new Image();      
            reservedOn.src =path +  "reservedOn.jpg";
}


// Function to 'activate' images.
function tabOn(imgName) {
        if (document.images) {
            document[imgName].src =  eval(imgName + "On.src");
        }
}

// Function to 'deactivate' images.
function tabOff(imgName) {


        if (document.images) {

			//determine if html page name is same as button image.
			pagename = document.location.href;
			if (pagename == "http://palmeridigital.com/" || pagename == "http://www.palmeridigital.com/")
			{ pagename = "index.htm";
			}
			myRegExp = /\w*\.htm/ 
			resultArray = pagename.match(myRegExp);
			for(var i =0; i < resultArray.length; i++)
			{
				if (resultArray[i] == imgName + ".htm") {
				   // keep "activated" button image displayed 
				   return;
				}
			}

			// show "deactivated" button image
			document[imgName].src = eval(imgName + ".src");

        }
}



