// Copyright 1998,1999 Macromedia, Inc. All rights reserved.

//************** GLOBAL ID's MUST BE FOR CURRENT COURSE ***************

var course_id = '';
var look_id = 0;
var sub_look_id = 0;

//*********************************************************************

function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}
function MM_changeProp(objName,x,theProp,theValue) { //v3.0
  var obj = MM_findObj(objName);
  if (obj && (theProp.indexOf("style.")==-1 || obj.style)) eval("obj."+theProp+"='"+theValue+"'");
}
function MM_checkBrowser(NSvers,NSpass,NSnoPass,IEvers,IEpass,IEnoPass,OBpass,URL,altURL) { //v4.0
  var newURL='', verStr=navigator.appVersion, app=navigator.appName, version = parseFloat(verStr);
  if (app.indexOf('Netscape') != -1) {
    if (version >= NSvers) {if (NSpass>0) newURL=(NSpass==1)?URL:altURL;}
    else {if (NSnoPass>0) newURL=(NSnoPass==1)?URL:altURL;}
  } else if (app.indexOf('Microsoft') != -1) {
    if (version >= IEvers || verStr.indexOf(IEvers) != -1)
     {if (IEpass>0) newURL=(IEpass==1)?URL:altURL;}
    else {if (IEnoPass>0) newURL=(IEnoPass==1)?URL:altURL;}
  } else if (OBpass>0) newURL=(OBpass==1)?URL:altURL;
  if (newURL) { window.location=unescape(newURL); document.MM_returnValue=false; }
}
function MM_checkPlugin(plgIn, theURL, altURL, autoGo) { //v4.0
  var ok=false; document.MM_returnValue = false;
  with (navigator) if (appName.indexOf('Microsoft')==-1 || (plugins && plugins.length)) {
    ok=(plugins && plugins[plgIn]);
  } else if (appVersion.indexOf('3.1')==-1) { //not Netscape or Win3.1
    if (plgIn.indexOf("Flash")!=-1 && window.MM_flash!=null) ok=window.MM_flash;
    else if (plgIn.indexOf("Director")!=-1 && window.MM_dir!=null) ok=window.MM_dir;
    else ok=autoGo; }
  if (!ok) theURL=altURL; if (theURL) window.location=theURL;
}
function MM_controlShockwave(objStr,x,cmdName,frameNum) { //v3.0
  var obj=MM_findObj(objStr);
  if (!obj) obj=MM_findObj(x);
  if (obj) eval('obj.'+cmdName+'('+((cmdName=='GotoFrame')?frameNum:'')+')');
}
function MM_controlSound(x, _sndObj, sndFile) { //v3.0
  var i, method = "", sndObj = eval(_sndObj);
  if (sndObj != null) {
    if (navigator.appName == 'Netscape') method = "play";
    else {
      if (window.MM_WMP == null) {
        window.MM_WMP = false;
        for(i in sndObj) if (i == "ActiveMovie") {
          window.MM_WMP = true; break; 
      } }
      if (window.MM_WMP) method = "play";
      else if (sndObj.FileName) method = "run";
  } }
  if (method) eval(_sndObj+"."+method+"()");
  else window.location = sndFile; 
}
function MM_displayStatusMsg(msgStr) { //v1.0
  status=msgStr;
  document.MM_returnValue = true;
}
function MM_findObj(r, d) { //v4.0  special CourseBuilder version of findObj
  var p,n,i,x;  if (!d) d=document; n=r.substring(r.lastIndexOf(".")+1);
  if (n.indexOf("layers[")==0) n=n.substring(8,n.length-2);
  if (parent.frames.length) { if (r.indexOf(".frames[")==6) d=eval(r.substring(0,r.indexOf("]")+10));
    if ((p=r.indexOf("?"))!=-1) {n=r.substring(0,p); d=parent.frames[r.substring(p+1)].document;} }
  if (!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}
function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function MM_popupMsg(msg) { //v1.0
  alert(msg);
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_setTextOfFrame(frameRef,newHTML,preserveBg) { //v2.0
  var bodyAttr="", frameObj=eval(frameRef);
  if (frameObj) with (frameObj.document) { //if frame found
    if (preserveBg) bodyAttr = " BGCOLOR='"+bgColor+"' TEXT='"+fgColor+"'";
    write("<HTML><BODY"+bodyAttr+">"+unescape(newHTML)+"</BODY></HTML>");
    close();
  }
}
function MM_setTextOfLayer(objName,x,newText) { //v3.0
  if ((obj=MM_findObj(objName))!=null) with (obj)
    if (navigator.appName=='Netscape') {document.write(unescape(newText)); document.close();}
    else innerHTML = unescape(newText);
}
function MM_setTextOfTextfield(objName,x,newText) { //v3.0
  var obj = MM_findObj(objName); if (obj) obj.value = newText;
}
function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
      } else if (test!='R') {
        if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (val<min || max<val) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
  } if (errors) alert('The following error(s) occurred:\n'+errors);
  document.MM_returnValue = (errors == '');
}

