/*
Fahrenheit-Celcius Converter in Javascript
include for Holsoft website
(c) HolSoft 2001
*/
  
function openFahrCelc() {
   win = window.open("","fahr","height=350,width=500,resizable=yes,scrollbars=no");
   win.document.write("<html><head><title>Fahrenheit-Celcius Converter</title>\n");
   win.document.write("<script language=\"JavaScript\">\n");
   win.document.write("<!--\n");
   win.document.write("function FahrToCelc() { var clcs = (document.form1.fahr.value - 32) * 5/9; document.form1.celc.value = Math.round(clcs*10)/10; }\n");
   win.document.write("function CelcToFahr() { var fhr = (document.form1.celc.value * 9/5) + 32; document.form1.fahr.value = Math.round(fhr*10)/10; }\n");
   win.document.write("//-->\n");
   win.document.write("</script></head>\n");
   win.document.write("<body bgcolor=\"#00a0ff\"><font face=\"helvetica,arial\">\n");
   win.document.write("<center><h2>Fahrenheit-Celcius Converter</h2><form name='form1'>\n");
   win.document.write("Type degrees Fahrenheit or Celcius and<br>\n");
   win.document.write("click the appropriate button to make the conversion.<p>\n");
   win.document.write("<table border=1 cellpadding=3 cellspacing=0>\n");
   win.document.write("<tr><td>degrees Fahrenheit &nbsp;&nbsp;&nbsp;</td>\n");
   win.document.write("<td><input type=text name='fahr' size=6></td>\n");
   win.document.write("<td><input type=button name='f2c' value='fahrenheit to celcius' onClick='FahrToCelc();'></td></tr>\n");
   win.document.write("<tr><td>degrees Celcius &nbsp;&nbsp;&nbsp;</td>\n");
   win.document.write("<td><input type=text name='celc' size=6></td>\n");
   win.document.write("<td><input type=button name='c2f' value='celcius to fahrenheit' onClick='CelcToFahr();'></td></tr></table></form>\n");
   win.document.write("<p><input type='button' value='close' onClick='window.close()'>\n");
   win.document.write("<p><hr width=90%><center><i><font size=-1>Holsoft (c) 2001</font></i></center>\n");
   win.document.write("</center></font></body></html>\n");
}
