
var tour_win;

var l=(screen.width-430)/2;
var t=(screen.height-500)/2;
var tour_win_options;
eval('tour_win_options = "directories=no,location=no,menubar=no,status=no,titlebar=no,toolbar=no,scrollbars=yes,width=430 left='+l+',top='+t+',height=500"');

function load_tour()
{
     if(tour_win && tour_win.open && !tour_win.closed)
         tour_win.focus();
     else
         tour_win=window.open("tour/tour.html","Tour",tour_win_options);   
}       

var Demo;
//var l=(screen.width-300)/2;
//var t=(screen.height-100)/2;

function LoadDemo(opt)
{
	var w=818;
	var h=605;
	var file="";
	if(opt=='First Time Instructor')
		file="registerInst.swf";
	if(opt=='First Time Student')
		file="registerStud.swf";
	if(opt=='Refresher Course')
	{
		w=818; h= 619;
		file="course.swf";
	}
	if(opt=='Codesaw')
		file="codesaw.swf";
	if(opt=='Testing Area')
		file="test.swf";
	if(opt=='Student eKnapSack')
		file="eKnapSack.swf";
	if(opt=='Instructor eKnapSack')
		file="InsteKnapSack.swf";
	w=w+4;
	h=h+10;
	var l=(screen.width-w)/2;
	var t=(screen.height-h)/2;
	
	 eval('Demooptions = "directories=no,location=no,menubar=no,status=no,titlebar=no,toolbar=no,scrollbars=no,width='+w+',left='+l+',top='+t+',height='+h+'"');
     if(Demo && Demo.open && !Demo.closed)
	{ 
         //Demo.focus();
		 Demo.close();
         eval('Demo=window.open("include/demo.html?'+file+':'+opt+':'+w+':'+h+'","Demo",Demooptions)');
	}
     else
         eval('Demo=window.open("include/demo.html?'+file+':'+opt+':'+w+':'+h+'","Demo",Demooptions)');
}
