 function getElement(id){
	//this is a pretty cool function from htmlgoodies.com -
	//it re-defines itself based on the browser's capabilities the first time it's called!
	if(document.getElementById){
		getElement = function(id){ return document.getElementById(id); }
	}else if(document.all){
		getElement = function(id){ return document.all[id]; };
	}else if(document.layers){
		getElement = function(id){ return document.layers[id]; };
	}else{
		getElement = function() { return null; }
	}
	// When we get here, the getElement function has been replaced.    // So we return the result of the new function.    return getElement(id);}
}



    function toggleDisplay(id, label, label1) {
	 	var idString = $(id);
	 	this.id=id;
		this.label=label;
		this.label1=label1 || 0;
		Element.toggle(id);
		if (label1 == undefined ) {
			label1 = label;
		}
		if (idString.hidden) {
			idString.hidden=false;
			Element.update(id+'_button', label);
		} else {
			idString.hidden=true;
			Element.update(id+'_button', label1);
		}
	}

	function searchYardener() {
		/*still not sure why I have to call this twice,
		 must be something to do with initializing the function?*/
		var stext = getElement('searchtext');
		if (stext == null) {
			stext = getElement('searchtext');
		}
		alert ('you submitted the following terms: ' + stext.value);
		window.location='/search.php?terms=' + escape(stext.value);
	}