// 2004-09-21 - created - "The example just outputs the result to a text box when the page loads."
// 2004-09-24 - modified - I changed it so there's a button to do the format. Also, now pass in inputValue
function nfOpener(currentNFVersion, strCode, inputValue)
{
	msgWindow = window.open('','nfWindow','location=no,scrollbars=yes,menubar=yes,resizable=yes,width=800,height=600');
  msgWindow.document.open();
	msgWindow.document.writeln('<html>');
	msgWindow.document.writeln('<head>');
	msgWindow.document.writeln('<title>NumberFormat example</title>');
	msgWindow.document.writeln('<h2>Full example</h2>');
	msgWindow.document.writeln('<p>Below is the code from the <b>What you try is what you get</b> box plus everything else that\'s needed for a simple example.');
	msgWindow.document.writeln('<br />To try it for yourself, put this code into a new HTML file in the same directory as the ' + currentNFVersion + ' script.')
	msgWindow.document.writeln('</p>');
	msgWindow.document.writeln('<div style="background: #ffffcc;">');
	msgWindow.document.writeln('<pre>');
	msgWindow.document.writeln('&lt;html&gt;');
	msgWindow.document.writeln('&lt;head&gt;');
	msgWindow.document.writeln('&lt;title&gt;NumberFormat example&lt;/title&gt;');
	msgWindow.document.writeln('&lt;script language="JavaScript" type="text/javascript" src="' + currentNFVersion + '"&gt;&lt;/script&gt;');
 	msgWindow.document.writeln('&lt;script language="JavaScript" type="text/javascript"&gt;');
	msgWindow.document.writeln('&lt;!--');
	msgWindow.document.writeln('function formatNumber()');
	msgWindow.document.writeln('{');
	msgWindow.document.writeln('var obj = document.getElementById(\'txtExample\');');
	msgWindow.document.writeln(strCode);
	msgWindow.document.writeln('}');
	msgWindow.document.writeln('//--&gt;');
	msgWindow.document.writeln('&lt;/script&gt;');
	msgWindow.document.writeln('&lt;/head&gt;');
	msgWindow.document.writeln('&lt;form&gt;');
  msgWindow.document.writeln('&lt;input type="text" size="30" value="' + inputValue + '" id="txtExample" /&gt;');
  msgWindow.document.writeln('&lt;input type="button" value="Format" onclick="formatNumber();" /&gt;');
 	msgWindow.document.writeln('&lt;/form&gt;');
	msgWindow.document.writeln('&lt;/body&gt;');
	msgWindow.document.writeln('&lt;/html&gt;');
	msgWindow.document.writeln('</pre>');
	msgWindow.document.writeln('</div>');
	msgWindow.document.writeln('</body></html>');
	msgWindow.document.close();
}