function initPage()
{
	var inputs = document.getElementsByTagName("input");
	var textareas = document.getElementsByTagName("textarea");
	for (var i=0; i<inputs.length; i++)
	{
		if (inputs[i].type == "text")
		{
			inputs[i].onfocus = function ()
			{
				value = this.value;
				this.value = "";
			}
			inputs[i].onblur = function ()
			{
				if (this.value == "")
					this.value = value;
				value = "";
			}
		}
		
	}
	for (var i=0; i<textareas.length; i++)
	{
		if (textareas[i])
		{
			textareas[i].onfocus = function ()
			{
				value = this.value;
				this.value = "";
			}
			textareas[i].onblur = function ()
			{
				if (this.value == "")
					this.value = value;
				value = "";
			}
		}
		
	}
	
}

if (window.addEventListener)
{
	window.addEventListener("load", initPage, false);
}
else if (window.attachEvent){
	window.attachEvent("onload", initPage);
}