window.onload = function()
{
	targetBlank();
}



function show(id) {

for(i=1; i<=15; i++) {
	var elems = document.getElementById('view_person'+i);
	elems.style.display = "none";
}

  var elem = document.getElementById('view_person'+id);
  if (elem.style.display == "block") {
    elem.style.display = "none";
  } else {
    elem.style.display = "block";
  }
}

function targetBlank()
{
  var get_hostname_from_url = function(url) {
    return url.match(/:\/\/(.[^/]+)/)[1];
  }

  $("a").click(function(event) {
    var href = $(this).attr("href");
    var this_domain = window.location.hostname;
    var target_domain = get_hostname_from_url(href);
    
    if (target_domain != this_domain) {
      window.open($(this).attr("href"),'');
      event.preventDefault();
    }
  });
}
