
// ---------------------------------------------------------------------------

function ShowLights(pname)

{
  var title=new String();
  if(pname=="../pictures/Lights/fix_w.gif") title="F W";
  if(pname=="../pictures/Lights/occ3_w.gif") title="Oc(3) W";
  if(pname=="../pictures/Lights/fl2_w.gif") title="Fl(2) W";
  if(pname=="../pictures/Lights/iso_w.gif") title="Iso W";
  if(pname=="../pictures/Lights/qfl1_w.gif") title="Q W";
  if(pname=="../pictures/Lights/qfl3_w.gif") title="IQ(3) W";
  if(pname=="../pictures/Lights/vqfl1_w.gif") title="VQ W";
  if(pname=="../pictures/Lights/vqfl2_w.gif") title="IVQ(2) W";
  if(pname=="../pictures/Lights/vqfl3_w.gif") title="VQ(3) W";
  if(pname=="../pictures/Lights/vqfl6bl_w.gif") title="VQ(6)+LFl W";
  if(pname=="../pictures/Lights/vqfl9_w.gif") title="VQ(9) W";

  var litwin=window.open("","","scrollbars=no,resizable=no,innerWidth=200,innerHeight=175");
  litwin.document.open("text/html");
  litwin.document.writeln("<HTML>");
  litwin.document.writeln("<BODY bgcolor='#000000' text='#000066'>");
  litwin.document.writeln("<CENTER>");
  litwin.document.writeln("<FONT color='#FFFFFF'><H4>"+title+"</H4></FONT>");
  litwin.document.writeln("<IMG src='"+pname+"' width='100' height='76'><HR>");
  
  litwin.document.writeln("<FORM>");
  litwin.document.writeln("<INPUT type=button onClick=self.close() value='close this window'>");
  litwin.document.writeln("</FORM>");
  litwin.document.writeln("</CENTER>");

  litwin.document.writeln("</BODY>");
  litwin.document.writeln("</HTML>");
  litwin.document.close();

  return;
}

function Lights()

{ 

  var litwin=window.open("","","scrollbars=no,resizable=no,innerWidth=280,innerHeight=320");
  litwin.document.open("text/html");
  litwin.document.writeln("<HTML>");
  litwin.document.writeln("<HEAD>");
  litwin.document.writeln("<SCRIPT language='JavaScript' src='../jscripts/js_lights.js' type='text/javascript'></SCRIPT>");
  litwin.document.writeln("</HEAD>");
  litwin.document.writeln("<BODY bgcolor='#000000' text='#FFFFFF'>");
  litwin.document.writeln("<CENTER><H3>Interactive Lights Trainer</H3>");
  litwin.document.writeln("<hr> <br><p id='label'><b>F W</b></p>");
  litwin.document.writeln("<IMG src='../pictures/Lights/fix_w.gif' width='100' height='76'><BR> <BR><HR>");
  litwin.document.writeln("<TABLE border='0' cellpadding='4' cellspacing='0' bgcolor='#CCCCCC'>");
  litwin.document.writeln("<TR><TH><FONT color='#000066'>Type</FONT></TH>");
  litwin.document.writeln("<TH><FONT color='#000066'>(group)</FONT></TH>");
  litwin.document.writeln("<TH><FONT color='#000066'>color</FONT></TH></TR>");
  litwin.document.writeln("<TR><FORM name='LForm'>");
  litwin.document.writeln("<TD align=center><FONT color='#000066'>");
  litwin.document.writeln("  <SELECT name='type' onChange='UpdateLights()'>");
  litwin.document.writeln("    <OPTION value='fix'>fixed</OPTION>");
  litwin.document.writeln("    <OPTION value='iso'>iso</OPTION>");
  litwin.document.writeln("    <OPTION value='occ'>occulting</OPTION>");
  litwin.document.writeln("    <OPTION value='fl'>flashing</OPTION>");
  litwin.document.writeln("    <OPTION value='qfl'>quick flashing</OPTION>");
  litwin.document.writeln("  </SELECT></FONT></TD>");
  litwin.document.writeln("<TD align=center><FONT color='#000066'>");
  litwin.document.writeln("  <SELECT name='group' onChange='UpdateLights()'>");
  litwin.document.writeln("    <OPTION value='1'>1</OPTION>");
  litwin.document.writeln("    <OPTION value='2'>2</OPTION>");
  litwin.document.writeln("    <OPTION value='3'>3</OPTION>");
  litwin.document.writeln("  </SELECT></FONT></TD>");
  litwin.document.writeln("<TD align=center><FONT color='#000066'>");
  litwin.document.writeln("  <SELECT name='color' onChange='UpdateLights()'>");
  litwin.document.writeln("    <OPTION value='w'>white</OPTION>");
  litwin.document.writeln("    <OPTION value='g'>green</OPTION>");
  litwin.document.writeln("    <OPTION value='r'>red</OPTION>");
  litwin.document.writeln("  </SELECT></FONT></TD>");
  litwin.document.writeln("</FORM></TR>");
  litwin.document.writeln("</TABLE>");
  litwin.document.writeln("<FORM><HR><FONT color='#000066'>");
  litwin.document.writeln("<INPUT type=button onClick=self.close() value='close this window'>");
  litwin.document.writeln("</FONT></CENTER></FORM>");
  litwin.document.writeln("</BODY>");
  litwin.document.writeln("</HTML>");
  litwin.document.close();

  return;
}


function UpdateLights()

{
  var fname=new String("../pictures/Lights/");
  var label=new String();

  fname=fname.concat(document.LForm.type.value);
  if(document.LForm.type.value!="fix") fname=fname.concat(document.LForm.group.value);
  fname=fname.concat("_"+document.LForm.color.value);
  fname=fname.concat(".gif");

                                       label="F";
  if(document.LForm.type.value=="iso") label="Iso";
  if(document.LForm.type.value=="occ") label="Oc";
  if(document.LForm.type.value=="fl") label="Fl";
  if(document.LForm.type.value=="qfl") label="QFl ";

  if((document.LForm.group.value!="1")&&(document.LForm.type.value!="fix"))
    label=label.concat("("+document.LForm.group.value+") ");
    else 
      label=label.concat(" ");
  
  label=label.concat(document.LForm.color.value.toUpperCase());


  document.images[0].src=fname;
  document.getElementById('label').innerHTML = label.bold();
//document.getElementById('label').innerHTML = fname.bold();
 
  return;
}

