//writeReflect.js
//
/*When button clicked from main page, pop-up is presented
that contains a text-input box and a 'Display Your Response' button.
When that button is clicked the contents of the text-input box are inserted into
a nicely formatted page for printing purposes*/

function writePop (sesNum,probNum,course,depth,question) {
	//var depth is to root level of site and in form '../' or '../../' etc...
	//define window parameters
	var width = 454;
	var h = 300;
	var stat = 'no';
	var scroll = 'no';
	var reSize = 'no';
	var winName = 'WritePopUp';
	 var browser = navigator.appName;
	 var version = parseInt(navigator.appVersion);
	 var platform = navigator.platform;
	//Call window and bring it to foreground
	var writeWin = window.open('',winName,'width='+width+',height='+h+',toolbar=no,status='+stat+',scrollbars='+scroll+',resizable='+reSize+',menubar=no,directories=no');
	var w = writeWin.document;
	w.open('text/html');
	w.write('<html>\n<head>\n<title>Learning Math: Write and Reflect</title>\n');
	w.write('<script type="text/javascript" language="JavaScript">\n');
	w.write('var probNum = "'+ probNum + '";\n');
	w.write('var question = "'+ question + '";\n');
	w.write('var sesNum = "'+ sesNum + '";\n');
	w.write('var course = "'+ course + '";\n');
	w.write('var depth = "'+ depth + '";\n');
	w.write('var browser = "'+ browser + '";\n');
	w.write('var version = "'+ version + '";\n');
	w.write('var platform = "'+ platform + '";\n');
	w.write('var y;\n');
	w.write('function setValue () {\n');
	w.write('y = frames[0].document.input.goods.value;\n');
	w.write('}\n');
	w.write('</script>\n');
	w.write('</head>\n');
	w.write('<frameset rows="100%,0" noresize border="0" frameborder="0" framespacing="0" frameborder="no">\n');
	w.write('<frame name="mathOne" src="'+ depth +'js/templates/write.html" marginwidth="0" scrolling="yes">\n');
	w.write('</frameset>\n');
	w.write('</html>');
	w.close();
	writeWin.focus();
}



	
	
	
	
	
	
	
	
	
	







