var newWindow
function winOpen(theURL, top, left, width, height) {
	if(newWindow) newWindow.close();
	newWindow = window.open(theURL,'','toolbar=no,menubar=no,resizable=no,scrollbars=yes,status=no,location=no, top=' + top + ',left=' + left +',width='+width+',height=' + height);
}
function closeNewWindow(){
	if(newWindow){
		newWindow.close();
		newWindow = null;
	}
}
//*************************************************************************
function writeTable(key){
var tableSt = '<div id="outcomes">';
var S = "";							  // holds the address of the feedback graphics
var n = 0;							  // for display of the question number
var cols = 5;							  // table has 5 columns
//var key = "gases1";											  // string designating module and page
tableSt += '<table border="0" width="100%" align="center" bgcolor="white"><tr>'; // for building the table
for(var i = 0; i < question.length;i++){  // for all questions in the array
	if(question[i].course == key) { // only show questions for this course
		n++;															  // increment the question sequence number on the page
		//if(question[i].result == 0) S = parent.wrong;  // "wrong" symbol
		//else if(question[i].result == 1) S = parent.correct; // "right" symbol
		//else S = "";  // no symbol shown
		tableSt += '<td align="center" width="20%"><a href="#" onClick="callQuestion(' + i + '); return false">Question ' + n + '</a>&nbsp;' + S + '</td>';
		if(n%cols == 0)tableSt += "</tr><tr>";  // start new row when row is completed
	} // end of "if(question..."
} // end of "for(var i = 0; i < parent...."
// finish table off
if(n%cols ==0) tableSt += '</tr></table></div>';
else {
	for(var i = 0;i < n%cols + 1;i++){
		tableSt += '<td>&nbsp;</td>'; // Add missing data cells
	} // end of "for..."
		tableSt += '</tr></table></div>';
} // end of "n%cols... "
document.write(tableSt);
}
//*******************************************************************************
function writeButtons(){
var St = '<div><map name="navigation">';
St += '<area shape="rect" coords="1,3,41,42" href="../../Common%20Files/calc.exe" alt="Call a calculator">';
St += '<area shape="rect" coords="111,3,151,42"  href="javascript:winOpen(&prime;../../Data/Scientific%20Data.htm&prime;, 100, 100, 800, 600)" alt="Call up scientific data tables">';
St += '<area shape="rect" coords="222,3,263,42" href="javascript:winOpen(&prime;../../Common%20Files/glossary.htm&prime;, 100, 100, 800, 600)" alt="Call up a glossary">';
St += '<area shape="rect" coords="333,3,374,42" href="javascript:winOpen(&prime;../../Common%20Files/Qhelp.htm&prime;, 100, 100, 800, 600)" alt="Call a help panel">';
St += '</map><img src="../../Common Files/new_buttonmap.gif" width="373" height="42" usemap="#navigation" border="0"></div>';
document.write(St);
}