//cross-browser event handling for IE5+, NS6+ and Mozilla/Gecko
  //By Scott Andrew 
function addEvent(elm, evType, fn, useCapture) {
	if (elm.addEventListener) {
		elm.addEventListener(evType, fn, useCapture); 
		return true; 
	} else if (elm.attachEvent) {
		var r = elm.attachEvent('on' + evType, fn); 
		return r; 
	} else {
		elm['on' + evType] = fn;
	}
} 
function windowLinks() {
	if (!document.getElementsByTagName)
		return;
	var all_links = document.getElementsByTagName('a');
	for (var i = 0; i<all_links.length; i++) {
		var link = all_links[i];
		if (link.className && (' ' + link.className + ' ').indexOf(' window ') != -1) {
			if (link.className && (' ' + link.className + ' ').indexOf(' summer ') != -1) {
				link.href = "javascript:na_open_window('sum', '" + link.href + "', 50, 10, 520, 665, 0, 1, 0, 0, 1)"
			} else {
				link.href = "javascript:na_open_window('cal', '" + link.href + "', 50, 50, 745, 570, 0, 1, 0, 0, 1)"
			}
		}
	}
}
function na_open_window(name, url, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable)
{
  toolbar_str = toolbar ? 'yes' : 'no';
  menubar_str = menubar ? 'yes' : 'no';
  statusbar_str = statusbar ? 'yes' : 'no';
  scrollbar_str = scrollbar ? 'yes' : 'no';
  resizable_str = resizable ? 'yes' : 'no';

  var new_window = window.open(url, name, 'left='+left+',top='+top+',width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str);
	new_window.focus();
}
addEvent(window, 'load', windowLinks, false);