function replaceSubstring(inputString, fromString, toString) {
   // Goes through the inputString and replaces every occurrence of fromString with toString
   var temp = inputString;
   if (fromString == "") {
      return inputString;
   }
   if (toString.indexOf(fromString) == -1) { // If the string being replaced is not a part of the replacement string (normal situation)
      while (temp.indexOf(fromString) != -1) {
         var toTheLeft = temp.substring(0, temp.indexOf(fromString));
         var toTheRight = temp.substring(temp.indexOf(fromString)+fromString.length, temp.length);
         temp = toTheLeft + toString + toTheRight;
      }
   } else { // String being replaced is part of replacement string (like "+" being replaced with "++") - prevent an infinite loop
      var midStrings = new Array("~", "`", "_", "^", "#");
      var midStringLen = 1;
      var midString = "";
      // Find a string that doesn't exist in the inputString to be used
      // as an "inbetween" string
      while (midString == "") {
         for (var i=0; i < midStrings.length; i++) {
            var tempMidString = "";
            for (var j=0; j < midStringLen; j++) { tempMidString += midStrings[i]; }
            if (fromString.indexOf(tempMidString) == -1) {
               midString = tempMidString;
               i = midStrings.length + 1;
            }
         }
      } // Keep on going until we build an "inbetween" string that doesn't exist
      // Now go through and do two replaces - first, replace the "fromString" with the "inbetween" string
      while (temp.indexOf(fromString) != -1) {
         var toTheLeft = temp.substring(0, temp.indexOf(fromString));
         var toTheRight = temp.substring(temp.indexOf(fromString)+fromString.length, temp.length);
         temp = toTheLeft + midString + toTheRight;
      }
      // Next, replace the "inbetween" string with the "toString"
      while (temp.indexOf(midString) != -1) {
         var toTheLeft = temp.substring(0, temp.indexOf(midString));
         var toTheRight = temp.substring(temp.indexOf(midString)+midString.length, temp.length);
         temp = toTheLeft + toString + toTheRight;
      }
   } // Ends the check to see if the string being replaced is part of the replacement string or not
   return temp; // Send the updated string back to the user
} // Ends the "replaceSubstring" function


function exitCCH() {
	input_box=confirm("Are you sure you want to close the window and log out of the course?");
		if (input_box==true) { 
			// Output when OK is clicked
			top.window.close(); 
		}
		else
		{
		// Output when Cancel is clicked
		//return(false);
		}
}

function MM_pre_changeProp(objName,x,theProp,theValue) {
	// for courses running in variable postcard mode determine where menus should display :
	var objMenuItem;
	switch (objName) {
		case 'menMenu' : {
			// get the position of the menu button :
			objMenuItem = document.getElementById("menMenu");
			objMenuItem.style.left = getAbsX(document.getElementById("imgMenu"));
			objMenuItem.style.top = getAbsY(document.getElementById("imgMenu")) + 20;
		} break;
		case 'menTools' : {
			// get the position of the menu button :
			objMenuItem = document.getElementById("menTools");
			objMenuItem.style.left = getAbsX(document.getElementById("imgTools"));
			objMenuItem.style.top = getAbsY(document.getElementById("imgTools")) + 20;
		} break;
		default : {
			// alert(objName);
		} break;
	}
	
	MM_changeProp(objName,x,theProp,theValue);
}

