var host_name = document.location.hostname;

function set_openwindow() {
  var l = document.links;
  for (var i=0; i<l.length; i++) {
    //FSrecruitCarrerTraining
    if (check_path (l[i], 'career/training/index.html')) {
      l[i].onclick = function() { w = window.open (this.href, 'FSrecruitCarrerTraining', 'width=800, height=660'); return false; };
    }
  }
}

function check_path(l, r) {
  var stat = false;
  if (is_same_host(l)) {
    if (2 == l.pathname.split(r).length && l.pathname != l.pathname.split(r)[0]) {
      stat = true;
    }
  }
  return stat;
}
function is_same_host(l) {
  if (0 == l.hostname.indexOf(host_name,0)) return true;
  else return false;
}

onload_items[onload_items.length] = set_openwindow;
