function hideLink() {
	var myObj;
	myObj = document.getElementById("RecipeDetail_LargerImageLink");
	myObj.style.display="none";
}
function showLink() {
	var myObj;
	myObj = document.getElementById("RecipeDetail_LargerImageLink");
	myObj.style.display="block";
}

function showmain(){
	var mainObj = document.getElementById("maindishes");
	var sidesObj = document.getElementById("sidedishes");
	
	mainObj.style.display="block";
	sidesObj.style.display="none";
}

function showsides(){
	var mainObj = document.getElementById("maindishes");
	var sidesObj = document.getElementById("sidedishes");
	
	mainObj.style.display="none";
	sidesObj.style.display="block";
}

function windowPop(url, name, width, height, scrollboolean) {
	var params;
	if (scrollboolean != "") {
		params = "scrollbars="+scrollboolean;
	} else {
		params = "scrollbars=0";
	}
	params= params + ",location=0,menubar=0,status=0,toolbar=0,resizable=1,top=40,left=40,";
	params = params + "width=" + width + ",height=" + height; 
	window.open(url, name, params).focus();
}

function recipePopUp(id) {
	var name = "recipezoom";
	var width = 600;
	var height = 500;
	var url = "recipezoom.aspx?recipeID=" + id;
	var params="scrollbars=0,location=0,menubar=0,status=0,toolbar=0,resizable=1,top=40,left=40,";
	var params = params + "width=" + width + ",height=" + height; 
	window.open(url, name, params).focus();
}


var trapID = "SearchBox_goSearch"

holdOrigID = trapID;

function trapEnter(evt){
	var e = (evt) ? evt : event;
	var objItemToSubmit = document.getElementById(trapID);
	
	if(objItemToSubmit==null){
		return false;
	}
	else{
		if (e.keyCode == 13){
			e.returnValue=false;
			e.cancel = true;

			//Check the type of the trapID.  You should either have an input or anchor tag.
			if(objItemToSubmit.click) {
				objItemToSubmit.click();
			}
			else {
				window.location.href = objItemToSubmit.href;
			}
		}
	}
}

function setTrapID(id){
	trapID = id;
}

// This replaces sage_ev
function clickTag(n, v)
{
	sage_ev(n, v);
}

document.onkeypress=trapEnter;