function getAbsX(elt) {
	return (elt.x) ? elt.x : getAbsPos(elt,"Left");
}

function getAbsY(elt) {
	return (elt.y) ? elt.y : getAbsPos(elt,"Top");
}

function getAbsPos(elt,which) {
	iPos = 0;
	while (elt != null) {
		iPos += elt["offset" + which];
		elt = elt.offsetParent;
	}
	return iPos;
}

function openWin(url, name, type) {
	
	var myattribs, preUrl, popupWin, errCount
	
	switch (type) {
		case 'glossary': {
			preUrl = '../../../../course/' + course_id + '/pages/glossary/';
			myattribs = 'toolbar=no,top=0,left=0,titlebar=no,status=0,scrollbars=no,width=526,height=500,top=0 left=0';		
		} break;
		case 'help': {
			//preUrl = '../../../../course/' + course_id + '/pages/help/';
			preUrl = '../pages/help/';
			myattribs = 'toolbar=no,top=0,left=0,titlebar=no,status=0,scrollbars=no,width=632,height=500,top=0 left=0';		
		} break;
		case 'menuhelp': {
			//preUrl = '../../../../course/' + course_id + '/pages/help/';
			preUrl = 'pages/help/';
			myattribs = 'toolbar=no,top=0,left=0,titlebar=no,status=0,scrollbars=no,width=632,height=500,top=0 left=0';		
		} break;
		case 'roboDemo': {
			preUrl = '../../../../course/' + course_id + '/pages/popups/';
			myattribs = 'toolbar=no,top=0,left=0,titlebar=no,status=0,scrollbars=no,width=642,height=560,top=0 left=0';		
		} break;
		case 'moreInfo': {
			preUrl = '../../../../course/' + course_id + '/pages/popups/';
			myattribs = 'toolbar=no,top=0,left=0,titlebar=no,status=0,scrollbars=no,width=526,height=500,top=0 left=0';		
		} break;
		case 'faq': {
			preUrl = '../../../../course/' + course_id + '/pages/faq/';
			myattribs = 'toolbar=no,top=0,left=0,titlebar=no,status=0,scrollbars=no,width=670,height=405,top=0 left=0';		
		} break;
		
		default: {
			alert('Incorrect type - please fix. Types are: "glossary", "conHelp", "help", "roboDemo", "moreInfo", "flash", "assessment", "faq"');
			errCount = 1;
		}
		
	}
	
	if (errCount != 1) {
		url = preUrl + url;
		popupWin = window.open(url, name, myattribs);
		return popupWin;
	}
	
}


function getArgs() {
	var args = new Object();
	// get querystring
	var query = location.search.substring(1); 
	// split it
	var pairs = query.split("&"); 

	// begin loop through the querystring
	for(var i = 0; i < pairs.length; i++) {

		// look for "name=value"
		var pos = pairs[i].indexOf('='); 
		// if not found, skip to next
		if (pos == -1) continue; 
		// extract the name
		var argname = pairs[i].substring(0,pos); 

		// extract the value
		var value = pairs[i].substring(pos+1); 
		// store as a property
		args[argname] = unescape(value); 

	}
	return args; // Return the Object
}

function conHelpToggle(item) {
	// get div tag to toggle
	obj=document.getElementById(item);
	
	//set visibility of object 
	visible=(obj.style.display!="none")
	
	imgKey=document.getElementById("img" + item);
	var myImgString = imgKey.src;
	
		
	if (myImgString.indexOf("pixel.gif") == -1) {
		if (visible) {
			obj.style.display="none";
			imgKey.src = '../../../../look/' + look_id + '/' + sub_look_id + '/images/conhelp/icon_plus.gif';
		} else {
			obj.style.display="block";
			imgKey.src = '../../../../look/' + look_id + '/' + sub_look_id + '/images/conhelp/icon_minus.gif';
		}
	}
}


