function first() {
	window.location = "mehcomics.php?comicid=1"
}
function previous(){
	if(comic_id>1)
		comic_id--;
	window.location = "mehcomics.php?comicid=" + comic_id;
}
function random(){
	window.location = "mehcomics.php?comicid=" + Math.floor((Math.random()*(max_id))+1);
}
function next(){
	if(comic_id<max_id)
		comic_id++;
	window.location = "mehcomics.php?comicid=" + comic_id;
}
function last(){
	window.location = "mehcomics.php?comicid=" + max_id;
}
function postComment()
{
/*	var retVal = ''

		retVal += '<form action="postComment.php" method="post">';
		retVal += '	';
		retVal += '	<span class="inputName">Name:';
		retVal += '		<input class="inputNameTextbox" type="text" name="name" />';
		retVal += '	</span>';
		retVal += '	<br /><br />';
		retVal += '	<span class="inputCommentSpan">';
		retVal += '			<span class="inputCommentCaption">Comment:<br /></span>';
		retVal += '		<textarea type="text" class="inputComment" name="comment"></textarea><br />';
		retVal += '	<input class="inputCommentButton" type="submit" value="Comment" />';
		retVal += '	</span>';
		retVal += '</form>';
		document.getElementById("post").innerHTML = retVal;
*/
document.getElementById("commentform").style.visibility="visible";
}

function postReply(id)
{
	postComment();
	//alert("TODO set a global flag to keep the coment id and mark the comment form as a reply form");
	document.getElementById("comment_label").innerHTML="Post your reply";
	document.getElementById("reply_flag").value="true";
	document.getElementById("reply_to").value=id;
}
