//Capture the onblur event so clicking on another window can execute a javascript.//This would be used to close a window in body tag.//captureEvents(onblur); removed 3-24-2002 causes javascript error in each file?//The following code sets up a timer to close a window after a specified interval that//is passed to startclock in the body tag.var timerID = nullvar timerRunning = falsefunction stopclock(){if(timerRunning)clearInterval(timerID)timerRunning = false}function startclock(seconds){// Make sure the clock is stoppedstopclock()timerID = setInterval("closeit()",1000*seconds)timerRunning = true}function closeit(){self.close();}// This script and many more are available free online at -->// The JavaScript Source!! http://javascript.internet.com -->// Beginfunction Startlarge(page) {OpenWin = window.open(page, "large", "height=500,width=600,scrollbars=yes,left=0,top=0");OpenWin.focus();}// End -->// Beginfunction Start(page) {OpenWin = window.open(page, "big", "height=400,width=600,scrollbars=yes,left=0,top=0");OpenWin.focus();}// End -->// Begin// Beginfunction Startlittle(page) {OpenWin = window.open(page, "little", "height=100,width=300,scrollbars=yes,left=0,top=0");OpenWin.focus();}// End -->// Beginfunction Startmedium(page) {OpenWin = window.open(page, "medium", "height=200,width=480,scrollbars=yes,left=0,top=0");OpenWin.focus();}// End -->// Beginfunction gohome() {if(parent.frames.length > 0){var newstring = parent.menu.location.pathname;var re=/\\/gi;var urlpath=newstring.replace(re, "/");var newpath = urlpath.substring(0,urlpath.indexOf("fire/")+4)+"/hsteach";var newlocation = newpath.concat("/home.htm");window.location.href = newlocation;}else{var newstring = parent.location.pathname;var re=/\\/gi;var urlpath=newstring.replace(re, "/");var newpath = urlpath.substring(0,urlpath.indexOf("fire/")+4)+"/hsteach";var newlocation = newpath.concat("/index.htm");window.location.href = newlocation;}}// End -->// Beginfunction goback(){window.history.back();}// End -->// Beginfunction logo(){if(parent.frames.length > 0){var newstring = parent.menu.location.pathname;var re=/\\/gi;var urlpath=newstring.replace(re, "/");var newpath = urlpath.substring(0,urlpath.indexOf("fire/")+4)+"/images/pagesmal.gif";document.write("<table border=\"0\" width=\"100%\">");document.write("<tr>");document.write("<td style=\"text-align:left;\">");document.write("<IMG SRC=\""+newpath+"\" alt=\"Our Logo!\" border=\"0\" >");document.write("</td>");document.write("<td style=\"text-align:right;\">");if (urlpath.lastIndexOf("hsteach") > 0 ){var newpath = urlpath.substring(0,urlpath.indexOf("fire/")+4)+"/images/hs.gif";}if (urlpath.lastIndexOf("coll") > 0 ){var newpath = urlpath.substring(0,urlpath.indexOf("fire/")+4)+"/images/coll.gif";}if (urlpath.lastIndexOf("elem") > 0 ){var newpath = urlpath.substring(0,urlpath.indexOf("fire/")+4)+"/images/elem.gif";}document.write("<IMG SRC=\""+newpath+"\" alt=\"Our Logo!\" border=\"0\" >");document.write("</td>");document.write("</tr>");document.write("</table>");}else {var newstring = parent.location.pathname;var re=/\\/gi;var urlpath=newstring.replace(re, "/");var newpath = urlpath.substring(0,urlpath.indexOf("fire/")+4)+"/images/pagesmal.gif";document.write("<table border=\"0\" width=\"100%\">");document.write("<tr>");document.write("<td style=\"text-align:left;\">");document.write("<IMG SRC=\""+newpath+"\" alt=\"Our Logo!\" border=\"0\" >");document.write("</td>");document.write("<td style=\"text-align:right;\">");if (urlpath.lastIndexOf("hsteach") > 0 ){var newpath = urlpath.substring(0,urlpath.indexOf("fire/")+4)+"/images/hs.gif";}if (urlpath.lastIndexOf("coll") > 0 ){var newpath = urlpath.substring(0,urlpath.indexOf("fire/")+4)+"/images/coll.gif";}if (urlpath.lastIndexOf("elem") > 0 ){var newpath = urlpath.substring(0,urlpath.indexOf("fire/")+4)+"/images/elem.gif";}document.write("<IMG SRC=\""+newpath+"\" alt=\"Our Logo!\" border=\"0\" >");document.write("</td>");document.write("</tr>");document.write("</table>");}}// End -->// Beginfunction copyright(){var yr;Today = new Date();yr = Today.getFullYear();document.write("<p class=\"small\">Copyright &copy; 2002 - "+yr+" <A HREF=\"http://pslc.ws\" target=\"_blank\">Polymer Science Learning Center</A> | <A HREF=\"http://www.usm.edu\" target=\"_blank\">University of Southern Mississippi</A></p>");document.write("");}// End -->