function conHelpSubToggle(parent, item) {
	// get div tag to toggle
	obj=document.getElementById(item);
	
	//set visibility of object 
	visible=(obj.style.display!="none")
	
	imgKey=document.getElementById("img" + item);
	var myImgString = imgKey.src;
	
		
	if (myImgString.indexOf("pixel.gif") == -1) {
		if (visible) {
			obj.style.display="none";
			imgKey.src = '../../../../look/' + look_id + '/' + sub_look_id + '/images/conhelp/icon_plus.gif';
		} else {
			obj.style.display="block";
			imgKey.src = '../../../../look/' + look_id + '/' + sub_look_id + '/images/conhelp/icon_minus.gif';
		}
	}
}

function conHelpExpand() {
	divs=document.getElementsByTagName("DIV");
	for (i=0;i<divs.length;i++) {
     		divs[i].style.display="block";
     		
     		var divID = divs[i].id;
     		if (divID.indexOf('div') == -1) {
       			
     		  	imgKey=document.getElementById("img" + item);
			var myImgString = imgKey.src;
     		  	        	
			if (myImgString.indexOf("pixel.gif") == -1) {
				imgKey.src ='../../../../look/' + look_id + '/' + sub_look_id + '/images/conhelp/icon_minus.gif';
			}
     		}	
   	}
 }
	
function conHelpCollapse() {
	divs=document.body.getElementsByTagName("DIV");
	
	for (i=0;i<divs.length;i++) {
		var divID = divs[i].id;
		if (divID.indexOf('div') == -1) {
		
			divs[i].style.display="none";
			
			imgKey = document.getElementById("img" + divs[i].id);
			var myImgString = imgKey.src;
			
			if (myImgString.indexOf("pixel.gif") == -1) {
				imgKey.src = '../../../../look/' + look_id + '/' + sub_look_id + '/images/conhelp/icon_plus.gif';
	     		}
	     		
	     	    		
     		}	
   	}
}

function conHelpCollapseAllBut(item) {
	obj=document.getElementById(item);
   	//alert(item);
   	divs=document.getElementsByTagName("DIV");
   	for (i=0;i<divs.length;i++) {
   		var divID = divs[i].id;
   		if (divID != (item)) {
   			if (divID.indexOf('div') == -1) {
   				divs[i].style.display="none";	
   				
   				imgKey = document.getElementById("img" + divs[i].id);
				var myImgString = imgKey.src;
		    	
				if (myImgString.indexOf("pixel.gif") == -1) {
					imgKey.src = '../../../../look/' + look_id + '/' + sub_look_id + '/images/conhelp/icon_plus.gif';
					
				}
			}	
		}
   	}
}


function conHelpCollapseAllSubsBut(parent, item) {
	obj=document.getElementById(item);
   	divs=document.getElementsByTagName("DIV");
   	for (i=0;i<divs.length;i++) {
   		var divID = divs[i].id;
   		if (divID != (parent)) {
   			if (divID == item) {
   			
   			}
   			else if (divID.indexOf('div') == -1) {
   				divs[i].style.display="none";	
   				
   				imgKey = document.getElementById("img" + divs[i].id);
				var myImgString = imgKey.src;
		    	
				if (myImgString.indexOf("pixel.gif") == -1) {
					imgKey.src = '../../../../look/' + look_id + '/' + sub_look_id + '/images/conhelp/icon_plus.gif';
					
				}
			}	
		}
   	}
}



function Highlight(item) {
	//var lnk = document.getElementById('lnk' + item);
	//lnk.style.color = '#000000';
	

	var tbl = document.getElementById('tblanc' + item);
	tbl.bgColor = '#d3d3d3';
	
}


function goToAnchor() {
	
		// get the values
		var args = getArgs(); //get the arguments
		if (args.anchor) {
			anchor = (args.anchor);
		
			//Highlight(anchor);
			
			conHelpToggle('anc' + anchor);
			
			// test if we should open a sub item
			if (args.subAnchor) {
				subAnchor = (args.subAnchor);
			}
			else {
				subAnchor = null;
			}
			
			if (subAnchor != null) {
				// toggle open the sub anchor
				conHelpSubToggle('anc' + anchor, 'anc' + anchor + 'subanc' + subAnchor);
				document.location = '#anchor' + anchor + 'subAnchor' + subAnchor;
				
			}
			else {
				document.location = '#anchor' + anchor;
			}
		}		
}


