/************************************************************\
*
*		freeCap v1.3 Copyright 2005 Howard Yeend
*		www.puremango.co.uk
*
*    This function is part of freeCap.
*
*    freeCap is distributed in the hope that it will be useful,
*    but WITHOUT ANY WARRANTY; without even the implied warranty of
*    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*    GNU General Public License for more details.
*
*
\************************************************************/

function new_freecap()
{
	// loads new freecap image
	if(document.getElementById)
	{
		// extract image name from image source (i.e. cut off ?randomness)
		thesrc = document.getElementById("freecap").src;
		thesrc = thesrc.substring(0,thesrc.lastIndexOf(".")+4);
		// add ?(random) to prevent caching
		document.getElementById("freecap").src = thesrc+"?"+Math.round(Math.random()*100000);
	} else {
		alert("Sorry, cannot autoreload freecap image\nSubmit the form and a new freecap will be loaded");
	}
}


function addTag(oTag, cTag, oText)
{
 msg = prompt(oText, \"\");
 if(msg)
 {
	document.forms[\"respond\"].comment.focus();
	document.forms[\"respond\"].comment.value += oTag;
	document.forms[\"respond\"].comment.value += msg;
	document.forms[\"respond\"].comment.value += cTag;
 }
 return false;
}
