var image_url_1 = new Image();
var image_url_2 = new Image();
var image_url_3 = new Image();
var image_url_4 = new Image();
var image_url_5 = new Image();
var image_url_6 = new Image();
var image_url_7 = new Image();
var image_url_8 = new Image();
	
image_url_1.src = "../images/btn-aboutus.gif";
image_url_2.src = "../images/btn-custcare.gif";
image_url_3.src = "../images/btn-faq.gif";
image_url_4.src = "../images/btn-home.gif";
image_url_5.src = "../images/btn-localtoyou.gif";
image_url_6.src = "../images/btn-offers.gif";
image_url_7.src = "../images/btn-opportunities.gif";
image_url_8.src = "../images/btn-products.gif";

function setSection(section){
	currentSection = section;
	checkSection();
}

function checkSection(){
	document.getElementById('home').style.backgroundPosition="top";
	document.getElementById('products').style.backgroundPosition="top";
	document.getElementById('faq').style.backgroundPosition="top";
	document.getElementById('custcare').style.backgroundPosition="top";
	document.getElementById('offers').style.backgroundPosition="top";
	document.getElementById('opportunities').style.backgroundPosition="top";
	document.getElementById('aboutus').style.backgroundPosition="top";
	document.getElementById('localtoyou').style.backgroundPosition="top";

	if(currentSection == "home"){
		document.getElementById('home').style.backgroundPosition="bottom";
	}
	else if(currentSection == "products"){
		document.getElementById('products').style.backgroundPosition="bottom";
	}
	else if(currentSection == "faq"){
		document.getElementById('faq').style.backgroundPosition="bottom";
	}
	else if(currentSection == "custcare"){
		document.getElementById('custcare').style.backgroundPosition="bottom";
	}
	else if(currentSection == "offers"){
		document.getElementById('offers').style.backgroundPosition="bottom";
	}
	else if(currentSection == "opportunities"){
		document.getElementById('opportunities').style.backgroundPosition="bottom";
	}
	else if(currentSection == "aboutus"){
		document.getElementById('aboutus').style.backgroundPosition="bottom";
	}
	else if(currentSection == "localtoyou"){
		document.getElementById('localtoyou').style.backgroundPosition="bottom";
	}
	else {
		document.getElementById('home').style.backgroundPosition="top";
		document.getElementById('products').style.backgroundPosition="top";
		document.getElementById('faq').style.backgroundPosition="top";
		document.getElementById('custcare').style.backgroundPosition="top";
		document.getElementById('offers').style.backgroundPosition="top";
		document.getElementById('opportunities').style.backgroundPosition="top";
		document.getElementById('aboutus').style.backgroundPosition="top";
		document.getElementById('localtoyou').style.backgroundPosition="top";
	}
}

function changeButtons(n){
	switch(n){
		case 1:
		document.getElementById('home').style.backgroundPosition="bottom";
		break;

		case 2:
		document.getElementById('products').style.backgroundPosition="bottom";
		break;

		case 3:
		document.getElementById('faq').style.backgroundPosition="bottom";
		break;

		case 4:
		document.getElementById('custcare').style.backgroundPosition="bottom";
		break;

		case 5:
		document.getElementById('offers').style.backgroundPosition="bottom";
		break;

		case 6:
		document.getElementById('opportunities').style.backgroundPosition="bottom";
		break;

		case 7:
		document.getElementById('aboutus').style.backgroundPosition="bottom";
		break;

		case 8:
		document.getElementById('localtoyou').style.backgroundPosition="bottom";
		break;
	}
}

function changeButtonsBack(n){
	switch(n){
		case 1:
		if(currentSection == "home"){
			document.getElementById('home').style.backgroundPosition="bottom";
		}
		else {
			document.getElementById('home').style.backgroundPosition="top";
		}
		break;
		
		case 2:
		if(currentSection == "products"){
			document.getElementById('products').style.backgroundPosition="bottom";
		}
		else {
			document.getElementById('products').style.backgroundPosition="top";
		}
		break;
		
		case 3:
		if(currentSection == "faq"){
			document.getElementById('faq').style.backgroundPosition="bottom";
		}
		else {
			document.getElementById('faq').style.backgroundPosition="top";
		}
		break;
		
		case 4:
		if(currentSection == "custcare"){
			document.getElementById('custcare').style.backgroundPosition="bottom";
		}
		else {
			document.getElementById('custcare').style.backgroundPosition="top";
		}
		break;
		
		case 5:
		if(currentSection == "offers"){
			document.getElementById('offers').style.backgroundPosition="bottom";
		}
		else {
			document.getElementById('offers').style.backgroundPosition="top";
		}
		break;
		
		case 6:
		if(currentSection == "opportunities"){
			document.getElementById('opportunities').style.backgroundPosition="bottom";
		}
		else {
			document.getElementById('opportunities').style.backgroundPosition="top";
		}
		break;
		
		case 7:
		if(currentSection == "aboutus"){
			document.getElementById('aboutus').style.backgroundPosition="bottom";
		}
		else {
			document.getElementById('aboutus').style.backgroundPosition="top";
		}
		break;
		
		case 8:
		if(currentSection == "localtoyou"){
			document.getElementById('localtoyou').style.backgroundPosition="bottom";
		}
		else {
			document.getElementById('localtoyou').style.backgroundPosition="top";
		}
		break;
	}
}