function showMenu(id) {
	document.getElementById(id).childNodes.item(2).style.display = 'block';
}

function hideMenu(id) {
	document.getElementById(id).childNodes.item(2).style.display = 'none';
}

function swapBtn(id) {
	if (document.getElementById(id).id == 'searchgo'){
		document.getElementById(id).src = '/images/ui/buttons/go_wt_on.gif';
	}
	else if (document.getElementById(id).id == 'emailgo'){
		document.getElementById(id).src = '/images/ui/buttons/go_gr_on.gif';
	}
}

function swapBack(id) {
	if (document.getElementById(id).id == 'searchgo'){
		document.getElementById(id).src = '/images/ui/buttons/go_wt.gif';
	}
	else if (document.getElementById(id).id == 'emailgo'){
		document.getElementById(id).src = '/images/ui/buttons/go_gr.gif';
	}
}

var inputvalue;

function clearText(id) {
	if (document.getElementById(id).value == 'Search'){
		inputvalue = 'Search';
		document.getElementById(id).value = '';
	}
	else if (document.getElementById(id).value == 'Enter eMail'){
		inputvalue = 'Enter eMail';
		document.getElementById(id).value = '';
	}
}

function replaceText(id) {
	if (document.getElementById(id).value == '' && inputvalue == 'Search'){
		document.getElementById(id).value = 'Search';
	}
	else if (document.getElementById(id).value == '' && inputvalue == 'Enter eMail'){
		document.getElementById(id).value = 'Enter eMail';
	}
}

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
function checkEmail(myForm) {
if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(myForm.emailAddr.value)){
return (true)
}
alert("Invalid E-mail Address! Please re-enter.")
return (false)
}
//  End -->