var imgSrc = "http://www.mcgrawhill.ca/college/olcsupport/mcshane6e/selfassess/";
// ---------------------------------------
var ansWin = null;
var qCount = 18;
// ---------------------------------------
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 GradeAssess(theForm) {
var cntlname; var cntlname2; var cont; var cont2;
var totals = new Array(8);
totals[0] = 0; totals[1] = 0; totals[2] = 0; totals[3] = 0; totals[4] = 0;
totals[5] = 0; totals[6] = 0; totals[7] = 0;
for (var i = 0; i < qCount; i++) {
	cntlname2 = "Q" + (i+1) + "Cat";
	cont2 = theForm[cntlname2].value;
	cntlname = "pd"+ (i+1);
	cont = theForm[cntlname].options[theForm[cntlname].selectedIndex].value;
	if (cont == 99) {
		alert("One or more questions are unanswered. Please complete the form and try again.");
		return false;
	}
	totals[cont2] += (cont/1);
	totals[7] += (cont/1);
}
var rsp = "";
rsp += BeginPage();
rsp += GetFeedback0();
var llabel = "" + "3";
var rlabel = "" + "15";
var top1 = "Low score<br>3 to 7";
var top2 = "Average score<br>8 to 12";
var top3 = "High score<br>13 to 15";
rsp += MakeTable(3,15,totals[1],llabel,rlabel,top1,top2,top3,5,5,2);
rsp += GetFeedback1();
rsp += MakeTable(3,15,totals[2],llabel,rlabel,top1,top2,top3,5,5,2);
rsp += GetFeedback2();
rsp += MakeTable(3,15,totals[3],llabel,rlabel,top1,top2,top3,5,5,2);
rsp += GetFeedback3();
rsp += MakeTable(3,15,totals[4],llabel,rlabel,top1,top2,top3,5,5,2);
rsp += GetFeedback4();
rsp += MakeTable(3,15,totals[5],llabel,rlabel,top1,top2,top3,5,5,2);
rsp += GetFeedback5();
rsp += MakeTable(3,15,totals[6],llabel,rlabel,top1,top2,top3,5,5,2);
rsp += GetFeedback6();
var llabel = "" + "18";
var rlabel = "" + "90";
top1 = "Low score<br>18 to 64";
top2 = "Average score<br>65 to 72";
top3 = "High score<br>73 to 90";
rsp += MakeTable(18,90,totals[7],llabel,rlabel,top1,top2,top3,47,8,17);
rsp += GetFeedback7();
rsp += EndPage();
WriteResponse(rsp);
return false;
}
// ---------------------------------------
function MakeTable(datamin,datamax,dscore,ll,lr,lt1,lt2,lt3,bl1,bl2,bl3) {
// bl1 + bl2 + bl3 should equal spread
var spread = datamax - datamin;
var maxwidth = 550;
var dfactor = (maxwidth - (maxwidth%spread))/spread;
var gwidth = spread * dfactor;
var gscore = (dscore - datamin) * dfactor;
var ptrloc = gscore - 7;
var ptricon;
if ( (ptrloc) < 0 ) {
	ptricon = "redpointerleft.gif\" width=\"8\"";
	ptrloc = gscore
} else {
	if ( (ptrloc + 15) > gwidth ) {
		ptricon = "redpointerright.gif\" width=\"8\"";
		ptrloc = gscore - 8
	} else {
		ptricon = "redpointer.gif\" width=\"15\""
	}
}
// var padder = 0;
var bar1 = bl1*dfactor;
var bar2 = bl2*dfactor;
var bar3 = gwidth - (bar1 + bar2);
var winCode = "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\"><tr valign=\"bottom\"><td></td><td></td><td width=\"" + gwidth + "\" align=\"center\"><table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\"><tr valign=\"bottom\" align=\"center\"><td class=\"smlabel\" width=\"33%\">" + lt1 + "</td><td class=\"smlabel\" width=\"34%\">" + lt2 + "</td><td class=\"smlabel\" width=\"33%\">" + lt3 + "</td></tr></table></td><td></td><td></td></tr><tr valign=\"bottom\"><td rowspan=\"2\" align=\"right\" valign=\"middle\" class=\"smlabel\">" + ll + "</td><td align=\"right\"><img src=\"" + imgSrc + "whitespacer.gif\" width=\"4\" height=\"1\"><img src=\"" + imgSrc + "blackspacer.gif\" width=\"1\" height=\"25\"></td><td nowrap align=\"center\"><img src=\"" + imgSrc + "grayspacer.gif\" width=\"" + bar1 + "\" height=\"10\"><img src=\"" + imgSrc + "blackspacer.gif\" width=\"" + bar2 + "\" height=\"10\"><img src=\"" + imgSrc + "grayspacer.gif\" width=\"" + bar3 + "\" height=\"10\"></td><td><img src=\"" + imgSrc + "blackspacer.gif\" width=\"1\" height=\"25\"><img src=\"" + imgSrc + "whitespacer.gif\" width=\"4\" height=\"1\"></td><td rowspan=\"2\" valign=\"middle\" class=\"smlabel\">" + lr + "</td></tr><tr valign=\"top\"><td align=\"right\"><img src=\"" + imgSrc + "whitespacer.gif\" width=\"4\" height=\"1\"><img src=\"" + imgSrc + "blackspacer.gif\" width=\"1\" height=\"20\"></td><td nowrap valign=\"bottom\"><img src=\"" + imgSrc + "whitespacer.gif\" width=\"" + ptrloc + "\" height=\"1\"><img height=\"12\" src=\"" + imgSrc + ptricon + "></td><td><img src=\"" + imgSrc + "blackspacer.gif\" width=\"1\" height=\"20\"><img src=\"" + imgSrc + "whitespacer.gif\" width=\"4\" height=\"1\"></td></tr></tr></table>";
winCode += "<p align=\"center\"><font color=\"#cc0000\"><b>Your score was " + dscore + ".</b></font> The range of possible scores is from " + datamin + " to " + datamax + ".</p>";
return winCode
}
// ---------------------------------------
function GetFeedback0() {
var winCode = "<h3 class=\"explanation\">Understanding Your Score on the Self-Leadership Scale</h3><p>Self-leadership is the process of influencing yourself to establish the self-direction and self-motivation needed to perform a task. It recognizes that individuals mostly regulate their own actions through various behavioural and cognitive (thought) activities. The six components of self-leadership measured in this scale are personal goal setting, mental practice, designing natural rewards, self-monitoring, self-reinforcement, and cueing strategies. The following graphs compare your self-leadership scores to a sample of over 200 MBA students.</p><hr noshade size=\"1\">\n";
return winCode
}
// ---------------------------------------
function GetFeedback1() {
var winCode = "<p><b>Personal Goal Setting</b><br>Self-leadership includes the practice of setting your own performance-oriented goals and, more specifically, establishing specific, challenging, and relevant goals. Scores on this subscale range from 3 to 15. A higher score indicates a higher level of personal goal setting. </p><hr noshade size=\"1\">\n";
return winCode
}
// ---------------------------------------
function GetFeedback2() {
var winCode = "<p><b>Mental Practice</b><br>Mental practice (called mental imagery in the textbook) involves mentally rehearsing future events. Mental practice includes thinking through the activities required to perform the task, anticipating obstacles to goal accomplishment, and working out solutions to those obstacles before they occur. Mentally walking through the activities required to accomplish the task helps us to see problems that may occur. Scores on this subscale range from 3 to 15. A higher score indicates a higher level of mental practice.</p><hr noshade size=\"1\">\n";
return winCode
}
// ---------------------------------------
function GetFeedback3() {
var winCode = "<p><b>Designing Natural Rewards</b><br>Designing natural rewards is the process of altering tasks and work relationships to make the work more motivating. This might involve changing the way you complete a task so the activity is more interesting. Or it might involve making slight changes in your job duties to suit your needs and preferences. Scores on this subscale range from 3 to 15. A higher score indicates a higher level of designing natural rewards.</p><hr noshade size=\"1\">\n";
return winCode
}
// ---------------------------------------
function GetFeedback4() {
var winCode = "<p><b>Self-Monitoring</b><br>Self-monitoring is the process of keeping track of your progress toward a goal. It includes consciously checking at regular intervals how well you are doing. Scores on this subscale range from 3 to 15. A higher score indicates a higher level of self-monitoring.</p><hr noshade size=\"1\">\n";
return winCode
}
// ---------------------------------------
function GetFeedback5() {
var winCode = "<p><b>Self-Reinforcement</b><br>Self-reinforcement is the practice of rewarding yourself after successfully completing a task. It occurs whenever you have control over a reinforcer but don't \"take\" the reinforcer until completing a self-set goal. Scores on this subscale range from 3 to 15. A higher score indicates a higher level of self-reinforcement.</p><hr noshade size=\"1\">\n";
return winCode
}
// ---------------------------------------
function GetFeedback6() {
var winCode = "<p><b>Cueing Strategies</b><br>The cueing strategies component of self-leadership is not explicitly described in your textbook's discussion of self-leadership. However, it relates to the process of self-managing the antecedents (cues) of behaviour described in the chapter on behaviour modification. In self-leadership, cueing strategies are self-set or self-controlled antecedents rather than introduced and controlled by others. Scores on this subscale range from 3 to 15. A higher score indicates a higher level of cueing strategies.</p><hr noshade size=\"1\">\n";
return winCode
}
// ---------------------------------------
function GetFeedback7() {
var winCode = "<p><b>Self-Leadership (total)</b><br>Self-leadership is the process of influencing oneself to establish the self-direction and self-motivation needed to perform a task. Scores on this overall scale range from 18 to 90. A high score indicates a higher level of overall self-leadership.</p>\n";
return winCode
}
// ---------------------------------------
function BeginPage() {
var winCode = "<html><head><title>Organizational Behaviour Self-Assessment Exercises</title>\n\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" + GetStyles() + "</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 GetStyles() {
return "\n<link href=\"http://www.mcgrawhill.ca/college/olcsupport/mcshane6e/selfassess/selfassess.css\" type=\"text/css\" rel=\"stylesheet\"></link>\n";
var winCode = "\n<style>\n<!-- For some reason Netscape seems to go for case sensitivity. Here's uppercase tags. -->\nA\n{\ntext-decoration: none;\n}\nA:HOVER\n{\ntext-decoration: underline;\n}\nA.hint \n{\ncolor: #999999;\ntext-decoration: none;\nfont-weight: bold;\n}\nA.nav \n{\nfont-size: 10px;\ncolor:#999999;\ntext-decoration: none;\nfont-weight:bold;\n}\nA.navCur \n{\nfont-size: 10px;\ncolor:#FFFFFF;\ntext-decoration: none;\nfont-weight:bold;\n}\nBODY \n{\nfont-family: verdana, sans-serif;\nfont-size: 12px;\n}\nTABLE\n{\nfont-family: verdana, sans-serif; \nfont-size: 12px;\n}\nTR\n{\nfont-family: verdana, sans-serif; \nfont-size: 12px;\n}\nTD\n{\nfont-family: verdana, sans-serif; \nfont-size: 12px;\n}\nTD.smlabel\n{\nfont-family: verdana, sans-serif; \nfont-size: 10px;\ncolor: #999999;\n}\nP\n{\nfont-family: verdana, sans-serif; \nfont-size: 12px\n}\np\n{\nfont-family: verdana, sans-serif; \nfont-size: 12px;\n}\nUL\n{\nfont-family: verdana, sans-serif; \nfont-size: 12px;\n}\nOL\n{\nfont-family: verdana, sans-serif;\nfont-size: 12px;\n}\nLI\n{\nfont-family: verdana, sans-serif;\nfont-size: 12px;\n}\nH3 \n{\nfont-family: verdana, sans-serif;\nfont-size: 16px;\nfont-weight: bold;\ncolor: #000000;\nmargin: 0px;\npadding: 0px;\npadding-bottom: 3px;\npadding-top: 2px;\n}\n<!-- For some reason Netscape seems to go for case sensitivity. Here's lowercase tags. -->\na\n{\ntext-decoration: none;\n}\na:hover\n{\ntext-decoration: underline;\n}\na.hint \n{\ncolor: #999999;\ntext-decoration: none;\nfont-weight: bold;\n}\na.nav \n{\nfont-size: 10px;\ncolor:#999999;\ntext-decoration: none;\nfont-weight:bold;\n}\na.navCur \n{\nfont-size: 10px;\ncolor:#FFFFFF;\ntext-decoration: none;\nfont-weight:bold;\n}\nbody \n{\nfont-family: verdana, sans-serif;\nfont-size: 12px;\n}\ntable\n{\nfont-family: verdana, sans-serif; \nfont-size: 12px;\n}\ntr\n{\nfont-family: verdana, sans-serif; \nfont-size: 12px;\n}\ntd\n{\nfont-family: verdana, sans-serif; \nfont-size: 12px;\n}\ntd.smlabel\n{\nfont-family: verdana, sans-serif; \nfont-size: 10px;\ncolor: #999999;\n}\nul\n{\nfont-family: verdana, sans-serif; \nfont-size: 12px;\n}\nol\n{\nfont-family: verdana, sans-serif;\nfont-size: 12px;\n}\nli\n{\nfont-family: verdana, sans-serif;\nfont-size: 12px;\n}\nh3 \n{\nfont-family: verdana, sans-serif;\nfont-size: 16px;\nfont-weight: bold;\ncolor: #000000;\nmargin: 0px;\npadding: 0px;\npadding-bottom: 3px;\npadding-top: 2px;\n}\n.explanation\n{\ncolor: #0000ff;\n}\n.footer\n{\nfont-size: 10px;\n}\n</style>\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
}
