/* wpscript.js
 * web access helpers
 * Copyright (c) Robert Forsyth 2009. You may copy, enhance and use this document
 * in any non-comercial application, so long as you credit the previous authors.
 * Enhancements and corrections should be supplied back to the previous authors.
 * Ver Date       Author
 *  1  2009-09-26 Robert Forsyth
 */
/*
 * uriform, uriproto, uriaddr, urigo
 */
function dbgalert(s)
{
  //alert(s);
}
function gouri()
{
  var f=document.getElementById("uriform"); // form
  var p=document.getElementById("uriproto"); // protocol selection
  var a=document.getElementById("uriaddr"); // address
  var s=document.getElementById("urigo"); // submit button
  dbgalert(f); dbgalert(f.value);
  dbgalert(p); dbgalert(p.value);
  dbgalert(a); dbgalert(a.value);
  dbgalert(s); dbgalert(s.value);
  if(f)
  {
    var o="";
    if(s && s.value=="OK")
    {
      if(p)
      {
	o=o+p.value;
      }
      if(a)
      {
	o=o+a.value;
      }
    }
    if(o && o!="")
    {
      dbgalert(o);
      dbgalert(window.location.href);
      window.location.href=o;
    }
  }
  return false;
}
dbgalert("Script");

