var numMenuItems = 5;
var mainTableArray = new Array(numMenuItems);
var currentlyDisplaying = 'menuItem0';
var currentRow = 1;

mainTableArray[0] = 'welcomeText';
mainTableArray[1] = 'winterSpecial';
mainTableArray[2] = 'multiPhoto';
mainTableArray[3] = 'tuneUp';
mainTableArray[4] = 'storeCare';
mainTableArray[5] = 'googleCheckout';

function showMain(id){

	var itemNumber = id.substring(8); 
	var homeText = mainTableArray[itemNumber]; 
	
	for(var i=0;i<=numMenuItems;i++){
		document.getElementById('menuItem'+i).style.background = 'url(/images/PShelper2009menuItemOff.jpg)';
	}document.getElementById(id).style.background = 'url(/images/PShelper2009menuItemOn.jpg)';
		
	document.getElementById('welcomeText').style.display = 'none'; 	
	for(var i=0;i<=numMenuItems;i++){
		document.getElementById(mainTableArray[i]).style.display = 'none';
	}document.getElementById(homeText).style.display = 'inline';	
	
	currentlyDisplaying = id;
}

function swap(img,swapWith){
	img.src=swapWith;
}

function menuItemOn(id){
	document.getElementById(id).style.background = 'url(/images/PShelper2009menuItemOn.jpg)';
}

function menuItemOff(id){
	if(currentlyDisplaying!=id){ document.getElementById(id).style.background = 'url(/images/PShelper2009menuItemOff.jpg)'; }
}

function showResults(showRow){
	document.getElementById('catName'+currentRow).className='catName';
	document.getElementById('catName'+showRow).className='catNameOn';
	document.getElementById('productResultWrapper'+currentRow).style.display='none';
	document.getElementById('productResultWrapper'+showRow).style.display='block';
	currentRow = showRow;
}	

function setShowResultsRow(setRow){
	currentRow = setRow;	
}