<!-- Show/Hide Message Box -->
function commentShow(){
	obj = document.getElementById('Commentor');
	obj.style.display= "block";
	document.frmComment.comment.focus();
	obj2 = document.getElementById('Toggler');
	obj2.disabled = "disabled";
}
function commentHide(){
	obj = document.getElementById('Commentor');
	obj.style.display= "none";
	obj2 = document.getElementById('Toggler');
	obj2.disabled = "";
}

// Look Cool!
function animate(){
	document.frmAnime.save.value = "Preparing...";
	document.frmAnime.save.disabled = true;
	window.location='scripts/articles.php?save'
}

// Character meter for Articles
function meter(length)
{
	if (length > 10000)
	{
		document.frmArticle.counter.value = (length - 10000) + " character(s) above limit";
	}
	else
	{	
		document.frmArticle.counter.value = (10000 - length) + " character(s) left";
	}
}

// Character meter for Comments
function meterC(length)
{
	if (length > 500)
	{
		document.frmComment.counter.value = (length - 500) + " character(s) above limit";
	}
	else
	{	
		document.frmComment.counter.value = (500 - length) + " character(s) left";
	}
}

// Comment Length
function commentLength()
{
	if(document.frmComment.comment.value.length < 1 || document.frmComment.comment.value.length > 500)
	{
		alert("Comments can neither be blank nor exceed 500 characters.\nYour comment is "+document.frmComment.comment.value.length+" character(s).\nPlease edit your comment and try again.");
		document.frmComment.comment.focus();
		return(false);
	}
	document.frmComment.send.value = "Submitting...";
	document.frmComment.send.disabled = true;
	document.frmComment.submit();
}

// Article Length
function entryLength()
{
	if(document.frmArticle.title.value.length < 1)
	{
		alert("Your Article MUST possess a suitable Title!");
		document.frmArticle.title.focus();
		return(false);
	}
	if(document.frmArticle.content.value.length < 1 || document.frmArticle.content.value.length > 10000)
	{
		alert("Articles can neither be blank nor exceed 10000 characters.\nYour Article is "+document.frmArticle.content.value.length+" character(s).\nPlease edit your Article and try again.");
		document.frmArticle.content.focus();
		return(false);
	}
	document.frmArticle.send.value = "Preparing...";
	document.frmArticle.send.disabled = true;
	document.frmArticle.submit();
}

// Google Tracker
//var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write("\<script src='http://www.google-analytics.com/ga.js' type='text/javascript'>\<\/script>" );

if (typeof(_gat) == "object") { 
	var pageTracker = _gat._getTracker("UA-3216877-1");
	pageTracker._initData();
	pageTracker._trackPageview();
} 
