// SHOW COMMENTS
var CommentsVisible=false;
function showComments() {
	if(!CommentsVisible) {
		$('#comments').removeClass('hide');
		$('#comments').addClass('show');
		$('#trackbacks').removeClass('show');
		$('#trackbacks').addClass('hide');
		$('#commentsLink').addClass('active');
		$('#trackbacksLink').removeClass('active');
		TrackbacksVisible=false;
	}
}

// SHOW TRACKBACKS
var TrackbacksVisible=false;
function showTrackbacks() {
	if(!TrackbacksVisible) {
		$('#comments').removeClass('show');
		$('#comments').addClass('hide');
		$('#trackbacks').removeClass('hide');
		$('#trackbacks').addClass('show');
		$('#commentsLink').removeClass('active');
		$('#trackbacksLink').addClass('active');
		CommentsVisible=false;
	}
}

function clearField(theText) {
	if (theText.value == theText.defaultValue) {
	theText.value = ""
	}
}

function showCommentField() {
	c = document.getElementById('comment');
	c.style.height="100px";
	s = document.getElementById('submitButton');
	s.style.display="block";
}

function showUserFields() {
	c = document.getElementById('comment');
	c.style.height="100px";
	u = document.getElementById('userinfo');
	u.style.display="block";
	s = document.getElementById('submitButton');
	s.style.display="block";
}

function onblurComment(theText) {
	if (theText.value == "") {
		theText.value = "Write a comment..."
		c = document.getElementById('comment');
		c.style.height="14px";
		s = document.getElementById('submitButton');
		s.style.display="none";
	}
}

function onblurCommentUser(theText) {
	if (theText.value == "") {
		theText.value = "Write a comment..."
	}
}

function onblurAuthor(theText) {
	if (theText.value == "") {
		theText.value = "Name"
	}
}

function onblurUrl(theText) {
	if (theText.value == "") {
		theText.value = "Website (optional)"
	}
}

function onblurEmail(theText) {
	if (theText.value == "") {
		theText.value = "Email (will not be published)"
	}
}

function submit() {
	document.commentform.submit();
}

