// Set global variable newwin so it can be referred to by other functions
var newWin; 

// BEGIN Open Window 
function popup(filePath,winName,winWidth,winHeight) {

	newWin = window.open("",winName,"toolbar=no,directories=no,menubar=yes,scrollbars=yes,width=" + winWidth + ",height=" + winHeight + ",left=10,top=10,resizable=yes");
	newWin.location = filePath;
	newWin.focus();

} // END popup(file_path,win_name,win_width,win_height)

// Function to create popup links based on href and class
function dopopups() {
	var links = document.getElementsByTagName("a");
	for (var i=0; i < links.length; i++) {
	if (links[i].className.match("popup750")) {
		//var printUrl = eval(links[i].href);
		//links[i].href = "JavaScript:popup('"+printUrl+"','popup',750,500);"
		links[i].href = "JavaScript:popup('"+links[i].href+"','popup',750,500);"
	}
	if (links[i].className.match("popup650")) {
		links[i].href = "JavaScript:popup('"+links[i].href+"','popup',650,400);"
		links[i].title = links[i].title+", opens in a new window";
	}
	if (links[i].className.match("popup780")) {
		links[i].href = "JavaScript:popup('"+links[i].href+"','popup',780,400);"
		links[i].title = links[i].title+", opens in a new window";
	}
	if (links[i].className.match("popup800")) {
		links[i].href = "JavaScript:popup('"+links[i].href+"','popup',800,500);"
		links[i].title = links[i].title+", opens in a new window";
	}
	}
	//alert("end popups");
	var urlStr = self.location.href;
	if (urlStr.indexOf('/cgi-bin/') == -1) {
document.getElementById('banner-menu-adds-bounds').innerHTML = "<li class='li-right-border'><a href='#' onclick='chooseStyle(0); return false;' class='banner-menu-link' id='small_font' title='Smaller Font Size'>A<\/a>&nbsp;<a href='#' onclick='chooseStyle(1); return false;' class='banner-menu-link' id='medium_font' title='Middle Font Size'>A<\/a>&nbsp;<a href='#' onclick='chooseStyle(2); return false;' class='banner-menu-link' id='large_font' title='Larger Font Size'>A<\/a><\/li>"+document.getElementById('banner-menu-adds-bounds').innerHTML;
	}
}

if(document.cookie.indexOf('style=1') != -1)
	document.write('<style type="text/css">\n' + 'body { font-size: 14px; }\n' + '<\/style>\n');

else if (document.cookie.indexOf('style=2') != -1)
	document.write('<style type="text/css">\n' + 'body { font-size: 16px; }\n' + '<\/style>\n');

else document.write('<style type="text/css">\n' + 'body { font-size: 12px; }\n' + '<\/style>\n');

function chooseStyle (newstyle){
	var expdate = new Date();
	expdate.setTime(expdate.getTime() + (1000*3600*24*365));
  	document.cookie = 'style=' + newstyle + '; expires=' + expdate.toGMTString() + '; path=/';
  	var locString = self.location.href;
  	if (locString.indexOf('#') == -1) {
  	  	self.location = self.location;
  	} else {
  	  	self.location.reload(true);
  	}
}

function writeYearInfo() {
//	var d = new Date();
//	document.write("2003-" + d.getFullYear());
	document.write("2012");
}





