
function highlightDish(id){
if (document.getElementById) {
	clearHighlight(id);
	for(i=1;i<5;i++){
		currentDish="dish"+i;
		document.getElementById(currentDish).style.backgroundColor='#fff';
	}
	document.getElementById(id).style.backgroundColor="#EEE9D7";
	}
}

function clearHighlight(dish){
	//clear the stars why we're at it
	clearstars();
	switch(dish){
	case 'dish1': totalSpices=10; break;
	case 'dish2': totalSpices=10;  break;
	case 'dish3': totalSpices=13; break;
	case 'dish4': totalSpices=9;  break;
	}
	for(i=1;i<(totalSpices+1);i++){
		currentSpice=dish+"spice"+i;
		
		document.getElementById(currentSpice).style.backgroundColor='#fff';
	}
}
function highlightSpice(id){
if (document.getElementById) {
	
	clearAll=id.substr(0,5);
	
	switch(clearAll){
	case 'dish1': totalSpices=11; dish=1; break;
	case 'dish2': totalSpices=10; dish=2; break;
	case 'dish3': totalSpices=13; dish=3; break;
	case 'dish4': totalSpices=9; dish=4; break;
	}

	for(i=1;i<(totalSpices+1);i++){
		currentSpice="dish"+dish+"spice"+i;
		document.getElementById(currentSpice).style.backgroundColor='#fff';
	}
	document.getElementById(id).style.backgroundColor='#EEE9D7';
	}
}

function toggleLayerOff(whichLayer)
{
	
if (document.getElementById)
{
	
// this is the way the standards work
var style2 = document.getElementById(whichLayer).style;
style2.display = style2.display? "":"none";}
else if (document.all)
{
	// this is the way old msie versions work
var style2 = document.all[whichLayer].style;
style2.display = style2.display? "":"none";
}
else if (document.layers)
{
// this is the way nn4 works
var style2 = document.layers[whichLayer].style;
style2.display = style2.display? "":"none";
}
}
function toggleLayerOn(whichLayer,highlightLayer)
{
if (document.getElementById){
	
	
	
		// this is the way the standards work	
	var beef=document.getElementById("beef").style;
	var pasta=document.getElementById("pasta").style;
	var chicken=document.getElementById("chicken").style;
	var seafood=document.getElementById("seafood").style;
	
	//highlight this dish
	highlightDish(highlightLayer);
	
	beef.display="none";
	pasta.display="none";
	chicken.display="none";
	seafood.display="none";
	
	new Effect.BlindDown(whichLayer);

}
return false;
}


function Star(){
clearstars();
var stars=Star.arguments;
	
	for(i=0;i<stars.length;i++){
		if(stars[i].substr(0,4)=='dish') highlightSpice(stars[i]);
		else
		new Effect.Appear(stars[i]);
		//document.getElementById(stars[i]).style.display="block";
		//turn on  highlight
		
		layer=document.getElementById(stars[i]+"-row");
		
		if(layer) layer.style.backgroundColor='#EEE9D7';
	}

}
function clearstars(){
var star = new Array();
	for(i=1;i<15;i++){
		
		current="star"+i;
		
		star[i]=document.getElementById(current).style;
		star[i].display="none";
		layer=$("star"+i+"-row");
		layer.style.backgroundColor="#fff";
	}
}



	


