
/*
 *  Set named param in window.location.hash
 *  e.g. setHashParam('foo','bar') navs to #foo=bar
 */
window.location.setHashParam = (function(key, value) {
  var h = {};
  if(this.hash.length > 0) {
    h = this.hash.substring(1).parseQueryString();
  } else
    h = {};
  h[key] = value;
  this.hash = Object.toQueryString(h);
}).bind(window.location);

/*
 *  Get named param from window.location.hash
 *  e.g. if hash is #foo=bar, getHashParm('foo') returns 'bar'
 */
window.location.getHashParam = (function(key) {
  if(this.hash.length > 0) {
    h = this.hash.substring(1).parseQueryString();
    return h[key];
  }
  return false;
}).bind(window.location);



/*
 * The following are deprecated funcs that used to exist in <head>
 */
function t(i) {
  var e = document.getElementById(i);
  var t = e.className;
  if (t.match('invisible')) {
    t = t.replace(/invisible/gi, 'visible');
  } else {
    t = t.replace(/visible/gi, 'invisible');
  }
  e.className = t;
}

function deleteText(passedObject){ 
  var textField_txt = passedObject;
  textField_txt.value = "";
}

