function showblock(me){
if (document.getElementById(me).style.display=="block"){
	document.getElementById(me).style.display="none";}
else {
	document.getElementById(me).style.display="block";
	}
}

function comsubmit(id) {

	var comauthor = $("#comauthor" + id).val();

	var comment = $("#comment" + id).val();
	
	var artid = $("#artid" + id).val();
	
	var showid = $("#showid" + id).val();

    var dataString = 'comauthor='+ comauthor + '&comment=' + comment + '&artid=' + artid + '&showid=' + showid;
	if(comauthor=='' || comment=='')
     {
    	alert('Please Fill Both Boxes');
     }
	else
	{
		document.getElementById('comauthor' + id).value="";
		document.getElementById('comment' + id).value="";
				
		$.ajax({
			type: "POST",
			url: "includes/commentajax.php",
			data: dataString,
		 	cache: false,
			success: function(html)
			{	  
				$("ol#comupdate" + id).append(html);
				$("ol#comupdate" + id + " li:last").fadeIn("slow");
				
				if(document.getElementById('commentbox' + id).style.display=="none")
				{
					$("#commentbox" + id ).fadeIn("slow");
			  	}
				
				$("#commentsubbox" + id ).fadeOut("slow");
			}
	 	});
	}
return false;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
