function submit_gsearch(){
	document.forms["gsearch"].submit();
}

function check_clear(id){
	if((id=="name" && document.getElementById(id).value=="Your Name") ||
	   (id=="email" && document.getElementById(id).value=="Your Email") ||
	   (id=="title" && document.getElementById(id).value=="Article Title"))
	{
		document.getElementById(id).value = "";
	}
}

function highlight_field(id)
{
	
}

function update_preview()
{
	var preview_html = "<h1>"+document.getElementById('title').value+"</h1>"+document.getElementById('article_text').value;
	document.getElementById('preview_box').innerHTML = preview_html;
	document.getElementById('preview_box').style.display = '';
	document.getElementById('preview_box').style.border = '1px solid #aaa';
}

function open_explanation_window()
{
	var explanation;
	explanation = (window.open("includes/CAPTCHA_explain.php",'','height=644,width=1000,resizable=yes,scrollbars=yes,toolbar=yes,menubar=no,location=no,directories=no,status=yes', false));
	if(window.focus)
	{
		explanation.focus();
	}
}
