function setcss(SiteDir,CssName)
{

 // Test for Mac.

 if (navigator.userAgent.indexOf('Mac')!=-1)
 {

// Test for IE3 IE4.

		if ((navigator.userAgent.indexOf('MSIE 4')!=-1) || (navigator.userAgent.indexOf('MSIE 3')!=-1))
		{
				document.write('<link rel="stylesheet" type="text/css" href="' + SiteDir+ 'css/' + CssName + '-ie4mac.css" />')
		}		

 else
 {

// Test for NS.

	if (navigator.appName=="Netscape")
	{

// Test for NS4.

		if(navigator.userAgent.substring(8,9) == '4')
		{
			document.write('<link rel="stylesheet" type="text/css" href="' + SiteDir+ 'css/' + CssName + '-ns4mac.css" />')
 		}
// NS 6 or higher.		
		else
		{
		document.write('<link rel="stylesheet" type="text/css" href="' + SiteDir+ 'css/' + CssName + '-css2.css" media="screen" />')
		document.write('<link rel="stylesheet" type="text/css" href="' + SiteDir+ 'css/' + CssName + '-print.css" media="print" />')			
		}
	}
	
// IE 5 or higher.

 	else
	{
		document.write('<link rel="stylesheet" type="text/css" href="' + SiteDir+ 'css/' + CssName + '-css2.css" media="screen" />')	
		document.write('<link rel="stylesheet" type="text/css" href="' + SiteDir+ 'css/' + CssName + '-print.css" media="print" />')
	}
}
}
 //PCs and other OSs
 else
 {
//test for NS
	if (navigator.appName=="Netscape")
	{
//test for NS4
		if(navigator.userAgent.substring(8,9) == '4')
		{
			document.write('<link rel="stylesheet" type="text/css" href="' + SiteDir+ 'css/' + CssName + '-ns4win.css" />')
 		}
//NS 6 or higher		
		else
		{
		document.write('<link rel="stylesheet" type="text/css" href="' + SiteDir+ 'css/' + CssName + '-css2.css" media="screen" />')
		document.write('<link rel="stylesheet" type="text/css" href="' + SiteDir+ 'css/' + CssName + '-print.css" media="print" />')			
		}
	}
//IE
 	else
	{
		document.write('<link rel="stylesheet" type="text/css" href="' + SiteDir+ 'css/' + CssName + '-css2.css" media="screen" />')	
		document.write('<link rel="stylesheet" type="text/css" href="' + SiteDir+ 'css/' + CssName + '-print.css" media="print" />') 
	}
}
}

//Popup window function. (C) Rogier Gruys, University of Victoria, 2003
// Version 1.0 July 18, 2003
var newWin = null; 
function popUp(strURL, strType, strWidth, strHeight) { 
 if (newWin != null && !newWin.closed) 
   newWin.close(); 
 var strOptions=""; 
 if (strType=="none") 
   strOptions="resizable,height="+ 
     strHeight+",width="+strWidth; 
 if (strType=="menu") 
   strOptions="menubar,height="+ 
     strHeight+",width="+strWidth; 
 if (strType=="scroll") 
   strOptions="toolbar,menubar,scrollbars,"+ 
     "resizable,location,height="+ 
     strHeight+",width="+strWidth; 
 newWin = window.open(strURL, 'newWin', strOptions); 
 newWin.focus(); 
}

//address encoding function. (C) Rogier Gruys, University of Victoria, 2003
// Version 1.0 July 18, 2003
function address(user, subdomain, displayText, displayTitle) {
	var a = 'ma';
	var b = 'il';
	var c = 'to:';
	var domain = '&#117;&#118;&#105;&#099;&#046;&#099;&#097;';
	document.write('<a href="');
	document.write(a+b+c);
	document.write(user);
	document.write('&#64;');
	if(subdomain != "") {
	document.write(subdomain + '.');
	}
	document.write(domain);
	document.write('" title="'+displayTitle+'">');
	document.write(displayText+'</a>');
}