function CreateLocationSearchValue(q, key, value) {
  var keyValuePairs = new Array();
  var found = false;
  var index = 0;

  if (q.substring(0, 1) == '?')
    {q = q.substring(1, q.length);}

  if (q) {
    for (var i = 0; i < q.split("&").length; i++) { 
      keyValuePairs[i] = new Array();
      keyValuePairs[i][0] = q.split("&")[i].split("=")[0];
      keyValuePairs[i][1] = q.split("&")[i].split("=")[1];
      if (keyValuePairs[i][0] == key) {
        found = true;
        if (value == "") {
          keyValuePairs.splice(i, 1);
        } else {
          keyValuePairs[i][1] = value;
        }
      }
    }
  }

  if (!found) {
    if (keyValuePairs)
      index = keyValuePairs.length;
    keyValuePairs[index] = new Array();
    keyValuePairs[index][0] = key;
    keyValuePairs[index][1] = value;
  }

  if (keyValuePairs.length > 0) {
    q = '';
    for (var i = 0; i < keyValuePairs.length; i++) {
      if (i==0)
        q = q + '?';
      else
        q = q + '&';
      q = q + keyValuePairs[i][0] + '=' + keyValuePairs[i][1];
    }
  }
  return q;
}

function nav(aKey, aValue, bKey, bValue) {
  document.forms['frmMenu'].elements[aKey].value = aValue;
  if (bKey) {
    document.forms['frmMenu'].elements[bKey].value = bValue;
  }
  document.forms['frmMenu'].submit();
}

function SetLocationSearchValue(aKey, aValue) {
  nav(aKey, aValue);
}

function SetLocationSearchValues(key1, value1, key2, value2) {
  nav(key1, value1, key2, value2);
}

function disableitem(aformitem) {
  aformitem.disabled = true;
}

function Browser() {
  var ua, s, i;
  this.isIE = false;
  this.isNS = false;
  this.version = null;
  ua = navigator.userAgent;

  s = "MSIE";
  if((i = ua.indexOf(s)) >= 0) {
    this.isIE = true;
    this.version = parseFloat(ua.substr(i + s.length));
    return;
  }

  s="Netscape6/";
  if((i = ua.indexOf(s)) >= 0) {
    this.isNS = true;
    this.version = parseFloat(ua.substr(i + s.length));
    return;
  }

  s="Gecko";
  if((i = ua.indexOf(s)) >= 0) {
    this.isNS = true;
    this.version = 6.1;
    return;
  }
}
var browser=new Browser();  
  
