function getyearstr(){
var today = new Date()
var year = today.getYear()
if (year<1000){
year+=1900
}
return year;
}

function encrypt(username,hostname,linktext,subject,message){
var username = username || 'visit';
var hostname = hostname || 'thunderbay.ca';
var address = username + '&#64;' + hostname;
var linktext = linktext || address;
var subject = subject || '';
if(subject != ''){
	subject = '?subject=' + subject;
}
var message = message || '';
if(message != ''){
	message = '?body=' + message;
}
var output = '<a href="&#109;&#97;&#105;&#108;' + '&#116;&#111;&#58;'+ address + subject + message +'">'+ linktext +'</a>';
document.write(output);
}

function openurl(url,urlwidth,urlheight) {
	
var urlwidth = urlwidth || '#';
var urlwidth = urlwidth || 780;
var urlheight = urlheight || 585;
var screenwidth = screen.width;
var screenheight = screen.height;

if (urlwidth > screenwidth || urlheight > screenheight){ // url is larger
var showscroll = 'yes';
} else {
var showscroll = 'no';
}

if (urlwidth > screenwidth){ // width is larger
var leftpos = 0;
var winwidth = screenwidth;
} else {
var leftpos = (screenwidth - urlwidth)/2;
var winwidth = urlwidth;
}

if (urlheight > screenheight){ // height is larger
var toppos = 0;
var winheight = screenheight;
} else {
var toppos = (screenheight - urlheight)/2;
var winheight = urlheight;
}

var win=window.open(url,'new','toolbar=no,status=no,scrollbars='+ showscroll +',location=no,menubar=no,directories=no,resizable=yes,left=' + leftpos + ',top=' + toppos + ',width=' + winwidth + ',height=' + winheight + '')
win.focus();

}

function IEHoverPseudo() {

	var navItems = document.getElementById("nav").getElementsByTagName("li");
	
	for (var i=0; i<navItems.length; i++) {
		if(navItems[i].className == "menuparent") {
			navItems[i].onmouseover=function() {
			this.className += " menuparentover";
			this.style.zIndex = "1000";
			}
			navItems[i].onmouseout=function() {
			this.style.zIndex = "0";
			this.className = "menuparent";
			}
		}
	}
	
	for (var i=0; i<navItems.length; i++) {
		if(navItems[i].className == "lastparent") {
			navItems[i].onmouseover=function() {
			this.className += " lastparentover";
			this.style.zIndex = "1000";
			}
			navItems[i].onmouseout=function() {
			this.style.zIndex = "0";
			this.className = "lastparent";
			}
		}
	}
}