// script to control display of module structure

// the unit we were just at should be considered visited
if (top.currUnit!="null") {
	top.unitsArray[top.currUnit].visited=true 
}

// controls rollover functionality
var lastInfo
function showInfoLayer(infoToBeShown) {

	if (lastInfo) {
		hide(lastInfo)
	}
	show(infoToBeShown)
	lastInfo = infoToBeShown
}

// this writes the information about the unit of study which gets displayed upon rollover
for (i=0; i<top.unitsArrayIndex.length; i++) {
	var unitCode = top.unitsArrayIndex[i]
	document.write('<div id="' + unitCode + 'Info" class="unitinfo"><div align="right"  style="position:absolute; width:335; text-align:right"><b><img src="../../../icons/page.gif" align="top">&nbsp;' + top.navigArray[unitCode].length + '<\/b><\/div><div style="width:270"><h3><a href="' +unitCode +  '\/' + top.navigArray[unitCode][0] + '" target="content">' + top.unitsArray[unitCode].title + '<\/a><\/h3><\/div>' + top.unitsArray[unitCode].desc + '<\/div>')
}

