<HTML>
<HEAD>
<TITLE>A function definition</TITLE>
<SCRIPT LANGUAGE="JavaScript"><!--
function displayTaggedText(tag, text) {
document.write("<"+tag+">")
document.write(text)
document.write("</"+tag+">")
}
// -->
</SCRIPT>
</HEAD>
<BODY>
<SCRIPT LANGUAGE="JavaScript"><!--
displayTaggedText("H1","This is a level 1 heading")
displayTaggedText("P","This text is the first paragraph of the document.")
// -->
</SCRIPT>
</BODY>
</HTML>