function findPosX(obj)
{
	var curleft = 0;
	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			curleft += obj.offsetLeft
			obj = obj.offsetParent;
		}
	}
	else if (obj.x)
		curleft += obj.x;
	return curleft;
}

function findPosY(obj)
{
	var curtop = 0;
	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			curtop += obj.offsetTop
			obj = obj.offsetParent;
		}
	}
	else if (obj.y)
		curtop += obj.y;
	return curtop;
}

//************** NEW STUFF FOR DROP DOWN MENUS **********************
// Global menu element handle:
///////////////////////////////////////
var LiveMenu = null;

// Global menu timeout handle:
///////////////////////////////////////
var Timeout_ID = null;

// menu over code
function menuOver(menuID, lookID, subLookID) {
	var intX;
	var intY;

	if ((document.getElementById) && (document.getElementById(menuID)!= null))
	{
		// Test if this menu is already open
		if(LiveMenu==document.getElementById(menuID))
		{
			// Do not close it
			clearTimeout(Timeout_ID);
		}
		else
		{
			// If another menu is open 
			if(LiveMenu!=null)
			{
				// Do not wait, shut it now
				clearTimeout(Timeout_ID);
				hideNow(lookID, subLookID);
			}
		}
		LiveMenu = document.getElementById(menuID);
	}
	else
	{
		LiveMenu = null;
	}
		
	// display appropriate drop down DIV
		
	if (LiveMenu != null) 
	{
		var imgObj = document.getElementById("imgMenu");
		intX = findPosX(imgObj);
		intY = findPosY(imgObj);
		
		intX -= 5;
		intY += 40;
		LiveMenu.style.left = intX;
		LiveMenu.style.top = intY;
		LiveMenu.style.visibility = 'visible';
	}
	
	// change the menu image
	if (LiveMenu.id == 'menMenu')  
	{
		imgKey=document.getElementById("imgMenu");
		imgKey.src = BasePath + '/images/framework/btn_menu_1.gif';
	}
	else if (LiveMenu.id == 'mainMenTools')
	{
		imgKey=document.getElementById("imgTools");
		imgKey.src = BasePath + '/images/framework/btn_tools_1.gif';
  	}
	else
	{
		imgKey=document.getElementById("imgTools");
		imgKey.src = BasePath + '/images/framework/btn_tools_1.gif';
  	}
}


//menu out code - this is for image mouseout to change image back, if mouse travels over div, stayOver is called
function menuOut(menuID, lookID, subLookID) {

	// Prepare to shut it in 250 milliseconds
	if (LiveMenu == document.getElementById(menuID))
	{
		// close the menu in ??? milliseconds, can be avoided by rolling into Menu Div
		Timeout_ID = window.setTimeout('hideNow(' + lookID + ',' + subLookID + ');',250);
		
	}
	else
	{
		alert('this is not same menu');
	}
}


// stay over code, so div doesnt dissappear
function stayOpen(menuID, lookID, subLookID) {

	// Do not close it
	clearTimeout(Timeout_ID);	
}

//hideNow code - to get rid of menus
function hideNow(lookID, subLookID) {

	LiveMenu.style.visibility = 'hidden';
	    		
	// now do image swap back to original menu or tools image
	if (LiveMenu.id == 'menMenu')  
	{
		imgKey=document.getElementById("imgMenu");
		imgKey.src = BasePath + '/images/framework/btn_menu_0.gif';
	}
	else if (LiveMenu.id == 'mainMenTools') 
	{
		imgKey=document.getElementById("imgTools");
		imgKey.src = BasePath + '/images/framework/btn_tools_0.gif';
	}
	else if (LiveMenu.id == 'menTools') 
	{
		imgKey=document.getElementById("imgTools");
		imgKey.src = BasePath + '/images/framework/btn_tools_0.gif';
	}
}

