<!--

var popUpWin=0;

/** default url prefix **/
var amUrl = "http://www.augustana.edu/profiles/";

/**
	Function to display a page in a new popup window with the given location and dimensions
	@param URLStr	url string
	@param left		left indent location for the window
	@param top		offset from the top e.g 120
	@param widht	width of the new window
	@param height	height of the new window
	
	NOTE 	if the the locations - left, top are omitted it will default to 120px from the left and top
			if the width and height are omitted the default size is 550px X 550px;
**/

function popUpWindow(URLStr, left, top, width, height)
{
  if (left == null && top == null) {
	  left = 120;
	  top = 120;
  }
  
  if (width == null && height == null) {
		width = 550;
		height = 550;
  }
  
  if(popUpWin)
  {
    if(!popUpWin.closed) popUpWin.close();
  }
  popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=no,copyhistory=yes,width=550,height=550,left=100, top=100,screenX=100,screenY=100');
}

/**
	Function to display products for the online Augustan Store
	This function overwrites the width and height of the popup window
**/
function products(URLStr, left, top, width, height)
{
  if(popUpWin)
  {
    if(!popUpWin.closed) popUpWin.close();
  }
  popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=no,copyhistory=yes,width=500,height=600,left=100, top=100,screenX=100,screenY=100');
}

/**
	Writes out the email this page url with a name querystring 
	containing the page title 
**/
function getEmailURL() {
	var base = "http://www.augustana.edu/_finaltemplates/email_page.php?name=" + this.document.title;
	var pp = "onclick=\"popUpWindow('" + base + "')\"";
	var aa = "<a href=''" + pp + "'>Email this page</a>";
	document.write(aa);
}
//-->

<!--
/*
	Functions to increase / decrease font-size on the style sheet
*/

function createCookie(name,value) {
    var data = name + "=" + escape(value) + "; ";
    var expires = new Date();
    var week = expires.getTime() + (365 * 24 * 60 * 60 * 1000);
    expires.setTime(week);
    data += "expires=" + expires.toGMTString();
    document.cookie = data;
}

function findCookie(name) {
var query = name + "=";
var querylength = query.length;
var cookielength = document.cookie.length;
var i=0;
while (i < cookielength) {
   var startvalue = i + querylength;
   if (document.cookie.substring(i,startvalue) == query) {
      return findValue(startvalue);
   }
   i = document.cookie.indexOf(" ", i) + 1;
   if (i == 0) break;
 }
 return null;
}

function findValue(startvalue) {
var endvalue = document.cookie.indexOf(";", startvalue);
if (endvalue == -1) {
   endvalue = document.cookie.length;
   }
return unescape(document.cookie.substring(startvalue,endvalue));
}

function changeStyles(title) {
  var i,a;
  for (i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if (a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
      a.disabled = true;
      if (a.getAttribute("title") == title) a.disabled = false;
    }
  }
  createCookie("style",title);
}

function loadStyles() {
  var cookie = findCookie("style");
  if (cookie) changeStyles(cookie);
}

function popUp(URL,w,h) {
	winl = (screen.width - w) / 2;
	wint = (screen.height - h) / 2;
	day = new Date();
	id = day.getTime();
	eval("eventPage" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,status=1,menubar=0,resizable=1,width="+w+",height="+h+",top="+wint+",left="+winl+"');");
	}

//window.onload = loadStyles();
//-->


<!--

startList = function() {
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("nav");
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
				}
				node.onmouseout=function() {
					this.className=this.className.replace(" over", "");
				}
			}
		}
	}
}
//window.onload=startList;

window.onload = function()
{
loadStyles();
startList;
}

//-->