	
	
	//precache all off button images
	var offImgArray = new Array()
	offImgArray["About"] = new Image
	offImgArray["About"].src ="Images/Buttons/AboutUs_BT.gif"
	offImgArray["Products"] = new Image
	offImgArray["Products"].src ="Images/Buttons/Products_BT.gif"
	offImgArray["Services"] = new Image
	offImgArray["Services"].src ="Images/Buttons/Services_BT.gif"
	offImgArray["Customers"] = new Image
	offImgArray["Customers"].src ="Images/Buttons/Customers_BT.gif"
	offImgArray["Contacts"] = new Image
	offImgArray["Contacts"].src ="Images/Buttons/Contacts_BT.gif"
	offImgArray["SubJobs"] = new Image
	offImgArray["SubJobs"].src ="Images/Buttons/Jobs_SMBT.gif"
	offImgArray["SubBenefits"] = new Image
	offImgArray["SubBenefits"].src ="Images/Buttons/Benefits_SMBT.gif"
	offImgArray["SubMission"] = new Image
	offImgArray["SubMission"].src ="Images/Buttons/MissionValues_SMBT.gif"
	offImgArray["SubHomeHeatProducts"] = new Image
	offImgArray["SubHomeHeatProducts"].src ="Images/Buttons/HomeHeating_SMBT.gif"
	offImgArray["SubOtherHomeProducts"] = new Image
	offImgArray["SubOtherHomeProducts"].src ="Images/Buttons/OtherHomeProducts_SMBT.gif"
	offImgArray["SubBecomeCustomer"] = new Image
	offImgArray["SubBecomeCustomer"].src ="Images/Buttons/BecomingCustomer_SMBT.gif"
	offImgArray["SubBillPayment"] = new Image
	offImgArray["SubBillPayment"].src ="Images/Buttons/BillPayment_SMBT.gif"
	offImgArray["SubSchedule"] = new Image
	offImgArray["SubSchedule"].src ="Images/Buttons/Schedule_SMBT.gif"
	offImgArray["SubRequestInfo"] = new Image
	offImgArray["SubRequestInfo"].src ="Images/Buttons/RequestInfo_SMBT.gif"
	offImgArray["SubClippermart"] = new Image
	offImgArray["SubClippermart"].src ="Images/Buttons/Clippermarts_SMBT.gif"
	offImgArray["SubHeatOilProducts"] = new Image
	offImgArray["SubHeatOilProducts"].src ="Images/Buttons/HomeHeating_SMBT.gif"
	offImgArray["SubOtherProducts"] = new Image
	offImgArray["SubOtherProducts"].src ="Images/Buttons/OtherHomeProducts_SMBT.gif"
	offImgArray["SubFuelPrograms"] = new Image
	offImgArray["SubFuelPrograms"].src ="Images/Buttons/FuelPrograms_SMBT.gif"
	
	offImgArray["SubServicePlans"] = new Image
	offImgArray["SubServicePlans"].src ="Images/Buttons/Service_SMBT.gif"
	
	offImgArray["SubOurHistory"] = new Image
	offImgArray["SubOurHistory"].src ="Images/Buttons/OurHistory_SMBT.gif"
	offImgArray["SubMWSDivisions"] = new Image
	offImgArray["SubMWSDivisions"].src ="Images/Buttons/MWSDivisions_SMBT.gif"
	offImgArray["SubCommunity"] = new Image
	offImgArray["SubCommunity"].src ="Images/Buttons/Community_SMBT.gif"
	offImgArray["SubPrivacy"] = new Image
	offImgArray["SubPrivacy"].src ="Images/Buttons/PrivacyStmt_SMBT.gif"
	
	
	

	var onImgArray = new Array()
	onImgArray["About"] = new Image
	onImgArray["About"].src = "Images/Buttons/AboutUs_SBT.gif"
	onImgArray["Products"] = new Image
	onImgArray["Products"].src = "Images/Buttons/Products_SBT.gif"
	onImgArray["Services"] = new Image
	onImgArray["Services"].src = "Images/Buttons/Services_SBT.gif"
	onImgArray["Customers"] = new Image
	onImgArray["Customers"].src = "Images/Buttons/Customers_SBT.gif"
	onImgArray["Contacts"] = new Image
	onImgArray["Contacts"].src = "Images/Buttons/Contacts_SBT.gif"
	onImgArray["SubJobs"] = new Image
	onImgArray["SubJobs"].src = "Images/Buttons/Jobs_SMSBT.gif"
	onImgArray["SubBenefits"] = new Image
	onImgArray["SubBenefits"].src = "Images/Buttons/Benefits_SMSBT.gif"
	onImgArray["SubMission"] = new Image
	onImgArray["SubMission"].src = "Images/Buttons/MissionValues_SMSBT.gif"
	onImgArray["SubHomeHeatProducts"] = new Image
	onImgArray["SubHomeHeatProducts"].src = "Images/Buttons/HomeHeating_SMSBT.gif"
	onImgArray["SubOtherHomeProducts"] = new Image
	onImgArray["SubOtherHomeProducts"].src = "Images/Buttons/OtherHomeProducts_SMBT.gif"
	onImgArray["SubBecomeCustomer"] = new Image
	onImgArray["SubBecomeCustomer"].src ="Images/Buttons/BecomingCustomer_SMSBT.gif"
	onImgArray["SubBillPayment"] = new Image
	onImgArray["SubBillPayment"].src ="Images/Buttons/BillPayment_SMSBT.gif"
	onImgArray["SubSchedule"] = new Image
	onImgArray["SubSchedule"].src ="Images/Buttons/Schedule_SMSBT.gif"
	onImgArray["SubRequestInfo"] = new Image
	onImgArray["SubRequestInfo"].src ="Images/Buttons/RequestInfo_SMSBT.gif"
	onImgArray["SubClippermart"] = new Image
	onImgArray["SubClippermart"].src ="Images/Buttons/Clippermarts_SMSBT.gif"
	onImgArray["SubHeatOilProducts"] = new Image
	onImgArray["SubHeatOilProducts"].src ="Images/Buttons/HomeHeating_SMSBT.gif"
	onImgArray["SubOtherProducts"] = new Image
	onImgArray["SubOtherProducts"].src ="Images/Buttons/OtherHomeProducts_SMSBT.gif"
	onImgArray["SubFuelPrograms"] = new Image
	onImgArray["SubFuelPrograms"].src ="Images/Buttons/FuelPrograms_SMSBT.gif"
	onImgArray["SubServicePlans"] = new Image
	onImgArray["SubServicePlans"].src ="Images/Buttons/Service_SMSBT.gif"
	onImgArray["SubOurHistory"] = new Image
	onImgArray["SubOurHistory"].src ="Images/Buttons/OurHistory_SMSBT.gif"
	onImgArray["SubMWSDivisions"] = new Image
	onImgArray["SubMWSDivisions"].src ="Images/Buttons/MWSDivisions_SMSBT.gif"
	onImgArray["SubCommunity"] = new Image
	onImgArray["SubCommunity"].src ="Images/Buttons/Community_SMSBT.gif"
	onImgArray["SubPrivacy"] = new Image
	onImgArray["SubPrivacy"].src ="Images/Buttons/PrivacyStmt_SMSBT.gif"
	

	//functions that swap images
	function imageON(imgName) {
		if (document.images) {
			document.images[imgName].src = onImgArray[imgName].src
		}
	}
	
	function imageOFF(imgName) {
		if (document.images) {
			document.images[imgName].src = offImgArray[imgName].src
		}
	}
	
	function menuClick(menuItem){
	    switch (menuItem){
	        case "Home":
	            document.location="Index.aspx"
	            break;
			case "About":
	            document.location="About.aspx"
	            break;
			case "SplashProducts":
			case "Products":
				document.location="Products.aspx"
			break;
			
			case "Services":
			case "SplashServices":
				document.location="Services.aspx"
			break;
			case "Customers":
				document.location="Customers.aspx"
			break;
			case "Contacts":
				document.location="Contacts.aspx"
			break;
			
			case "SubJobs":
			    document.location="CareersJobOpenings.aspx?CMD=JobOpenings"
			break;
			
			case "SubBenefits":
				document.location ="CareersBenefits.aspx"
			break;
			
			case "SubMission":
				document.location = "CareersMission.aspx"
			break;
	            
	        case "SubBecomeCustomer":
				document.location = "CustomersNew.aspx?CMD=servicesEnterZipCode"
			break;
			
			case "SubBillPayment":
				document.location = "CustomersBills.aspx"
			break;
			
			case "SubSchedule":
				document.location = "CustomersSchedule.aspx"
			break;
			
			case "SubRequestInfo":
				openForm()
			break;
			
			case "SubClippermart":
			case "SplashClippermart":
				document.location ="Clippermarts.aspx?CMD=clippermartAll"
			break;
			case "SubHeatOilProducts":
				document.location="ProductsHeatingOils.aspx"
			break;
			case "SubOtherProducts":
				document.location="ProductsOtherHeating.aspx"
			break;
			case "SubFuelPrograms":
				document.location = "ProductPrograms.aspx"
			break;
			case "SubServicePlans":
				document.location = "ServicePrograms.aspx"
			break;
			case "SubSiteMap":
				
			break;
			case "SubOurHistory":
				document.location ="AboutHistory.aspx"
			break;
			case "SubMWSDivisions":
				document.location = "AboutDivisions.aspx"
			break;
			case "SubCareers":
			break;
			case "SubCommunity":
				document.location = "AboutCommunity.aspx"
			break;
			case "SubPrivacy":
				window.open("Privacy.html")
			break;
			
	        default:
	            //something
	            break;
	        
	    }
	}
	
    
    //function that sets the left lines vertical lines of the table on Body Load
    function setTableLines(){
        if(document.getElementById("lineRight") != null) {document.getElementById("lineRight").innerHTML = "<img src='Images/VRThinLine_GR.gif' width='2' height='" + document.getElementById("tblBorder").clientHeight + "' >"}
        if(document.getElementById("lineCenter") != null) {document.getElementById("lineCenter").innerHTML = "<img src='Images/VRThinLine_GR.gif' width='2' height='" + document.getElementById("tblInside").clientHeight + "' >"}
        if(document.getElementById("lineLeft") != null) {document.getElementById("lineLeft").innerHTML = "<img src='Images/VRThinLine_GR.gif' width='2' height='" + document.getElementById("tblBorder").clientHeight + "' >"}
		
		
//        if(document.getElementById("lineRight") != null) {document.images("lineRight").height = document.getElementById("tblBorder").clientHeight}
//        if(document.getElementById("lineCenter") != null) {document.images["lineCenter"].height = document.getElementById("tblInside").clientHeight}
//        if(document.getElementById("lineLeft") != null) {document.images["lineLeft"].height = document.getElementById("tblBorder").clientHeight}
    
	}
    
    function changeNextImage(imgName,imgState){
        if(imgState=="ON"){
            var ctl = document.getElementById(imgName);
            ctl.src = "Images/Buttons/NextStep_SBT.gif";
        }else{
            var ctl = document.getElementById(imgName);
            ctl.src = "Images/Buttons/NextStep_BT.gif";
        }
    }

    function changePreviousImage(imgName,imgState){
        if(imgState=="ON"){
            var ctl = document.getElementById(imgName);
            ctl.src = "Images/Buttons/PreviousStep_SBT.gif";
        }else{
            var ctl = document.getElementById(imgName);
            ctl.src = "Images/Buttons/PreviousStep_BT.gif";
        }
    }
	
	function openForm(){
		window.open("RequestForm.aspx","frmRequestInfo","toolbars=0,width=487,height=600,scrollbar=0")
	}
	
	function openReadBill(){
		window.open("CustomersReadBill.html","frmReadBill","toolbars=0,width=550,height=700,scrollbar=0")
	}
	
	