function init() {
	external_links();
	evendivs();
}
function external_links() {
	var al = document.getElementsByTagName("a");

	for (var i = 0; i < al.length; i++) {
		if (al[i].className == 'external') {
			al[i].onclick = function () { window.open(this.href); return(false); };
			if (!al[i].title) {
				al[i].title = al[i].href;
			}	
			al[i].title += " (external link)";
		}
	}
}

function evendivs() {
	isIE4plus = (document.all) ? 1 : 0;
	isW3C = (document.getElementById && !document.all) ? 1 : 0;
	if (isIE4plus || isW3C) {
		var mc = document.getElementById('maincontent');
		var lb = document.getElementById('leftbar');
		var rb = document.getElementById('rightbar');
		var mb = document.getElementById('mainblock');
		var ht;
		if (isW3C) {
			ht = window.getComputedStyle(mc, null).height;
			lht = window.getComputedStyle(lb, null).height;
			rht = window.getComputedStyle(rb, null).height;
			lht = lht.match(/\d+/g)[0] - 0;
			rht = rht.match(/\d+/g)[0] - 0;
			ht = ht.match(/\d+/g)[0] - 0;
			rht += 195;
		}
		if (isIE4plus) {
			ht = mc.offsetHeight;
			lht = lb.offsetHeight;
			rht = rb.offsetHeight;
			rht -= 6;
		}
		var mbht = Math.max(lht,rht);
		if (ht < mbht) {
			ht = mbht;
			mc.style.height = ht;
		}
		// lb.style.height = ht;
		mb.style.backgroundPosition = "right " + (ht - 195) + "px";
		// rb.style.height = "" + rh + 'px';
	}
}

function coursemapwindow() {
	var features = 'resizable,width=980,height=310';
	var w = window.open('course.jpg','Course', features);
	return false;
}
