var limit=150;

 function check() {
   if(document.frm.q.value.length > limit) {
     alert('Please type your comment within the specified limit (' + limit + ' characters.)');
     document.frm.q.focus();
	 
     return false; }
   else

if (document.getElementById && !document.all)
{
	//alert("You are using Firefox or NS6+")//3) Detect Opera 6+ exclusively
   //alert(document.getElementsByName('post_comment_frame')[0].src);
   document.getElementsByName('post_comment_frame')[0].src="http://www.usercommentary.com/post/post_comment.aspx?q=" +document.frm.q.value + "&srcurl=" + window.location.hostname;
}
 else if (document.getElementById)
{
	//alert("You are using a modern browser that supports the DOM")//2) Detect Firefox (and NS6+) exclusively
	document.getElementById('post_comment_frame').src="http://www.usercommentary.com/post/post_comment.aspx?q=" +document.frm.q.value + "&srcurl=" + window.location.hostname;
   //alert(document.getElementById('post_comment_frame').src);
}
else
{
	alert("Your browser is currently not supported!")
}//document.getElementByName('post_comment_frame').src="http://www.usercommentary.com/post/post_comment.aspx?q=" +document.frm.q.value + "&amp;srcurl=" + window.location.hostname;
	var messge="We thank you for your contribution to our collaborative effort for user commentary; our editors would approve the comment, before it is published.\n\nWe would also like to inform you that during a cricket match it takes anywhere between one (1) minute to thirty (30) minutes, before the comment is actually published, else it would take up to four (4) hours to publish your comments. \n\nAll rights are reserved with us, and our decision is final on the posts which we allow to be published on our site."
	alert(messge);
	document.frm.q.value='';
	document.frm.q.focus();
   //document.getElementById('message').innertext="message posted succefully!";
   //alert(document.getElementById('post_comment_frame').src);
   	//document.post_comment.src='http://www.google.com';
     return false; }
function update() {
   var old = document.frm.counter.value;
   document.frm.counter.value=document.frm.q.value.length;
   if(document.frm.counter.value > limit && old <= limit) {
	alert('Please type your comment within the specified limit (' + limit + ' characters.)');
     if(document.styleSheets) {
       document.frm.counter.style.fontWeight = 'bold';
       document.frm.counter.style.color = '#ff0000'; } }
   else if(document.frm.counter.value <= limit && old > limit
	   && document.styleSheets ) {
       document.frm.counter.style.fontWeight = 'normal';
       document.frm.counter.style.color = '#000000'; } 
   }
document.write("<table width=\"620\" cellspacing=\"0\" cellpadding=\"0\"><tr><td><img src=\"http://www.usercommentary.com/images/uc_banner_start_comments.gif\" width=\"620\" height=\"52\" /></td></tr><tr><td style=\"border: solid #FFCC00 1px;background-color:#FFF5CC;\">");
document.write("<form name=\"frm\" onSubmit=\"return check();\" style=\"margin:0px;\" ><div style=\"width:100%;;margin-top:5px;\" align=\"center\">");
document.write("<textarea name=\"q\" style=\"width:570px;height:34px;border:1px solid #CCCCCC;vertical-align:middle;font-family:verdana;font-size:10px\"  onkeyup=\"update();\"></textarea>");
document.write("<input name=\"post_comment\" type=\"image\" src=\"http://www.usercommentary.com/images/bt_post.gif\" style=\"vertical-align:middle;\" alt=\"Type your comment and press POST button to submit.\" /><br />");
document.write("<div style=\"font-family:verdana;font-size:10px;padding:5px;\" align=\"left\">Characters typed: <input type=\"text\" size=\"3\" name=\"counter\" value=\"0\" \"readonly\" onfocus=\"this.form.box.focus()\" style=\"border:none;background-color:#FFF5CC;\"> (limit: " + limit + ")</div>");
document.write("</div></form>");
document.write("<iframe name=\"post_comment_frame\" id=\"post_comment_frame\" src=\"\" application=\"yes\" style=\"visibility:hidden\"  width=\"1\" height=\"1\"  ></iframe></td></tr></table>")