function gbid(id) {
  return document.getElementById(id);
}
function createRequest() {
  var _2 = false;
  try {
    _2 = new ActiveXObject("Msxml2.XMLHTTP");
  } catch(e) {
    try {
      _2 = new ActiveXObject("Microsoft.XMLHTTP");
    } catch(E) {}
  }
  if (!_2 && typeof XMLHttpRequest != "undefined") {
    try {
      _2 = new XMLHttpRequest();
    } catch(e) {}
  }
  return _2;
}
function sendRequest(_3, _4, _5) {
  var _6 = createRequest();
  if (!_6) {
    return;
  }
  if (!_4) {
    _4 = "GET";
  }
  if (typeof(_5) == "function") {
    _6.onreadystatechange = function() {
      _5(_6);
    };
  }
  _6.open(_4.toUpperCase(), _3, true);
  _6.send(null);
}
function hit(_7) { (new Image()).src = _7;
}
/*function rpc(_8, _9) {
  if (document.images) { (new Image()).src = _8 + "&zr=" + rand();
  }
}
*/
function redirect(_a, s) {
  if (!s) {
    s = "";
  }
  return "/url?q=" + urlencode("http" + s + "://" + _a);
}
function logError(_c, _d, _e) {
  var _f = "/rpc/log?a=jserr&msg=" + urlencode(_c) + "&url=" + urlencode(_d) + "&line=" + _e;
  if (Image) { (new Image()).src = _f;
  }
}
logError.errorCount = 0;
window.onerror = function(msg, url, _12) {
  if (logError.errorCount == 0) {
    logError(msg, url, _12);
  }
  logError.errorCount++;
  return false;
};
function jsvPage(tk) {
  if (tk && document.images) {
    var s = "/",
    q = "?",
    a = "&",
    e = "="; (new Image()).src = s + "rpc" + s + "log" + q + "a" + e + "jsv" + a + "tk" + e + tk;
  }
}
function urlencode(url) {
  return escape(url).replace(/\+/g, "%2B").replace(/\//g, "%2F").replace(/%20/g, "+");
}
function urlUnescape(s) {
  s = s.replace(/\+/g, " ");
  return unescape(s);
}
function rand() {
  return Math.floor(Math.random() * 2147483647);
}
function sts(w) {
  window.status = w;
  return true;
}
function _st(el) {
  if (el) {
    window.status = String(el.innerHTML);
  }
}
function cls() {
  window.status = "";
}
function getc(a) {
  var ck = String(document.cookie);
  var pos = ck.indexOf(a + "=");
  if (pos == -1) {
    return "";
  }
  var d = ck.indexOf(";", pos);
  return ck.substring(pos + a.length + 1, d == -1 ? ck.length: d);
}
function setck(_20, id, st) {
  if (!_20) {
    return;
  }
  var ck = getc(_20);
  var val = ":" + id;
  if (ck.indexOf(val) < 0) {
    ck += val + st;
  } else {
    var _25 = new RegExp(val + "[SR]", "gi");
    ck = ck.replace(_25, "");
  }
  document.cookie = _20 + "=" + ck + "; path=/";
}
function getCookie(_26) {
  return unescape(getc(_26));
}
function setCookie(_27, _28, _29) {
  var cs = _27 + "=" + escape(_28) + "; path=/" + ((_29) ? "; expires=" + _29.toGMTString() : "");
  document.cookie = cs;
}
function getOpenSectionsCookie() {
  var _2b = getCookie("openSections");
  if (!_2b) {
    return "";
  }
  return _2b;
}
function setOpenSectionsCookie(val) {
  var _2d = new Date();
  _2d.setYear(_2d.getFullYear() + 1);
  setCookie("openSections", val, _2d);
}
var openClass = "rbOpen";
var openAllClass = "showAll";
function openRefineBy(_2e) {
  var el = gbid(_2e);
  el.className = "rbSection rbOpen";
}
function closeRefineBy(_30) {
  var el = gbid(_30);
  el.className = "rbSection";
  showDefaultRefinements(_30);
}
function toggleRefineBy(_32) {
  if (!hasClass(gbid(_32), openClass)) {
    openRefineBy(_32);
  } else {
    closeRefineBy(_32);
  }
  rememberSectionDisplay(_32);
}
function showAllRefinements(_33) {
  addClass(gbid(_33), openAllClass);
}
function showDefaultRefinements(_34) {
  removeClass(gbid(_34), openAllClass);
}
function rememberSectionDisplay(id) {
  var _36 = getOpenSectionsCookie();
  if (_36.match(":" + id + "(:|$)") == null) {
    _36 += ":" + id;
  } else {
    _36 = _36.replace(":" + id, "");
  }
  setOpenSectionsCookie(_36);
}
function renderFilterCrumbsHorizontal() {
  var _37 = gbid("activefilters");
  if (_37) {
    var _38 = gbid("activefiltershorizontal");
    if (_38.innerHTML == "") {
      _38.innerHTML = _37.innerHTML;
    }
    _38.style.display = "";
  }
}
function unRenderFilterCrumbsHorizontal() {
  var _39 = gbid("activefiltershorizontal");
  if (_39) {
    _39.style.display = "none";
  }
}
function hideRefineByColumn() {
  gbid("showrefine").style.display = "";
  var id = "refineresults";
  var _3b = getOpenSectionsCookie();
  _3b = _3b.replace(":" + id, "");
  setOpenSectionsCookie(_3b);
  renderFilterCrumbsHorizontal();
  gbid("refineresultscol").style.display = "none";
}
function showRefineByColumn() {
  var id = "refineresults";
  var _3d = getOpenSectionsCookie();
  if (_3d.match(":" + id + "(:|$)") == null) {
    _3d += ":" + id;
  }
  setOpenSectionsCookie(_3d);
  unRenderFilterCrumbsHorizontal();
  gbid("showrefine").style.display = "none";
  gbid("refineresultscol").style.display = "";
}
function delSearchCookie() {
  document.cookie = "RQ=Stub;expires=" + (new Date(0)).toGMTString();
  var _3e = gbid("recentsearches");
  if (_3e) {
    _3e.parentNode.removeChild(_3e);
  }
}
function hasAjax() {
  if (!createRequest()) {
    return false;
  }
  return true;
}

function setel(id, vis) {
  var el = gbid(id);
  if (el) {
    el.style.display = vis ? "inline": "none";
  }
}
function setnone(id, vis) {
  var el = gbid(id);
  if (el) {
    el.style.display = vis ? "": "none";
  }
}
function blur(id) {
  var el = gbid(id);
  if (el && el.blur) {
    el.blur();
  }
}
var defaultTagsMessage = "e.g., applied, interviewed, etc. (optional)";
var defaultNotesMessage = "Add a note. (optional)";
var myckname ;
function restore(_70, _71, _72) {
  myckname = _70;
  var ck = getc(myckname);
  if (ck == "") {
    return;
  }
  var e = ck.split(":");
  for (var i = 0; i < e.length; i++) {
    var len = e[i].length;
    if (len == 0) {
      continue;
    }
    var st = e[i].charAt(len - 1);
    var id = e[i].substring(0, len - 1);
    if (st == "S") {
      savelisting(id, true, _71, _72);
      showSaveLink(id, true, _71, _72);
    } else {
      if (st == "R") {
        removelisting(id, false, true, _71, _72);
        showSaveLink(id, false, _71, _72);
      }
    }
  }
}
function savelisting(id, _7a, _7b, _7c) {
  blur("sj_" + id);
  showSaveLink(id, true, _7b, _7c);
  var el = gbid("addedit2_" + id);
  try{
	  if (!_7a) {
	    setck(myckname, id, "S");
	  }
	  cls();
  }
  catch(e){}
}
function removelisting(id, _7f, _80, _81, _82) {
  if (_7f) {
    if (!confirm("This listing has saved notes -- do you still want to remove it?")) {
      return;
    }
    var el = gbid("lbl_" + id);
    if (el) {
      el.value = "";
    }
  }
  var _84 = gbid("tags_" + id);
  if (_84) {
    _84.parentNode.removeChild(_84);
  }
  blur("rj_" + id);
  var el = gbid("addedit2_" + id);
  el.innerHTML = "";
  showSaveLink(id, false, _81, _82);
  if (!_80) {
    //rpc("/rpc/update?a=remove&jk=" + id, true);
    setck(myckname, id, "R");
    editsavedlisting(id, false, _81);
  }
  cls();
}
function cancel(id, _86) {
  editsavedlisting(id, false, _86);
}
function getnotes(id) {
  var _88 = gbid("bnotes_" + id);
  return _88 ? _88.innerHTML: "";
}
function gettags(id) {
  var _8a = gbid("tg_" + id);
  return _8a ? _8a.value: "";
}
function editsavedlisting(id, _8c, _8d) {
  var _8e = getnotes(id);
  var _8f = gettags(id);
  setnone("tags_" + id, !_8c);

  var _90 = gbid("editlink_" + id);
  if (_90) {
    if (_90.blur) {
      _90.blur();
    }
    if (!_8c) {
      removeClass(_90, "ws_label_open");
      if (_8e != "") {
        _90.innerHTML = "edit notes";
      } else {
        _90.innerHTML = "add notes";
      }
    } else {
      addClass(_90, "ws_label_open");
    }
    _90.onclick = function() {
      editsavedlisting(id, !_8c, _8d);
    };
  }
  if (_8c) {
    var el = gbid("lbl_" + id);
    if (el.value.length == 0) {
      el.style.color = "gray";
      el.value = defaultTagsMessage;
    }
    el = gbid("notes_" + id);
    if (el.value.length == 0) {
      el.style.color = "gray";
      el.value = defaultNotesMessage;
    }
  }
}
function showSaveLink(id, _93, _94, _95) {
  var el = gbid("savelink2_" + id);
try{
	  if (!_93) {
	    el.innerHTML = "<span id=\"sj_" + id + "\" class=\"sl\" onclick=\"savelisting('" + id + "',false,'" + _94 + "','" + _95 + "')\" title=\"Save this listing to my.boomi\" onmouseover=\"_st(this);\" onmouseout=\"cls()\">save listing</span> - ";
	  } else {
	    el.innerHTML = getSavedHtml(id, false, _94, _95);
	  }
  }
  catch(e){}
}

function getSavedHtml(id, _a0, _a1, _a2) {
  return "<span class=\"saved\"><b>saved</b> to <a class=\"uv_link\" href=\"myboomi.php?" + _a2 + "\">my.boomi</a> </span>" + "- <span id=\"rj_" + id + "\" class=\"sl\" onclick=\"removelisting('" + id + "'," + _a0 + ",false,'" + _a1 + "','" + _a2 + "')\" onmouseover=\"_st(this);\" onmouseout=\"cls()\">remove</span> ";
}

function addClass(_d5, _d6) {
  if (!hasClass(_d5, _d6)) {
    if (_d5.className) {
      _d5.className += " " + _d6;
    } else {
      _d5.className = _d6;
    }
  }
}
function removeClass(_d7, _d8) {
  var _d9 = new RegExp("(^|\\s)" + _d8 + "(\\s|$)");
  _d7.className = _d7.className.replace(_d9, "$2");
}
function hasClass(_da, _db) {
  var _dc = new RegExp("(^|\\s)" + _db + "(\\s|$)");
  return _dc.test(_da.className);
}
function getFormValuesAsObject(_dd) {
  args = {};
  for (var i = 0; i < _dd.elements.length; i++) {
    input = _dd.elements[i];
    if (input.disabled) {
      continue;
    }
    switch (input.type) {
    case "text":
    case "hidden":
    case "password":
    case "textarea":
    case "submit":
    case "file":
      args[input.name] = trim(input.value);
      break;
    case "select-one":
      args[input.name] = input.options[input.selectedIndex].value;
      break;
    case "select-multiple":
      for (var j = 0; j < input.options.length; j++) {
        if (input.options[j].selected) {
          args[input.name] = input.options[j].value;
        }
      }
      break;
    case "radio":
    case "checkbox":
      if (input.checked) {
        args[input.name] = input.value;
      }
      break;
    }
  }
  return args;
}
function trim(str) {
  return str.replace(/^\s*/, "").replace(/\s*$/, "");
}
function createQueryStringFromObj(obj) {
  encoded_args = [];
  for (var arg in args) {
    encoded_args[encoded_args.length] = urlencode(arg) + "=" + urlencode(args[arg]);
  }
  return "?" + encoded_args.join("&");
}

function toggleTab(_10a, _10b, set, _10d) {
  var _10e = getOpenToggleTab(set);
  var _10f = getOpenToggleContent(_10d);
  if (_10e) {
    closeToggleTab(_10e, _10f);
    if (_10e != _10a) {
      openToggleTab(_10a, _10b);
    } else {
      _10d.style.display = "none";
    }
  } else {
    var _110 = _10d.getElementsByTagName("a");
    if (_110.length == 0 || !hasClass(_110[0], "closeLink")) {
      var _111 = document.createElement("a");
      _111.className = "closeLink";
      _111.title = "Close";
      _111.href = "#";
      _10d.insertBefore(_111, _10d.firstChild);
      _111.onclick = function() {
        var _112 = getOpenToggleTab(set);
        var _113 = getOpenToggleContent(_10d);
        toggleTab(_112, _113, set, _10d);
        return false;
      };
      _111.onmouseover = function() {
        if (typeof _st == "function") {
          return sts("Close");
        }
      };
      _111.onmouseout = function() {
        if (typeof cls == "function") {
          return cls();
        }
      };
    }
    _10d.style.display = "";
    openToggleTab(_10a, _10b);
  }
  if (_10a.blur) {
    _10a.blur();
  }
}
toggleTab.OPEN_LABEL_CLASS = "tt_label_open";
toggleTab.OPEN_CONTENT_CLASS = "tt_content_open";
toggleTab.CLOSED_CONTENT_DISPLAY = "none";
toggleTab.OPEN_CONTENT_DISPLAY = "";
function getItemWithClass(list, _115) {
  for (var i = 0; i < list.length; i++) {
    if (hasClass(list[i], _115)) {
      return list[i];
    }
  }
  return false;
}
function getOpenToggleTab(set) {
  return getItemWithClass(set.childNodes, toggleTab.OPEN_LABEL_CLASS);
}
function getOpenToggleContent(_118) {
  return getItemWithClass(_118.childNodes, toggleTab.OPEN_CONTENT_CLASS);
}
function closeToggleTab(_119, _11a) {
  removeClass(_119, toggleTab.OPEN_LABEL_CLASS);
  removeClass(_11a, toggleTab.OPEN_CONTENT_CLASS);
  _11a.style.display = toggleTab.CLOSED_CONTENT_DISPLAY;
}
function openToggleTab(_11b, _11c) {
  addClass(_11b, toggleTab.OPEN_LABEL_CLASS);
  addClass(_11c, toggleTab.OPEN_CONTENT_CLASS);
  _11c.style.display = toggleTab.OPEN_CONTENT_DISPLAY;
}
function toggleResultTab(_11d, _11e, _11f) {
  toggleTab(_11d, gbid(_11e), gbid("tt_set_" + _11f), gbid("tt_display_" + _11f));
  return false;
}
function blockRequest(type, id, _122) {
  if (!document.images) {
    return;
  }
  var img = new Image();
  img.onload = function() {
    var _124 = window.location.href.replace(/[\&|\?]{1}start=[0-9]*/, "");
    window.location = _124;
  };
  //img.src = "/rpc/block?t=" + type + "&id=" + id + "&ts" + (new Date()).getTime();
  return false;
}
function getTextContent(el) {
  if (el.innerText) {
    return el.innerText;
  }
  if (el.textContent) {
    return el.textContent;
  }
  return "";
}
function blurme(el) {
  if (el && el.blur) {
    el.blur();
  }
  return false;
}

function resizeSideFrame(_134) {
  if (_134 && _134.name && frames[_134.name].document) {
    var _135 = frames[_134.name].document.getElementById("afr");
    if (_135 && _135.clientHeight && _135.clientHeight > 0) {
      _134.height = _135.clientHeight;
    }
  }
}
function showInPopup(href) {
  var _137 = 400;
  var _138 = 300;
  var _139 = 0;
  var _13a = 0;
  if (window.WindowGeometry) {
    var _13b = new WindowGeometry(window);
    var _139 = Math.floor(_13b.getWindowX() + ((_13b.getViewportWidth() / 2)) - (_137 / 2));
    var _13a = Math.floor(_13b.getWindowY() + ((_13b.getViewportHeight() / 2)) - (_138 / 2));
  }
  var _13c = window.open(href, "about", "height=" + _138 + ",width=" + _137 + ",top=" + _13a + ",left=" + _139 + ",resizable");
  _13c.focus();
}
function WindowGeometry(_13d) {
  if (_13d.screenLeft != undefined) {
    this.getWindowX = function() {
      return _13d.screenLeft;
    };
    this.getWindowY = function() {
      return _13d.screenTop;
    };
  } else {
    if (_13d.screenX != undefined) {
      this.getWindowX = function() {
        return _13d.screenX;
      };
      this.getWindowY = function() {
        return _13d.screenY;
      };
    }
  }
  if (_13d.innerWidth != undefined) {
    this.getViewportWidth = function() {
      return _13d.innerWidth;
    };
    this.getViewportHeight = function() {
      return _13d.innerHeight;
    };
    this.getHorizontalScroll = function() {
      return _13d.pageXOffset;
    };
    this.getVerticalScroll = function() {
      return _13d.pageYOffset;
    };
  } else {
    if (_13d.document.body.clientWidth != undefined) {
      this.getViewportWidth = function() {
        return _13d.document.body.clientWidth;
      };
      this.getViewportHeight = function() {
        return _13d.document.body.clientHeight;
      };
      this.getHorizontalScroll = function() {
        return _13d.document.body.scrollLeft;
      };
      this.getVerticalScroll = function() {
        return _13d.document.body.scrollTop;
      };
    } else {
      if (_13d.document.documentElement && (_13d.document.documentElement.clientWidth != undefined)) {
        this.getViewportWidth = function() {
          return _13d.document.documentElement.clientWidth;
        };
        this.getViewportHeight = function() {
          return _13d.document.documentElement.clientHeight;
        };
        this.getHorizontalScroll = function() {
          return _13d.document.documentElement.scrollLeft;
        };
        this.getVerticalScroll = function() {
          return _13d.document.documentElement.scrollTop;
        };
      }
    }
  }
}
