
function createSForm(ID, Name, Params)
{

   URLprefix = "http://data.jewishgen.org/wconnect/wc.dll?jg~jgsearch~model1~";
   
   // Populate the <FORM> parameters:
   var form = document.getElementById("sform");
   form.setAttribute ("method", "POST");
   form.setAttribute ("action", URLprefix + ID);
   
   // Set the database name:
   var d1 = document.getElementById("dbname");
   d1.innerHTML = " <I>" + Name + "</I> ";
   
   // Populate the Search Type <SELECT> pulldown:
   var sel = document.getElementById("srch2");
   var i = 1;
   if ( Params.indexOf("S") != -1 )
     {
       sel.options[i++] = new Option ("Surname -- Exact Spelling", "SE");
       sel.options[i++] = new Option ("Surname -- Starting With", "SS");
     }
   else
     {
       sel.options.length = 0;
       i = 0;
     }
     
   if ( Params.indexOf("T") != -1 )
     {
       sel.options[i++] = new Option ("Town -- Daitch-Mokotoff Soundex", "TD");
       sel.options[i++] = new Option ("Town -- Exact Spelling", "TE");
       sel.options[i++] = new Option ("Town -- Starting With", "TS");
     }

   sel.options[i++] = new Option ("Global text search of ALL fields", "GT");
}

