  var theAgent = navigator.userAgent.toLowerCase();
  var browserVersion = navigator.appVersion;
  var netscape = ((theAgent.indexOf('mozilla')!=-1) &&
      ((theAgent.indexOf('spoofer')==-1) && (theAgent.indexOf('compatible') == -1)));
  var ie   = (theAgent.indexOf("msie") != -1);
  var ns4 = (document.layers)? true:false;
  var ie4 = (document.all)? true:false;
  var ns6 = theAgent.indexOf('netscape6') != -1;

  function jumpTo(form) {
    var ndx = form.shortcuts.selectedIndex;
    var link = form.shortcuts.options[ndx].value;
    if (link.length > 0) {
      window.location=link;
    }
    return true;
  }


  function verifyLicense(theForm) {
  if (theForm.name.value == "")
  {
    alert("Please enter a value for the \"name\" field.");
    theForm.name.focus();
    return (false);
  }

  if (theForm.email.value == "")
  {
    alert("Please enter a value for the \"email\" field.");
    theForm.email.focus();
    return (false);
  }
  return (true);
  }


  function verifyFeedback(theForm) {
    if (theForm.name.value == "") {
      alert("Please enter a value for the \"name\" field.");
      theForm.name.focus();
      return (false);
    }
    if (theForm.company && theForm.company.value == "") {
      alert("Please enter a value for the \"company\" field.");
      theForm.company.focus();
      return (false);
    }
  
    if (theForm.phone && theForm.phone.value == "") {
      alert("Please enter a value for the \"phone\" field.");
      theForm.phone.focus();
      return (false);
    }
    if (theForm.email.value == "") {
      alert("Please enter a value for the \"email\" field.");
      theForm.email.focus();
      return (false);
    }
    if (theForm.url && theForm.url.value == "") {
      alert("Please enter a value for the \"url\" field.");
      theForm.url.focus();
      return (false);
    }
  
    if (theForm.subject && theForm.subject.value == "") {
      alert("Please enter a value for the \"subject\" field.");
      theForm.subject.focus();
      return (false);
    }
    return (true);
    if (theForm.comments && theForm.comments.value == "") {
      alert("Please enter a value for the \"comments\" field.");
      alert("Please enter a value for the \"comments\" field.");
      theForm.comments.focus();
      return (false);
    }
    return (true);
  }


  function keyGoogle(e) {
    var unicode = e.charCode? e.charCode : e.keyCode
    if (unicode == 10 || unicode == 13) searchGoogle();
    return true;
  }
  function searchGoogle() {
    theForm = document.forms['google'];
    if (theForm.q.value == "") {
      alert("Please enter a value for the \"search\" field.");
      theForm.q.focus();
      return (false);
    }
    theForm.q.value = 'site:www.plexobject.com ' + theForm.q.value;
    theForm.submit();
  }


function getsoftware(form) {
    var ndx = form.platform.selectedIndex;
    var file = form.platform.options[ndx].value;
    if (file.length <= 0) {
       return;
    }
    if (file.indexOf(".jnlp") != -1) {
      if (confirm("Have you already downloaded and installed Java Web Start?")) {
        createWin(file);
      } else {
        alert("Please download Java Web Start from http://java.sun.com");
	//history.go(-1);
        return;
      }
    } else {
      createWin(file);
    }
}
