<!--

//-------------------------------------
//detect the browser
//-------------------------------------

	var Eid=false
	var NN=false
	var IE=false
	
	if (document.getElementById) Eid=true
	else if (document.layers) NN=true
	else if (document.all && !document.getElementById) IE=true
	
//--------------------------------------
//show or hide the menu
//--------------------------------------

	var menuName = 'about' //default value for hideMenu()
	var timer=setTimeout('hideMenu', 0)
	var hideDelay=250 //changes the delay for the menu to disappear onmouseout
	
	function dropMenu (dropIt, menu) {
		//make sure that the other menus are all hidden
		clearTimeout(timer)
		hideMenu()
		
		if (menu!=null) {
			menuName = menu
		}
		
		//IE > 4
		if (Eid && dropIt) document.getElementById(menuName).style.visibility='visible'
		
		//NN < 6
		if (NN && dropIt) document.layers[menuName].visibility='show'
		
		//IE <= 4
		if (IE && dropIt) document.all[menuName].style.visibility='visible'
		
	}
	
	function delay (d) {
		if (d) {
			clearTimeout(timer)
			dropMenu(true, menuName)
		}
			
		else timer=setTimeout('hideMenu()', hideDelay)
	}
	
	function hideMenu () {
		//IE > 4, NN <= 6
		if (Eid) {
			document.getElementById(menuName).style.visibility='hidden'
			clearTimeout(timer)
		}
		
		//NN < 6
		if (NN) {
			document.layers[menuName].visibility='hide'
			clearTimeout(timer)
		}
		
		//IE <= 4
		if (IE) {
			document.all[menuName].style.visibility='hidden'
			clearTimeout(timer)
		}
		
	}
	
//--------------------------------------
//Choose domain in Search Box
//--------------------------------------
	
	function chooseAction () {
		if (document.forms.MAINSEARCH.source[0].checked == true) {
			document.forms.MAINSEARCH.action = "http://www.google.ca/univ/uregina";
		}
		else if (document.forms.MAINSEARCH.source[1].checked == true) {
			document.forms.MAINSEARCH.action = "http://www.google.ca/search";
		}
	}

//--------------------------------------
//Highlight a Cell when MouseOver
//--------------------------------------

	function MouseOver(elem, color) {
	   elem.style.backgroundColor = color;
	   elem.style.cursor = 'hand';
	}
	
	function MouseOut(elem, color) {
	   elem.style.backgroundColor = color;
	}
	
	function MouseUp(path) {
	   location.href = path;
	}

//--------------------------------------
//Change URL to menu selection
//--------------------------------------

function urlMenu(that) {
	theURL = that.options[that.selectedIndex].value; 

	if (theURL) {
		window.location = theURL;
	}
}

//--------------------------------------
//Hide email from web spiders
//--------------------------------------

	var user;
	var domain;
	var suffix;
	
	function jemail(user, domain, suffix){
		document.write('<a href="' + 'mailto:' + user + '@' + domain + '.' +
						suffix + '">' + user + '@' + domain + '.' + suffix + '</a>');
	}
	
	function jemail2(user,domain,suffix,fullname){
		document.write('<a href="' + 'mailto:' + user + '@' + domain + '.' +
						suffix + '">' + fullname + '</a>');
	}
	
	function jemail3(user,site,fullname){
		document.write('<a href=\"' + 'mailto:' + user + '@' + site + '\">' + fullname + '</a>');
	}


//--------------------------------------
//Launches popup window
//--------------------------------------

// eg. <a href="javascript:;" onclick="launchwin('page.html','Name of page','width=640,height=520,toolbar=yes,menubar=yes,scrollbars=yes,resizable=yes')">

 function launchwin(winurl,winname,winfeatures)
 {
	 var newwin;
	 
	 //This launches a new window and then
	 //focuses it if window.focus() is supported.
	 newwin = window.open(winurl,winname,winfeatures);
	 newwin.focus();
 }

//-->

//--------------------------------------
//Jumps to link in drop-down menu
//--------------------------------------

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}


//--------------------------------------
//Detect browser to determine the margin for the bulleted list
//--------------------------------------

function ulMargin() {
	if(navigator.userAgent.indexOf('MSIE')!=-1)
		document.write("<ul style=\"line-height: 18px; margin-left: 25px;\">");
	else
		document.write("<ul style=\"line-height: 18px; margin-left: -15px;\">");				
}

//-->

/*
CLCP v2.1 Clear Links to Current Page
Jonathan Snook
This code is offered unto the public domain
http://www.snook.ca/jonathan/
*/
/*
window.onload = clearCurrentLink;

function clearCurrentLink(){
    var a = document.getElementsByTagName("A");

	var indexpage = "index.shtml"
	var url = window.location.href;
	if(url.substr(url.length-1,1)=="/")
	url = url + indexpage;
	
    for(var i=0;i<a.length;i++)
        if(a[i].href == window.location.href.split("#")[0])
            removeNode(a[i]);
}

function removeNode(n){
    if(n.hasChildNodes())
        for(var i=0;i<n.childNodes.length;i++)
            n.parentNode.insertBefore(n.childNodes[i].cloneNode(true),n);
    n.parentNode.removeChild(n);
}
*/