// -------------------------------------------------------------------------------// Code to Open Pop-Up Windows// Only needs to be included in the episode.js file once.var mWin = null;// Opens a popup window at the default sizefunction openWin(inUrl) {    mWin = window.open(inUrl,"","menubar,resizable,scrollbars,height=420,width=400");    if (mWin != null) {		mWin.focus();	}}// Opens a popup window at the specified size.function openWinWH(inUrl,inWidth,inHeight) {	var theFStr = "menubar,resizable,scrollbars,height=" + inHeight + ",width=" + inWidth;    mWin = window.open(inUrl,"",theFStr);    if (mWin != null) {		mWin.focus();	}}// Opens a popup window at the specified size. Does not replace the contents of other// popup windows unless the same "inWinNum" is provided.function openMultiWinWH(inUrl,inWidth,inHeight, inWinNum) {	var theFStr = "menubar,resizable,scrollbars,height=" + inHeight + ",width=" + inWidth;    var theWin = window.open(inUrl,inWinNum,theFStr);    if (theWin != null) {		theWin.focus();	}}var mnumq1 = 4;var canswers1 = new Array(mnumq1 + 1);var mnumchoices1 = new Array(mnumq1 + 1);var sanswers1 = new Array(mnumq1 + 1);mnumchoices1[1] = "5";canswers1[1] = "Alternative Evaluation";sanswers1[1] = "";mnumchoices1[2] = "5";canswers1[2] = "Problem Recognition";sanswers1[2] = "";mnumchoices1[3] = "5";canswers1[3] = "Post-purchase Evaluation";sanswers1[3] = "";mnumchoices1[4] = "5";canswers1[4] = "Information Search";sanswers1[4] = "";function gatherAnswers1(form) {var theList;var theListVal;for (i=0; i < mnumq1; i++) {		theList = form.elements[i];		theListVal = theList.options[theList.selectedIndex].value;		sanswers1[i+1] = theListVal;		if (sanswers1[i+1].toLowerCase() == "choose one") {			sanswers1[i+1] = "";		}	}}function getPic1(inNum) {	var theOut;	if (inNum > mnumq1) return "";	if (sanswers1[inNum].toLowerCase() == canswers1[inNum].toLowerCase()) {		theOut = "<img src='../images/darkGreenCheck.gif' WIDTH=22 HEIGHT=16>";	} else {		theOut = "<img src='../images/redCheck.gif' WIDTH=22 HEIGHT=16>";	}	return theOut;}function getAnswer1(inNum) {	if (inNum > mnumq1) return "";	var theOut = "" + sanswers1[inNum];	return theOut;}var mnumq2 = 3;var sanswers2 = new Array(mnumq2 + 1);sanswers2[1] = "";sanswers2[2] = "";sanswers2[3] = "";function gatherAnswers2(form) {	for (i=0; i < mnumq2; i++) {		sanswers2[i+1] = form.elements[i].value;		sanswers2[i+1] = sanswers2[i+1].replace(/</g,"&lt;");	}}function getAnswer2(inNum) {	if (inNum > mnumq2) return "";	var theOut = "" + sanswers2[inNum];	return theOut;}var mnumq3 = 3;var canswers3 = new Array(mnumq3 + 1);var mnumchoices3 = new Array(mnumq3 + 1);var sanswers3 = new Array(mnumq3 + 1);mnumchoices3[1] = "3";canswers3[1] = "b";sanswers3[1] = "";mnumchoices3[2] = "4";canswers3[2] = "d";sanswers3[2] = "";mnumchoices3[3] = "4";canswers3[3] = "b";sanswers3[3] = "";function gatherAnswers3(form) {	for (i=0; i<=mnumq3; i++) {		sanswers3[i] = "";	}	var k = 0;	for (j = 1; j < (mnumq3+1); j++) {		for (i=0; i<mnumchoices3[j]; i++) {			if (form.elements[k].checked) {				if (i%mnumchoices3[j] == 0) {					sanswers3[j] = "a";				} else if (i%mnumchoices3[j] == 1) {					sanswers3[j] = "b";				} else if (i%mnumchoices3[j] == 2) {					sanswers3[j] = "c";				} else if (i%mnumchoices3[j] == 3) {					sanswers3[j] = "d";				} else if (i%mnumchoices3[j] == 4) {					sanswers3[j] = "e";				} else if (i%mnumchoices3[j] == 5) {					sanswers3[j] = "f";				} else if (i%mnumchoices3[j] == 6) {					sanswers3[j] = "g";				}			}			k++;		}	}}function getPic3(inNum) {	var theOut;	if (inNum > mnumq3) return "";	if (sanswers3[inNum] == canswers3[inNum]) {		theOut = "<img src='../images/darkGreenCheck.gif' WIDTH=22 HEIGHT=16>";	} else {		theOut = "<img src='../images/redCheck.gif' WIDTH=22 HEIGHT=16>";	}	return theOut;}function getAnswer3(inNum) {	if (inNum > mnumq3) return "";	var theOut = "" + sanswers3[inNum];	return theOut;}
