function initPage()
{
	var inputs = document.getElementsByTagName("input");
	for (var i=0; i<inputs.length; i++)
	{
		if (inputs[i].type == "text" && inputs[i].name == "searchTerm" || inputs[i].name == "mail" || inputs[i].name == "emailAddress" || inputs[i].name == "name" || inputs[i].name == "zip" || inputs[i].name == "subject")
		{
			inputs[i].onfocus = function ()
			{		
					if (this.value == "Email")
						this.value = "";
					if (this.value == "Search")
						this.value = "";
					if (this.value == "Name")
						this.value = "";
					if (this.value == "Zip Code")
						this.value = "";
					if (this.value == "Subject")
						this.value = "";
			}
			inputs[i].onblur = function ()
			{
					if (this.value == "" && this.name == "searchTerm") this.value = "Search";
					if (this.value == "" && this.name == "mail") this.value = "Email";
					if (this.value == "" && this.name == "emailAddress") this.value = "Email";
					if (this.value == "" && this.name == "name") this.value = "Name";
					if (this.value == "" && this.name == "zip") this.value = "Zip Code";
					if (this.value == "" && this.name == "subject") this.value = "Subject";
			}
		}
		
	}
	
	var inputs = document.getElementsByTagName("textarea");
	for (var i=0; i<inputs.length; i++)
	{
		inputs[i].onfocus = function ()
		{		
			this.value = "";
		}
		inputs[i].onblur = function ()
		{
		}
	}
	
}

if (window.addEventListener)
{
	window.addEventListener("load", initPage, false);
}
else if (window.attachEvent){
	window.attachEvent("onload", initPage);
}