// jamesmar

var activeNav = "";

function show( id ) {
	if ( activeNav ) {
		document.getElementById( activeNav ).style.display = "none";
	}
	if ( activeNav != id ) {
		document.getElementById( id ).style.display = "block";
		activeNav = id;
		if ( id == "search" ) {
			document.form.q.focus();
			document.form.q.select();
		}
	}
	else {
		activeNav = "";
	}
	return false;
}

function postcomment() {
	if ( document.getElementById("post").style.display == "block" )
		document.getElementById("post").style.display = "none";
	else
		document.getElementById("post").style.display = "block";
	return false;
}

function postvalidate( form ) {
	if ( !form.name.value ) {
		alert("Please enter your name");
		form.name.focus();
	}
	else if ( !form.comments.value ) {
		alert("Please enter your comments");
		form.comments.focus();
	}
	else if ( !form.code.value ) {
		alert("Please retype the security code into the box for verification purposes");
		form.code.focus();
	}
	else {
		return true;
	}
	return false;
}	