/* script.js */

/**
 * Attaches an onclick event to each link with rel="external" that opens the
 * link in a new window.
 */
function initExternalLinks() {
  var as = document.getElementsByTagName("a");
  for (var i = 0; i < as.length; i++) {
    if (as[i].getAttribute("rel") == "external") {
      as[i].onclick = openNewWindow;
    }
  }

  function openNewWindow() {
    window.open(this.href);
    return false;
  }
}

function togglePane(elm) {
	
	var el = document.getElementById(elm);
	
	if(el.className == 'contactPane closed') {
		el.className = 'contactPane open';
		return true;
	} else {
		el.className = 'contactPane closed';
		return false;
	}
	
}