// Get the domain - cookie functions will need this variable - mharen 12/26/01thisdomain = document.location +"";thisdomain = thisdomain.substring(thisdomain.indexOf('//')+2,thisdomain.length);thisdomain = thisdomain.substring(0,thisdomain.indexOf('/'));thisdomain = (navigator.appName != "Netscape")? thisdomain.substring(thisdomain.indexOf('.')+1,thisdomain.length): thisdomain;// This is for re-directing pages from a drop-down list control - mharen 7/13/01//function redirects to "Main" in body of frames.function goTherePartner(theform) {        var URL = theform.url.options[theform.url.selectedIndex].value;        location.href = URL;}function goThere(theform) {        var URL = theform.url.options[theform.url.selectedIndex].value;        parent.location.href = URL;}// This is for the video pop-up windows - rwc 08/10/01function video_pop_up(page){OpenWin = this.open(page,"CtrlWindow","toolbar=no,menubar=no,location=no,scrollbars=no,resize=no,status=no,width=340,height=440");}// This is for the corporate video pop-up window - rwc 09/17/01function corp_video_pop_up(){OpenWin = this.open("/video/corporate/frameset.html","CorpVidWin","toolbar=no,menubar=no,location=no,scrollbars=no,resize=no,status=no,width=620,height=373");// setTimeout('CorpVidWin.focus();',250);}// This is for opening pop-up windows in a way that addresses usability complaints. Use this instead of target="_blank" // It guarentees that pop-up windows will be smaller than the parent window in both dimensions- mharen 7/13/01// example usage: <a href="javascript:new_window('/video/corporate/','620','420','chrome=yes');">link</a> - with chrome//                         <a href="javascript:new_window('/video/corporate/','620','420');"> - without chromefunction new_window(page, width, height, chrome){if (chrome == "chrome=yes") {chrome="yes"} else {chrome="no"}var w = width, h = height, docw = width, doch = height;if (document.all) {// the following is only available after onLoad// get current window size for ie  docw = document.body.clientWidth;  doch = document.body.clientHeight;}// get window size for Netscapeelse if (document.layers) {   docw = window.innerWidth;   doch = window.innerHeight;}if (docw <= w) {w = (docw - 40)}if (doch <= h) {h = (doch - 40)}var leftPos = (screen.width / 2) - (w / 2);var topPos = (screen.height / 2) - (h / 2);    OpenWin = this.open(page,"CtrlWindow","top="+topPos+",screenX="+topPos+", left="+leftPos+", screenY="+leftPos+",width="+w+",height="+h+", toolbar="+chrome+",menubar="+chrome+",location="+chrome+",status="+chrome+",scrollbars=yes,resizable=yes,");}// enlarge an image in a new window - mharen 5/25/02function enlarge_image(image, width, height, chrome, caption){if (chrome == "chrome=yes") {chrome="yes"} else {chrome="no"}var w = width, h = height, docw = width, doch = height;if (document.all) {// the following is only available after onLoad// get current window size for ie  docw = document.body.clientWidth;  doch = document.body.clientHeight;}// get window size for Netscapeelse if (document.layers) {   docw = window.innerWidth;   doch = window.innerHeight;}// compensate for the chromew = parseInt(w)+40;h = parseInt(h)+100;// make the new window smaller than the parentif (docw <= w) {w = (docw - 40)}if (doch <= h) {h = (doch - 40)}var leftPos = (screen.width / 2) - (w / 2);var topPos = (screen.height / 2) - (h / 2);    ImageWin = window.open("","ImgWindow","top="+topPos+",screenX="+topPos+", left="+leftPos+", screenY="+leftPos+",width="+w+",height="+h+", toolbar="+chrome+",menubar="+chrome+",location="+chrome+",status="+chrome+",scrollbars=yes,resizable=yes,");ImageWin.document.open();ImageWin.document.write('<a href=\"javascript:window.close();\"><img src=\"/images/close_window.gif\" border=\"0\" height=\"21\" width=\"103\" vspace=\"2\" hspace=\"5\"\/><\/a>');ImageWin.document.writeln('<a href=\"javascript:window.print();\"><img src=\"/images/button_print.gif\" border=\"0\" height=\"21\" width=\"103\" vspace=\"2\" hspace=\"5\"\/><\/a><br \/><br \/>');ImageWin.document.writeln('<img src=\"'+image+'\" \/><br \/>');if (caption) {ImageWin.document.writeln('<span style=\"font-family:arial,verdana,sans-serif\;font-weight:bold\" \/>'+caption+'<\/span>');}ImageWin.document.close();}// Cookie functions - mharen 12/21/01function setCookie (name, value, hours, path, domain, secure) {// This next little bit of code tests whether the user accepts cookies.var acceptsCookies = false;if(document.cookie == '') {    document.cookie = 'acceptsCookies=yes'; // Try to set a cookie.    if(document.cookie.indexOf('acceptsCookies=yes') != -1) {	acceptsCookies = true;     }// If it succeeds, set variable} else { // there was already a cookie  acceptsCookies = true;}    if (acceptsCookies) { // Don't waste your time if the browser doesn't accept cookies.	var not_NN2 = (navigator && navigator.appName 		       && (navigator.appName == 'Netscape') 		       && navigator.appVersion 		       && (parseInt(navigator.appVersion) == 2))?false:true;	if(hours && not_NN2) { // NN2 cannot handle Dates, so skip this part	    if ( (typeof(hours) == 'string') && Date.parse(hours) ) { // already a Date string		var numHours = hours;	    } else if (typeof(hours) == 'number') { // calculate Date from number of hours		var numHours = (new Date((new Date()).getTime() + hours*3600000)).toGMTString();	    }	}		document.cookie = name + '=' + escape(value) + ((numHours)?(';expires=' + numHours):'') + ((path)?';path=' + path:'') + ((domain)?';domain=' + domain:'') + ((secure && (secure == true))?'; secure':''); // Set the cookie, adding any parameters that were specified.    }} // setCookiefunction readCookie(name) {    if(document.cookie == '') { // there's no cookie, so go no further	return false;     } else { // there is a cookie	var firstChar, lastChar;	var theBigCookie = document.cookie;	firstChar = theBigCookie.indexOf(name);	// find the start of 'name'	var NN2Hack = firstChar + name.length;	if((firstChar != -1) && (theBigCookie.charAt(NN2Hack) == '=')) { // if you found the cookie	    firstChar += name.length + 1; // skip 'name' and '='	    lastChar = theBigCookie.indexOf(';', firstChar); // Find the end of the value string (i.e. the next ';').	    if(lastChar == -1) lastChar = theBigCookie.length;	    return unescape(theBigCookie.substring(firstChar, lastChar));	} else { // If there was no cookie of that name, return false.	    return false;	}  }	} // readCookiefunction killCookie(name, path, domain) {  var theValue = readCookie(name); // We need the value to kill the cookie  if(theValue) {      document.cookie = name + '=' + theValue + '; expires=Fri, 13-Apr-1970 00:00:00 GMT' + ((path)?';path=' + path:'') + ((domain)?';domain=' + domain:''); // set an already-expired cookie  }} // killCookie// the following two functions cause a page reload when the user changes window size in Netscape 4.x This is a// workaround for a netscape bug which messes up the page layout on resize - added by mharen 8/14/01  function WM_netscapeCssFix()  {       // This checks to make sure that the window's available size       // has actually changed.      if (document.WM.WM_netscapeCssFix.initWindowWidth != window.innerWidth ||              document.WM.WM_netscapeCssFix.initWindowHeight != window.innerHeight)          {          document.location = document.location;          }  }  function WM_netscapeCssFixCheckIn()  {      // This function checks to make sure the version of Netscape       // in use contains the bug; if so, it records the window's       // width and height and sets all resize events to be handled       // by the WM_netscapeCssFix() function.      if ((navigator.appName == 'Netscape') && (parseInt(navigator.appVersion) ==4))          {          if (typeof document.WM == 'undefined')              {              document.WM = new Object;              }          if (typeof document.WM.WM_scaleFont == 'undefined')              {              document.WM.WM_netscapeCssFix = new Object;              document.WM.WM_netscapeCssFix.initWindowWidth = window.innerWidth;              document.WM.WM_netscapeCssFix.initWindowHeight = window.innerHeight;              }          window.onresize = WM_netscapeCssFix;          }  }  WM_netscapeCssFixCheckIn()  // Launches training videos 7/30/02 - mthfunction Launch_training(path) {  var url = path;  window.open(url, "pptwindow", "width=790,height=600,innerWidth=790,innerHeight=600,status");}