	function addTag(open,close,question)
	{
		chars = prompt( question, "" );
		if( chars )
		{
			document.forms["submitcomment"].comment_box.value += open;
			document.forms["submitcomment"].comment_box.value += chars;
			document.forms["submitcomment"].comment_box.value += close;				
		}
	}

  function validate(form)
  {
    if(form.comment.value.length == 0)
	  {
		  alert("You have to type something in the comment field");
		  form.comment.focus();
		  return false;
	  }
  }

	function make_red()
	{
		addTag( '{r}', '{/r}', "Type text to make red" );
		document.forms[ "submitcomment" ].comment.focus();
		return false;
	}
	
	function make_green()
	{
		addTag( '{g}', '{/g}', "Type text to make green" );
		document.forms[ "submitcomment" ].comment.focus();
		return false;
	}

	function make_blue()
	{
		addTag( '{b}', '{/b}', "Type text to make blue" );
		document.forms[ "submitcomment" ].comment.focus();
		return false;
	}

	function make_orange()
	{
		addTag( '{o}', '{/o}', "Type text to make orange" );
		document.forms[ "submitcomment" ].comment.focus();
		return false;
	}

	function make_yellow()
	{
		addTag( '{y}', '{/y}', "Type text to make yellow" );
		document.forms[ "submitcomment" ].comment.focus();
		return false;
	}

	function make_purple()
	{
		addTag( '{p}', '{/p}', "Type text to make yellow" );
		document.forms[ "submitcomment" ].comment.focus();
		return false;
	}
		
	function make_bold()
	{
		addTag( '[b]', '[/b]', "Type text to make bold" );
		document.forms[ "submitcomment" ].comment.focus();
		return false;
	}

	function make_italic()
	{
		addTag( '[i]', '[/i]', "Type text to make italic" );
		document.forms[ "submitcomment" ].comment.focus();
		return false;
	}

	function make_strike()
	{
		addTag( '[s]', '[/s]', "Type text to strike through" );
		document.forms[ "submitcomment" ].comment.focus();
		return false;
	}

	function make_uline()
	{
		addTag( '[u]', '[/u]', "Type text to underline" );
		document.forms[ "submitcomment" ].comment.focus();
		return false;
	}

	function make_piclink()
	{
		addTag( '[pic]', '[/pic]', "Type picture number to link to" );
		document.forms[ "submitcomment" ].comment.focus();
		return false;
	}
	
	function Reply( parentID, repID )
	{
		if( document.forms[ "submitcomment" ] )
		{
			document.forms[ "submitcomment" ].parent.value  = parentID;
			document.forms[ "submitcomment" ].reply_id.value  = repID;
			document.forms[ "submitcomment" ].rep_id.value  = repID;
		  document.forms[ "submitcomment" ].comment.focus();
		}
	}