//KEYPRESS FUNCTIONS
//trap for Enter keypress
function checkEnter(event){
	event = event || window.event; // IE sucks
	var key = event.which || event.keyCode; // IE uses .keyCode, Moz uses .which
	if (key == 13) {
		return true;
	}else{
		return false;
	}
}

function submitSiteSearch(path){
	var path = (path == null)?"":path;
	var criteria = document.getElementById("siteSearch").value;
	if (criteria == 'Site search' || criteria == '') {
		alert("Invalid search term.");
		return;
	}
	document.location = path+'plants.cfm?section=5&type=searchresults&criteria='+criteria;
}

//Window opening functions.
function show(plant){
	window_properties = "top=100,left=300,width=400,height=300,location=no,toolbar=no,menubar=no,scrollbars=auto,resizable=yes";
	
	PlantWin = window.open(plant, "PlantWin", window_properties);
	PlantWin.focus();
}

function show2(gift){
	window_properties = "top=100,left=300,width=400,height=450,location=no,toolbar=no,menubar=no,scrollbars=auto,resizable=yes";
	
	PlantWin = window.open(gift, "PlantWin", window_properties);
	PlantWin.focus();
}

function show3(promos){
	window_properties = "top=100,left=300,width=450,height=338,location=no,toolbar=no,menubar=no,scrollbars=auto,resizable=yes";
	
	PlantWin = window.open(promos, "PlantWin", window_properties);
	PlantWin.focus();
}