function removeHTMLTags()
{
	if(document.getElementById && document.getElementById("input-code"))
	{
		var strInputCode = document.getElementById("input-code").innerHTML;
		/*
			This line is optional, it replaces escaped brackets with real ones, 
			i.e. &lt; is replaced with < and &gt; is replaced with >
		*/
		strInputCode = strInputCode.replace(/&(lt|gt);/g, function (strMatch, p1){
			return (p1 == "lt")? "<" : ">";
		});
		var strTagStrippedText = strInputCode.replace(/<\/?[^>]+(>|$)/g, "");
		alert("Input code:\n" + strInputCode + "\n\nOutput text:\n" + strTagStrippedText);	
	}
}
