// Javascript functions for interacting with glossary.php
// NOTE: It appears that IE for the Mac doesn't like to include scripts with capital letters

// Opens a popup window containing a glossary definition
function define(term) {
	var width = 475;														// Width of the glossary popup window
	var height = 250;														// Height of the glossary popup window
	var left = Math.round((document.body.clientWidth - width)/2);			// Placement of the left edge of the window
	var top = Math.round((screen.height - height)/4);							// Placement of the top edge of the window
	if (left == 0) left = 100;
	if (top == 0) top = 100;
	window.open('/glossary.php?define=' + term, 'Glossary', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width=' + width + ',height=' + height + ',left=' + left + ',top=' + top);
}

function show(term) {
	parent.definition.location = "/glossary.php?show=" + term;
}