// -------------------------------------------------------------------------------// Code to Open Pop-Up Windows// Only needs to be included in the episode.js file once.// Opens a popup window at the default sizefunction openWin(inUrl) {    var theWin = window.open(inUrl,"popup","menubar,resizable,scrollbars,height=420,width=400");    if (theWin != null) {		theWin.focus();	}}// Opens a popup window at the specified size.function openWinWH(inUrl,inWidth,inHeight) {	var theFStr = "menubar,resizable,scrollbars,height=" + inHeight + ",width=" + inWidth;    var theWin = window.open(inUrl,"popup",theFStr);    if (theWin != null) {		theWin.focus();	}}// Opens a popup window at the specified size. Does not replace the contents of other// popup windows unless the same "inWinName" is provided.function openMultiWin(inUrl, inWinName) {	var theFStr = "menubar,resizable,scrollbars,height=420,width=400";    var theWin = window.open(inUrl,inWinName,theFStr);    if (theWin != null) {		theWin.focus();	}}// Opens a popup window at the specified size. Does not replace the contents of other// popup windows unless the same "inWinName" is provided.function openMultiWinWH(inUrl,inWidth,inHeight, inWinName) {	var theFStr = "menubar,resizable,scrollbars,height=" + inHeight + ",width=" + inWidth;    var theWin = window.open(inUrl,inWinName,theFStr);    if (theWin != null) {		theWin.focus();	}}var mnumq1 = 6;var canswers1 = new Array(mnumq1 + 1);var mnumchoices1 = new Array(mnumq1 + 1);var sanswers1 = new Array(mnumq1 + 1);mnumchoices1[1] = "2";canswers1[1] = "False";sanswers1[1] = "";mnumchoices1[2] = "2";canswers1[2] = "False";sanswers1[2] = "";mnumchoices1[3] = "2";canswers1[3] = "True";sanswers1[3] = "";mnumchoices1[4] = "2";canswers1[4] = "False";sanswers1[4] = "";mnumchoices1[5] = "2";canswers1[5] = "False";sanswers1[5] = "";mnumchoices1[6] = "2";canswers1[6] = "False";sanswers1[6] = "";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 = 4;var canswers2 = new Array(mnumq2 + 1);var mnumchoices2 = new Array(mnumq2 + 1);var sanswers2 = new Array(mnumq2 + 1);mnumchoices2[1] = "4";canswers2[1] = "c";sanswers2[1] = "";mnumchoices2[2] = "4";canswers2[2] = "b";sanswers2[2] = "";mnumchoices2[3] = "4";canswers2[3] = "c";sanswers2[3] = "";mnumchoices2[4] = "5";canswers2[4] = "e";sanswers2[4] = "";function gatherAnswers2(form) {	for (i=0; i<=mnumq2; i++) {		sanswers2[i] = "";	}	var k = 0;	for (j = 1; j < (mnumq2+1); j++) {		for (i=0; i<mnumchoices2[j]; i++) {			if (form.elements[k].checked) {				if (i%mnumchoices2[j] == 0) {					sanswers2[j] = "a";				} else if (i%mnumchoices2[j] == 1) {					sanswers2[j] = "b";				} else if (i%mnumchoices2[j] == 2) {					sanswers2[j] = "c";				} else if (i%mnumchoices2[j] == 3) {					sanswers2[j] = "d";				} else if (i%mnumchoices2[j] == 4) {					sanswers2[j] = "e";				} else if (i%mnumchoices2[j] == 5) {					sanswers2[j] = "f";				} else if (i%mnumchoices2[j] == 6) {					sanswers2[j] = "g";				}			}			k++;		}	}}function getPic2(inNum) {	var theOut;	if (inNum > mnumq2) return "";	if (sanswers2[inNum] == canswers2[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 getAnswer2(inNum) {	if (inNum > mnumq2) return "";	var theOut = "" + sanswers2[inNum];	return theOut;}var mnumq3 = 5;var canswers3 = new Array(mnumq3 + 1);var mnumchoices3 = new Array(mnumq3 + 1);var sanswers3 = new Array(mnumq3 + 1);mnumchoices3[1] = "6";canswers3[1] = "$275,000";sanswers3[1] = "";mnumchoices3[2] = "6";canswers3[2] = "$102,000";sanswers3[2] = "";mnumchoices3[3] = "6";canswers3[3] = "$77,000";sanswers3[3] = "";mnumchoices3[4] = "6";canswers3[4] = "$96,000";sanswers3[4] = "";mnumchoices3[5] = "6";canswers3[5] = "$96,000";sanswers3[5] = "";function gatherAnswers3(form) {var theList;var theListVal;for (i=0; i < mnumq3; i++) {		theList = form.elements[i];		theListVal = theList.options[theList.selectedIndex].value;		sanswers3[i+1] = theListVal;		if (sanswers3[i+1].toLowerCase() == "choose one") {			sanswers3[i+1] = "";		}	}}function getPic3(inNum) {	var theOut;	if (inNum > mnumq3) return "";	if (sanswers3[inNum].toLowerCase() == canswers3[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 getAnswer3(inNum) {	if (inNum > mnumq3) return "";	var theOut = "" + sanswers3[inNum];	return theOut;}var mnumq4 = 21;var canswers4 = new Array(mnumq4 + 1);var sanswers4 = new Array(mnumq4 + 1);canswers4[1] = "0";sanswers4[1] = "";canswers4[2] = "0";sanswers4[2] = "";canswers4[3] = "1";sanswers4[3] = "";canswers4[4] = "0";sanswers4[4] = "";canswers4[5] = "0";sanswers4[5] = "";canswers4[6] = "1";sanswers4[6] = "";canswers4[7] = "1";sanswers4[7] = "";canswers4[8] = "1";sanswers4[8] = "";canswers4[9] = "0";sanswers4[9] = "";canswers4[10] = "1";sanswers4[10] = "";canswers4[11] = "0";sanswers4[11] = "";canswers4[12] = "1";sanswers4[12] = "";canswers4[13] = "0";sanswers4[13] = "";canswers4[14] = "1";sanswers4[14] = "";canswers4[15] = "0";sanswers4[15] = "";canswers4[16] = "0";sanswers4[16] = "";canswers4[17] = "0";sanswers4[17] = "";canswers4[18] = "1";sanswers4[18] = "";canswers4[19] = "1";sanswers4[19] = "";canswers4[20] = "0";sanswers4[20] = "";canswers4[21] = "0";sanswers4[21] = "";function gatherAnswers4(form) {	for (i=1; i <= mnumq4; i++) {	    if (eval("form.q" + i + ".checked")) {		    sanswers4[i] = "1";	    } else {		    sanswers4[i] = "0";	    }	}}function getPic4(inNum) {	var theOut;	if (inNum > mnumq4) return "";	if (sanswers4[inNum] == "1") {		if (canswers4[inNum] == "1") {			theOut = "<img src='../images/darkGreenCheck.gif' WIDTH=22 HEIGHT=16>";		} else {			theOut = "<img src='../images/redCheck.gif' WIDTH=22 HEIGHT=16>";		}	}	if (sanswers4[inNum] == "0") {		if (canswers4[inNum] == "1") {			theOut = "<img src='../images/redCheck.gif' WIDTH=22 HEIGHT=16>";		} else {			theOut = "<img src='../images/darkGreenCheck.gif' WIDTH=22 HEIGHT=16>";		}	}	if (sanswers4[inNum] == "") {		theOut = "<img src='../images/blankCheck.gif' WIDTH=22 HEIGHT=16>";	}	return theOut;}function getAnswer4(inNum) {	var theOut;	if (inNum > mnumq4) return "";	if (sanswers4[inNum] == "1") {		theOut = "<img src='../images/blueBullet.gif' WIDTH=22 HEIGHT=16>";	} else {		theOut = "<img src='../images/blankCheck.gif' WIDTH=22 HEIGHT=16>";	}	return theOut;}
