	function fillBox(i) {
		var color = i

	

	//Which radio button is checked?
			if (document.theForm.useFor[0].checked) {
					document.theForm.textColor.value= color
			}else {
					document.theForm.bgColor.value= color
		}
	}

	function writePage() {
		var bodyTag = "text=&quot;" +  document.theForm.textColor.value + "&quot; bgcolor=&quot;" + document.theForm.bgColor.value + "&quot;"
		var newPage = "<html><head><title>Colors Page</title></head><BODY text="
newPage+= "'" + document.forms[0].textColor.value + "'" + " bgcolor=" + "'"  
newPage+= document.forms[0].bgColor.value + "'" + ">"  
newPage+= "<h1 align='center'>Here are your Colors</h1><p align='center'>" + bodyTag + "</p>"
newPage+= "<p>&nbsp</P><table align='center' border='2'><tr><td><H3 ALIGN='CENTER'>The Raven</H3>" 
newPage+= "<P ALIGN='CENTER'>by Edgar Allan Poe</P>" 
newPage+= "<P>Once upon a midnight dreary, while I pondered, weak and weary, </P>"  
newPage+= "<P>Over many a quaint and curious volume of forgotten lore,</P>" 
newPage+= "<P>While I nodded, nearly napping, suddenly there came a tapping, </P>"  
newPage+= "<P>As of some one gently rapping, rapping at my chamber door. </P>"  
newPage+= "<P>&quot;\'Tis some visitor,&quot; I muttered, &quot;tapping at my chamber door-</P>"   
newPage+= "<P>Only this, and nothing more.&quot;</P></td></tr></table>"
newPage+= "<!-- copyright Thomas R. Powell 2000 --></body></html>"
				//copyright Thomas R. Powell 2000

		var colorsPage 
			if (!colorsPage || colorsPage.closed) {
				colorsPage = window.open("","","width=550,height=200,top=370,left=100,scrollbars")

				colorsPage.focus()
		colorsPage.document.write(newPage)
		colorsPage.document.close()
				}
		
	}
