function error_check(){
				 var valid = true;
				 var error_msg = "Your comment wasn't accepted for the following reasons:<ul>";
				 
				 if(document.comment_form.username.value.length == 0){
				      error_msg = error_msg + "<li>You must enter in a username.</li>";
							valid = false;
				 }
				 
				 var email = document.comment_form.email.value; 
				 
				 if (email.length > 0){
				 		   var re = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;
      				 var v_e = re.test(email);
      				 
      				 if(!v_e){
							 			error_msg = error_msg + "<li>You entered an invalid e-mail address. You may leave this blank if you wish not to enter one. There is a spam guard on it.</li>";
										valid = false;
							 }
				 }
				 
				 if(email.length > 100){
				       error_msg = error_msg + "<li>Your e-mail address is to long. Please leave textbox blank.</li>";
							 valid = false;
				 }
				 
				 var comm = document.getElementById("comment");
				 if(comm.value.length == 0){
				       error_msg = error_msg + "<li>You must make some sort of comment.</li>";
							 valid = false;
				 }
				 if(comm.value.length > 3000){
				       error_msg = error_msg + "<li>Your comment was over the 3000 character limit. Please trim it down.</li>";
							 valid = false;
				 }
				 error_msg = error_msg + "</ul>";
				 
				 if(!valid){
				     document.getElementById("js_errors").innerHTML = error_msg;
				 }
				 
				 return valid;
}

function addSmilie(text, box){
				 var object = document.getElementById(box);
				 object.value += text + " ";
				 object.focus();			 
}

function ipPop(url){
				 window.open(url, "ipPop", "status=0,width=125,height=25,resizeable=0,scrollbars=0");
}

function confirmdelete(){
				 var con = confirm("Are you sure you want to delete this comment?");
				 
				 if (con){
				 		return true;
				 } else {
				 	  return false;
				 }
}