﻿function openMainStage( ) {
			
			var pos = "";
			var features;
		
			browser = new Object();
			
			if(navigator.appName.indexOf("Netscape") != -1) {
				browser.isNetscape = true;
			} else if (navigator.appName.indexOf("Microsoft") != -1) {
				browser.isMicrosoft = true;
			}
			
			var width = 710;
			var height = 845;
			var fixWidth = 8;
			var fixHeight = 28;
			var screenHeight = screen.availHeight-fixHeight;
			var screenWidth = screen.availWidth-fixWidth;
			
			//get position of window based on browser
			if(browser.isNetscape) {
				pos = ",screenX="+(screenWidth - width)/2+",screenY="+(screenHeight - height)/2;
			} else {
				pos = ",left="+(screenWidth - width)/2+", top="+(screenHeight - height)/2;
			}
		
			features = "width="+width+",height="+height+pos+",scrollbars=yes,resizable=yes";
			
			//open new window			
			mainwindow = window.open("simulation.html","simulation",features);
		
			if(mainwindow != null) {
				mainwindow.focus() ;
			}
	}