var imgSrc = "http://www.mcgrawhill.ca/college/olcsupport/mcshane6e/selfassess/";
// ---------------------------------------
var ansWin = null;
var qCount = 16;
//-----------------------------
function QuizResults(form) {
var inputNum = 6;
var qNum = 12;
var ques = new Array(12);
var ans = new Array(12);
var quesInputs = new Array(12);
var imgfactor = 20;
quesInputs[0] = 1;
quesInputs[1] = 1;
quesInputs[2] = 1;
quesInputs[3] = 1;
quesInputs[4] = 1;
quesInputs[5] = 1;
quesInputs[6] = 1;
quesInputs[7] = 1;
quesInputs[8] = 1;
quesInputs[9] = 1;
quesInputs[10] = 1;
quesInputs[11] = 1;
ques[0] = "There is one word in the English language that is always pronounced incorrectly. What is it?<br><b>Incorrectly.</b>"
ans[0] = "There is one word in the English language that is always pronounced incorrectly. What is it?<br>[1]"
ques[1] = "A man gave one son 10 cents and another son was given 15 cents. What time is it?<br><b>1:45. The man gave away a total of 25 cents. He divided it between two people. Therefore, he gave a quarter to two.</b>"
ans[1] = "A man gave one son 10 cents and another son was given 15 cents. What time is it?<br>[1]"
ques[2] = "A boat has a ladder that has six rungs, each rung is one foot apart. The bottom rung is one foot from the water. The tide rises at 12 inches every 15 minutes. High tide peaks in one hour. When the tide is at it's highest, how many rungs are under water?<br><b>None, the boat rises with the tide.</b>"
ans[2] = "A boat has a ladder that has six rungs, each rung is one foot apart. The bottom rung is one foot from the water. The tide rises at 12 inches every 15 minutes. High tide peaks in one hour. When the tide is at it's highest, how many rungs are under water?<br>[1]"
ques[3] = "There is a house with four walls Each wall faces south. There is a window in each wall. A bear walks by one of the windows. What color is the bear?<br><b>White. If all the walls face south, the house is at the North Pole, and the bear, therefore, is a polar bear.</b>"
ans[3] = "There is a house with four walls Each wall faces south. There is a window in each wall. A bear walks by one of the windows. What color is the bear?<br>[1]"
ques[4] = "Is half of two plus two equal to two or three?<br><b>Three, if you follow the mathematical orders of operation. Division is performed before addition. So, half of two is one. Then add two, and the answer is three.</b>"
ans[4] = "Is half of two plus two equal to two or three?<br>[1]"
ques[5] = "There is a room. The shutters are blowing in. There is broken glass on the floor. There is water on the floor. You find Sloppy dead on the floor. How did sloppy die?<br><b>Sloppy is a goldfish. The wind blew the shutters in, which knocked his goldfish-bowl off the table, and it broke, killing him by asphyxiation.</b>"
ans[5] = "There is a room. The shutters are blowing in. There is broken glass on the floor. There is water on the floor. You find Sloppy dead on the floor. How did sloppy die?<br>[1]"
ques[6] = "How much dirt would be in a hole 2 metres deep and 2 metres wide that has been dug with a square edged shovel?<br><b>None. No matter how big a hole is, it's still a hole: the absence of dirt. Notice, too, that you don't even know how much air is in the hole because the question doesn't provide the length of the hole.</b>"
ans[6] = "How much dirt would be in a hole 2 metres deep and 2 metres wide that has been dug with a square edged shovel?<br>[1]"
ques[7] = "Suppose you are in Juneau, Alaska and drop a bowling ball from a height of three feet into a bucket of water at 10 degrees Celsius. Then, you drop a bowling ball of the same weight, mass, and size from the same height into another bucket at negative 10 degree Celsuis. Which ball would hit the bottom of the bucket fastest?<br><b>The ball in the bucket of 10 degree C water hits the bottom of the bucket last. Did you think that the water in the negative 10 degree C bucket is frozen? Think again. The question said nothing about that second bucket having anything in it. Therefore, there is no water (or ice) to slow the ball down.</b>"
ans[7] = "Suppose you are in Juneau, Alaska and drop a bowling ball from a height of three feet into a bucket of water at 10 degrees Celsius. Then, you drop a bowling ball of the same weight, mass, and size from the same height into another bucket at negative 10 degree Celsuis. Which ball would hit the bottom of the bucket fastest?<br>[1]"
ques[8] = "What is the significance of the following: The year is 1978, thirty-four minutes past noon on May 6th.<br><b>The time and month/date/year are 12:34, 5/6/78.</b>"
ans[8] = "What is the significance of the following: The year is 1978, thirty-four minutes past noon on May 6th.<br>[1]"
ques[9] = "What can go up a chimney down, but can't go down a chimney up?<br><b>An umbrella.</b>"
ans[9] = "What can go up a chimney down, but can't go down a chimney up?<br>[1]"
ques[10] = "If a farmer has 5 haystacks in one field and 4 haystacks in the other field, how many haystacks would he have if he combined them all in the center field?<br><b>One. If he combines all of his haystacks, they all become one big stack.</b>"
ans[10] = "If a farmer has 5 haystacks in one field and 4 haystacks in the other field, how many haystacks would he have if he combined them all in the center field?<br>[1]"
ques[11] = "What is it that goes up and goes down but does not move?<br><b>The temperature.</b>"
ans[11] = "What is it that goes up and goes down but does not move?<br>[1]"
var temp = "";
var rsp = "";
var answered = 0;
var n;
var n2 = 0;
var fnd = -1;
var backend = "";
var frontend = "";
var srch = "";
for (var i = 0; i < qNum; i++) {
	rsp += "<P>\n<FONT SIZE=-1>Question " + (i+1) +" with suggested answer:</FONT></P>\n<UL><P>\n" + ques[i] + "</P>\n";
	temp = ans[i];
	for (n = 0; n < quesInputs[i]; n++) {
		n2 += 1;
		srch = "["+(n+1)+"]";
 	fnd = temp.indexOf(srch);
		if (fnd < 0) {
			temp = "<FONT SIZE = -2 COLOR=\"#0000CC\">ERROR</FONT>";
		}
		backend = temp.substring(fnd + srch.length,temp.length);
		if (fnd == 0) {
			frontend = "";
		} else {
			frontend = temp.substring(0,fnd);
		}
		srch = form["FI"+(n2)].value;
		if (srch == "") {
 		temp = "<FONT SIZE = -2 COLOR=\"#0000CC\"><b>UNANSWERED</b></FONT>";
		} else {
 		temp = "<FONT COLOR=\"#0000CC\"><b>" + srch + "</b></FONT>";
		}
	}
	rsp += "<P><FONT SIZE=-1>Your answer:</FONT>\n<BR>\n" + temp + "\n<BR>\n</UL>\n</P>\n";
	answered += 1;
}
var response = BeginPage();
response += "<h3 class=\"explanation\">Understanding Your Score on the Creative Bench Strength Scale</h3><p>The creative bench strength scale presents 12 questions that require some degree of divergent thinking. This self-assessment does not provide scores, although you can count the percentage of questions where you wrote in the correct answer. Instead, the results show your answer to each question along with the correct answer and an explanation where needed.</p><hr noshade size=\"1\">\n";
response += "<BLOCKQUOTE>" + rsp + "</BLOCKQUOTE>";
response += EndPage();
WriteResponse(response);
return false;
}
// ---------------------------------------
function WriteResponse(content) {
if (ansWin && !ansWin.closed) {
	ansWin.close()
}
ansWin = window.open("","","toolbar=NO,location=NO,resizable,scrollbars,width=650,height=450");
ansWin.document.write(content);
ansWin.document.close();
}
// ---------------------------------------
function BeginPage() {
var winCode = "<html><head><title>Organizational Behaviour Self-Assessment Exercises</title>\n<link type=\"text/css\" href=\"" + imgSrc + "css.css\" rel=\"stylesheet\">\n";
winCode += "<script language=\"JavaScript\">\n<!--\n// ---------------------------\n";
winCode += "function printScreen(){\nif (window.print) {\n window.print();\n} else {\n alert(\"Your browser does not support printer links embedded within a web page. PC users, however, can right-click within the window and a popup menu will appear from which you can print. Macintosh users can access a similar menu by holding down the mouse for several seconds.\");\n}\n}\n";
winCode += "//-" + "->\n</script>\n</head>\n";
winCode += "<body bgcolor=\"#ffffff\" leftmargin=\"0\" topmargin=\"0\" marginwidth=\"0\" marginheight=\"0\">\n<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">\n<tr><td bgcolor=\"#000000\"><font size=\"4\">&nbsp;</font></td></tr>\n</table>\n<table border=\"0\" width=\"100%\" cellpadding=\"20\" cellspacing=\"0\">\n<tr valign=\"top\"><td>\n\n";
return winCode
}
// ---------------------------------------
function EndPage() {
var winCode = "\n\n<p class=\"footer\"><hr noshade size=\"1\" />\n<font face=\"Symbol\" color=\"ff0000\">&#168;</font> <a href=\"javascript:printScreen()\"><b>Print Screen</b></a>\n</p>\n<p class=\"footer\"><a href=\"mailto:highered_web@mcgrawhill.ca\">Comments or questions?</a><br>Copyright &copy; 2004 McGraw-Hill Ryerson Limited<br>&nbsp;</p></td></tr></table></body></html>";
return winCode
}
