//Get page information to make sure we are actually in the frame. var server = new String(window.location); var firser = ""; if (server.indexOf("uoregon.edu") > -1) { firser = "http://bdl.uoregon.edu/"; } else { firser = "http://www.purpled.com/UofO_BDL/"; } var curPage = new String(document.location); var start = curPage.lastIndexOf("/"); var end = curPage.indexOf(".html"); curPage = curPage.substring(start+1,end); if (parent.frames[0]) { var parPage = new String(parent.frames[0].document.location); if (parPage.indexOf(parentHeader) == -1) { parent.document.location = firser + "" + parentURL + "?" + curPage; } } else { document.location = firser + "" + parentURL + "?" + curPage; } window.onerror = handleError; function handleError() { return true; }