
function popOpen(url,name,attributes) {
 windowHandle = window.open(url,name,attributes);
}

// Author: Dewayne Debbs
// Date 6/13/2007
// If a #content div is longer than x pixels, create a "back to top" link.
function backToTops() {return;
  var c=document.getElementById("content");
  var s=document.getElementById("smallcontent");
  if (c && c.offsetHeight>400 && !s) {
  	var fc = document.getElementById('right_full_col');
	var moveFoot = true;
	var className = '';
  	if (fc == null) {
  		fc = c;
  		moveFoot = false;
  		className = ' toplinkStd';
  	}
  	var link = document.createElement('a');
		link.setAttribute('href', '#top');
		link.setAttribute('class', 'toplink');
		link.setAttribute('class', 'toplink'+className);
		link.innerHTML = 'Back to top';
		fc.appendChild(link);
	if (moveFoot) {
		// Move footer to pane
		fc.appendChild(document.getElementById('contactInfo'));
		document.getElementById('contactInfo').className = 'contactInfoMoved';
	}
  }
}

// Author: Dewayne Debbs
// Date: 06/25/2007
// Changes all links with rel="external" to use javascript
function modifyPopups() {
	var a=document.getElementsByTagName("a");
	for(var i=0;i<a.length;i++){
	  if (a[i].rel=="external") {
		  a[i].onclick = popUp;
	  }
	}
}

function popUp() {
	var newWindow = window.open(this.getAttribute('href'), '', 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,left = 20,top = 20');
	newWindow.focus();
	return false;
}

function startup(){
  modifyPopups();
  backToTops();
}

window.onload = startup;