// 2005 Dreamweaver Additions
function Feedback(type)
{
	switch(type)
	{
		case 'correct' :
		{
			alert('show correct popup window');
		} break;
		case 'incorrect' :
		{
			alert('show incorrect popup window');
		} break;
	}
}

function MenuRollOver(obj, state)
{
	document.getElementById(obj).className = (state == 'on') ? 'menucellhover' : '';
}

function ToggleFrameworkButton(ButtonID, State)
{
	var ButtonContainer = document.getElementById(ButtonID + 'ButtonContainer');
	var ButtonContainerSrc;
	if (State == 0)
	{
		var PagePath = eval(ButtonID + 'PagePath');
		ButtonContainerSrc = '<a name="ancBack" onmouseover="MM_swapImage(\'img' + ButtonID + '\',\'\',\'' + BasePath + '/images/framework/btn_' + ButtonID.toLowerCase() + '_1.gif\'';
		ButtonContainerSrc += ',1)" onmouseout="MM_swapImgRestore()" href="javascript:CompletePage();">';
		ButtonContainerSrc += '<img src="' + BasePath + '/images/framework/btn_' + ButtonID.toLowerCase() + '_0.gif" name="img' + ButtonID + '" width="55" height="18" hspace="0" vspace="0" border="0" id="img' + ButtonID + '"></a>';
	}
	else
	{
		//ButtonContainerSrc = '<img src="' + BasePath + '/images/framework/btn_' + ButtonID.toLowerCase() + '_2.gif" name="img' + ButtonID + '" width="55" height="18" hspace="0" vspace="0" border="0" id="img' + ButtonID + '">';
		ButtonContainersrc = '<img src="' + BasePath + '/images/common/pixel.gif" width="55" height="18">';
	}
	ButtonContainer.innerHTML = ButtonContainerSrc;
}

function enableNext()
{
		ToggleFrameworkButton('Next', 0);
}

// CALLED ONLOAD OF A SHADO PAGE:
function ShadoPageInit()
{
	// FRAMEWORK ROLLOVERS:
	// MM_preloadImages('../images/framework/btn_back_1.gif','../images/framework/btn_next_1.gif', '../images/framework/btn_module_map_1.gif','../images/framework/btn_modulemap_1.gif','../images/framework/btn_help_1.gif','../images/framework/btn_exit_1.gif');
	// DYNAMIC POSITIONING OF TEXT IN PROGRESS INDICATOR:
	// PositionProgressText();
}

// LAUNCHES AN ASSESSMENT FROM A SHADO COURSE (IN THE ORIGINAL VERSITY WINDOW):
function LaunchAssessment()
{
		if (!top.window.opener || (UserType == 'shado'))
		{
			// open in new window:
			window.open(AssessmentURL);
		}
		else
		{
			// open in Metime window:
			top.window.opener.document.location.href = AssessmentURL;
		}
		top.window.close();
}

// ASKS THE USER IF THEY WISH TO LAUNCH THE ASSESSMENT AFTER HAVING VIEWED ALL PAGES:
function ConfirmAssessment()
{
		alert('Congratulations, you have now completed the Welcome to Maccas module. You can now attempt the Restaurant Basics quiz.  To do so, return to the Main Menu and click on the Restaurant Basics quiz button.\n\nIf you wish to continue reviewing the module at this stage you can return to the Main Menu at any time to launch the Restaurant Basics quiz.');
		/*
		if (confirm('"Congratulations, you have now completed the Welcome to Maccas module. You can now attempt the Restaurant Basics quiz.  To do so, return to the Main Menu and click on the Restaurant Basics quiz button.\n\nIf you wish to continue reviewing the module at this stage you can return to the Main Menu at any time to launch the Restaurant Basics quiz."'))
		{
			LaunchAssessment();
		}
		*/
}

var PopupsViewed = 0;
function RegisterPopup(PopupCount)
{
	PopupsViewed++;
	if (PopupsViewed == PopupCount)
	{
		enableNext();
	}
}