function emailHide(email, domain, display) {
 document.write('<a href=' + 'mail' + 'to:' + email + '@' + domain + '>' + display + '</a>');
}

function openHelp(theURL){
	var help=window.open(theURL,'help','width=275,height=125,toolbar=no,location=no,directories=no,status=no,scrollbars=no,menubar=no,resizable=no,');
	help.focus();
}

function openExternal(theURL, width, height){
	var external=window.open(theURL,'external','width='+ width +',height='+ height +'');
	external.focus();
}


function openStudent(theURL, width, height){
	var external=window.open(theURL,'student','width='+ width +',height='+ height +',resizable=yes,scrollbars=yes');
	student.focus();
}

function togglelinkcat ( targetId ) {
	
	var div = document.getElementsByTagName('div');

	for (i = 0; i < div.length; i++) {
		if (div[i].id.match('linkcatgroup')) {
				div[i].style.display="none";
			}
		}
		
	if (document.getElementById) {
		target = document.getElementById( targetId );
				if (target.style.display == 'none') {
						target.style.display = '';
				} 
	}
}

function toggleall () {
	
	var div = document.getElementsByTagName('div');

	for (i = 0; i < div.length; i++) {
		if (div[i].id.match('linkcatgroup')) {
				div[i].style.display="";
			}
		}
}

function toggleArchive()
{
	var archive = document.getElementById('archive')

	if (archive)
	{
		archive.style.display = "";
	}
}

function openSurvey(theURL){
	var survey=window.open(theURL,'survey','width=500,height=400,toolbar=no,location=no,directories=no,status=no,scrollbars=yes,menubar=no,resizable=no,');
	survey.focus();
}