document.write(''); function SetCookie(sName, sValue) { document.cookie = sName + "=" + sValue; } function GetCookie(sName) { // cookies are separated by semicolons var aCookie = document.cookie.split("; "); for (var i=0; i < aCookie.length; i++) { // a name/value pair (a crumb) is separated by an equal sign var aCrumb = aCookie[i].split("="); if (sName == aCrumb[0]) return aCrumb[1]; } // a cookie with the requested name does not exist return null; } function showGif(o){ var x, y, hWnd; var tag, href, url; var startHTML = o.innerHTML.indexOf('href=') +6; var endHTML = o.innerHTML.indexOf('>') - 1; tag = o.innerHTML.substring(startHTML, endHTML); SetCookie("imgfile",tag); url = "showscrn.htm"; x = (window.screen.availWidth - 575) * .5; y = (window.screen.availheight - 400) * .5; if (window.name == "xShowScreen"){ window.location=url; } else { hWnd=window.open(url,"xShowScreen","left="+x+",top="+y+",width=750,height=550,menubar=no,toolbar=no,location=no,status=no,scrollbars=yes,resizable=yes",false); if (document.referrer != "") { window.location = document.referrer; } else { window.back; } } return false; } function ShowReference(){ var realUrl; var tmpName; var x; realUrl = " "; tmpName = " "; x = 0; tmpName = parent.location.href.toString(); // find the directory and filename of web url x = tmpName.lastIndexOf("/",tmpName.length); if (x < 0) { // could not find a url separator. try to find a file separator x = tmpName.lastIndexOf("\\",tmpName.length); } // change the reference to jobaid for the base*.htm files realUrl = tmpName.substr(x + 3,tmpName.length - (x + 1)); // open a default browser window window.open(realUrl,"","",false); } function ShowReferencePrint(){ var realUrl; var tmpName; var x; realUrl = " "; tmpName = " "; x = 0; tmpName = parent.location.href.toString(); // find the directory and filename of web url x = tmpName.lastIndexOf("/",tmpName.length); if (x < 0) { // could not find a url separator. try to find a file separator x = tmpName.lastIndexOf("\\",tmpName.length); } // change the reference to jobaid for the base*.htm files realUrl = "p_" + tmpName.substr(x + 1,tmpName.length - (x + 1)); // open a default browser window window.open(realUrl,"","",false); } function AddProcessLink(tcodeline) { document.write(tcodeline); var tcode; tcodeend = tcodeline.length-13; tcodestart = tcodeline.lastIndexOf(">", tcodeend)+1; tCode = tcodeline.substring(tcodestart,tcodeend); theDiv = document.getElementById("ProcessList"); theDiv.innerHTML = theDiv.innerHTML + ""; } //SCORM STUFF var bScormInitialized = false; var findAPITries; var SCORMAPI = null; var mScormv = 0; //0 = none, 1 = SCORM 1.2, 2 = 2004 function findAPI( win ){ if(!(top==self)){ if (parent.frames.length > 0){ for (var i = 0 ; i < win.frames.length ; i++){ var winFrameApi = win.frames[i].API; if (typeof(winFrameApi) != 'undefined' && win != win.opener && winFrameApi != null){ return win.frames[i].API; } } } } while ( (win.API_1484_11 == null) && (win.API == null) && (win.parent != null) && (win.parent != win) ) { findAPITries++; if ( findAPITries > 500 ) { //alert( "Error finding API -- too deeply nested." ); mScormv = 0; return null; } win = win.parent; } if(win.API_1484_11 != null) { mScormv = 2; return win.API_1484_11; } else { mScormv = 1; return win.API; } } function getAPI(){ var theAPI = findAPI( window ); if ( (theAPI == null) && (window.opener != null) && (typeof(window.opener) != "undefined") ) { theAPI = findAPI( window.opener ); } if (theAPI == null) { // alert( "Unable to locate the LMS's API Implementation.\n" + // "Communication with the LMS will not occur." ); noAPIFound = true; mScormv = 0; } return theAPI } function LoadScorm() { try{ if(!bScormInitialized) { SCORMAPI = getAPI(); switch(mScormv) { case 0: {break;} case 1: { SCORMAPI.LMSInitialize(""); break; } case 2: { SCORMAPI.Initialize(""); break; } } bScormInitialized = true; } } catch(er) { bScormInitialized = false; } } function TerminateScorm() { if(bScormInitialized) { switch(mScormv) { case 0: {break;} case 1: { SCORMAPI.LMSFinish(""); break; } case 2: { SCORMAPI.Terminate(""); break; } } bScormInitialized = false; } } function LoadJumpBar() { var tBar = new RESITEJumpBar(document.getElementById("JumpBarLocation"), "http://ncwitapbea501.its.state.nc.us/beaconhelp"); } //END SCORM STUFF