function submitForm(formId)
{
	var form = document.getElementById(formId);
	form.submit();
}

function trim(text)
{
	return text.replace(/^(\s|\&nbsp;)*|(\s|\&nbsp;)*$/g,"");
}

function htmlValidate(text)
{
	if(text.match('<') || text.match('>') || text.match('php') || text.match('%') || text.match('http') ||
	 text.match('www.') || text.match('.com') || text.match('href') || text.match('img') || text.match('src') || 
	 text.match('select *') || text.match('insert into') || text.match('delete from') || text.match('hack') || 
	 text.match('h1') || text.match('h2') || text.match('h3') || text.match('h4') || text.match('///'))
	 	return false;
	else
		return true;
}
