//  <form action="/Tsearch" method="GET">
//  <input name="title" size=25>
//  <select NAME="restrict">
//    <option>Movies and TV
//    <option>Movies only
//    <option>TV only
//  </select>

  function submitToImdb() {
    top.theTarget.location = "http://us.imdb.com/Tsearch?title=" +
    document.forms["theVisible"].elements["input1"].value +
    "&restrict=Movies+and+TV";
  }

//  var imdbButton = document.createElement("Input");
//  imdbButton.type = "button";
//  imdbButton.onclick = submitToImdb;
//  imdbButton.value = "IMDB(T)";
//  document.getElementById("theForm").appendChild(imdbButton);

  document.write('<INPUT TYPE="button" onClick=submitToImdb() VALUE="IMDB(T)">');


// <form action="/Nsearch" method="POST">
// <input name="name" size=25>
// <select NAME="occupation">
// <option>All professions ...

  function submitToImdbP() {
    var first = true;
    if (first) {
      var imdbPForm = document.createElement("Form");
      imdbPForm.name = "imdbPForm";
      imdbPForm.action = "http://us.imdb.com/Nsearch";
      imdbPForm.method = "POST";
      imdbPForm.target = "_top";

      imdbPFormInputName = document.createElement("Input");
      imdbPFormInputName.type = "hidden";
      imdbPFormInputName.name = "name";
      imdbPForm.appendChild(imdbPFormInputName);

      imdbPFormInputOcc = document.createElement("Input");
      imdbPFormInputOcc.type = "hidden";
      imdbPFormInputOcc.name = "occupation";
      imdbPFormInputOcc.value = "All+professions";
      imdbPForm.appendChild(imdbPFormInputOcc);

      document.body.appendChild(imdbPForm);
      
      first = false;
    }
    document.forms["imdbPForm"].elements["name"].value =
      document.forms["theVisible"].input1.value;
    var targetName = new String;
    if (top.theTarget == top) {targetName = "_top";}
    else {targetName = "bobContent";}
    document.forms["imdbPForm"].target = targetName;
    document.forms["imdbPForm"].submit();
  }

//  var imdbPButton = document.createElement("Input");
//  imdbPButton.type = "button";
//  imdbPButton.onclick = submitToImdbP;
//  imdbPButton.value = "IMDB(P)";
//  document.getElementById("theForm").appendChild(imdbPButton);

  document.write('<INPUT TYPE="button" onClick=submitToImdbP() VALUE="IMDB(P)">');
