﻿// JavaScript Document

// Change search forms; the beauty of this is that browsers with no JavaScript on will still see the label and button with no extra work.
function templateSearchTermCallback(e) {
	document.getElementById("templateSearchTerm").value = "";
	document.getElementById("templateSearchTerm").style.color = "#000000";
}
function templateSearchTermBlurCallback(e) {
	document.getElementById("templateSearchTerm").value = " Search our site ";
	document.getElementById("templateSearchTerm").style.color = "#777777";
}
function changeSearchFormElements() {
	// Hide the label:
	YAHOO.util.Dom.setStyle('templateSearchTermLabel', 'display', 'none');
	// Hide the button:
	YAHOO.util.Dom.setStyle('templateSearchSubmit', 'display', 'none');
	document.getElementById("templateSearchTerm").value = " Search our site ";
	document.getElementById("templateSearchTerm").title = "Type your search term and press enter/return/etc.";
	document.getElementById("templateSearchTerm").style.color = "#777777";
	YAHOO.util.Event.addListener("templateSearchTerm", "click", templateSearchTermCallback); 
	YAHOO.util.Event.addBlurListener("templateSearchTerm", templateSearchTermBlurCallback); 
}
