/*
  Copyright (c) 2003 University of Victoria
	Version 1.1
*/

/* Menu - Quick Links Bar */

function chooseActivity() {
  if ( document.menu.dropmenu.selectedIndex == 0 )
{
 // do nothing
}
else {
  selectedIndex = document.menu.dropmenu.selectedIndex; 

// get value of the selected option
  goPage = document.menu.dropmenu.options[selectedIndex].value;

// redirect browser to the value (page)
  document.location.href=goPage;
//  parent.main.focus();
//	parent.frames["main"].focus();
//  ( top.frames['content'].location=options[selectedIndex].value ) 
  }
}

function resetSelect()  {
  document.menu.dropmenu.selectedIndex = 0;
}


// Opens window for exercise results
function resultsOpener(url)	{
targetURL = url;
if (window.screen)	{
	var x=Math.floor((screen.availWidth-640)/2);
	var y=Math.floor((screen.availHeight-480)/2);
newWin = window.open(targetURL,"practiceExercises", "width=640,height=480,screenX=" + x + ",screenY=" + y + ",left=" + x + ",top=" + y + ",alwaysRaised=yes,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no");
	}
else newWin = window.open(targetURL,"practiceExercises","width=640,height=480,alwaysRaised=yes,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no");
newWin.focus();
}


