var IS_OLD_BROWSER = false;

if ( ( navigator.appVersion.indexOf( "1." ) == 0 ) || 
	( navigator.appVersion.indexOf( "2." ) == 0 ) )
	IS_OLD_BROWSER = true;

ONE_AT_A_TIME = true; 
BULLET_IMG_WIDTH = 14;
BULLET_IMG_HEIGHT = 19;

/* add comments that are on multiple lines */
// comment out a line
// comment out a line

var M0 = new TreeMenu( 'M0' );

//	ATE( M0, 'index.htm', 'Home' );

	var Intro = new TreeMenu( 'Intro' );
	ATE( M0, 'intro.htm', 'Introduction', Intro );
		ATE( Intro, 'usingthevgee.htm', 'Using the VGEE' );
		ATE( Intro, 'tindexLearnerVersion.htm', 'Background Info' );
		ATE( Intro, 'philosophyLearnerVersion.htm', 'VGEE Philosophy' );
		ATE( Intro, 'bibref.htm', 'Bib. & References' );
		ATE( Intro, 'credits.htm', 'Project Credits' );
		ATE( Intro, 'presentations.htm', 'Presentations & Pubs.' );

	var Comps = new TreeMenu( 'Comps' );
	ATE( M0, 'tools.htm', 'Tools', Comps );

//		ATE( Comps, 'vistool.htm', 'Visualization Environ.' );

		var vistut = new TreeMenu( 'vistut' );
		ATE( Comps, 'vistool.htm', 'Visualization Environ.', vistut );
			ATE( vistut, 'loading.htm', 'Loading DSets/Vars.' );
			ATE( vistut, 'toggling.htm', 'Toggling' );
			ATE( vistut, 'contour.htm', 'Contour Lines/Maps' );
			ATE( vistut, 'difference.htm', 'Difference Maps' );

//		ATE( Comps, 'dataset.htm', 'Datasets' );

		var datasets = new TreeMenu( 'datasets' );
		ATE( Comps, 'dataset.htm', 'Datasets', datasets );
	
			var ensodsets = new TreeMenu( 'ensodsets' );
			ATE( datasets, 'elnino.htm', 'ENSO', ensodsets );
				ATE( ensodsets, 'atmosphere.htm', 'Atmosphere' );
				ATE( ensodsets, 'ocean.htm', 'Ocean' );
//			ATE( datasets, 'elnino.htm', 'ENSO' );
			ATE( datasets, 'mantleconvection.htm', 'Mantle Convection' );



		var ConceptModels = new TreeMenu( 'ConceptModels' );
		ATE( Comps, 'conceptmodels.htm', 'Concept Models', ConceptModels );
			ATE( ConceptModels, 'temperature.htm', 'Temperature CM' );
			ATE( ConceptModels, 'condensation.htm', 'Condensation CM' );
			ATE( ConceptModels, 'dryadiabatic.htm', 'Dry Adiabatic CM' );
			ATE( ConceptModels, 'moistadiabatic.htm', 'Moist Adiabatic CM' );
			ATE( ConceptModels, 'instability.htm', 'Instability CM' );
			ATE( ConceptModels, 'windwater.htm', 'Wind & Water CM' );
			ATE( ConceptModels, 'evaporation.htm', 'Evaporation CM' );
			ATE( ConceptModels, 'coriolis.htm', 'Coriolis CM' );
			
			var about = new TreeMenu( 'about' );
			ATE( ConceptModels, '', 'About ...', about );
				ATE( about, 'histogram.htm', 'Histograms' );
				ATE( about, 'atmospheric_pressure.htm', 'Atmos. Pressure' );
				ATE( about, 'bouyancy.htm', 'Warm Air Rising' );


	var LearnerRes = new TreeMenu( 'LearnerRes' );
	ATE( M0, 'curr_s.htm', 'El Niņo Learner Guide', LearnerRes );	
	
		var Topic1 = new TreeMenu( 'Topic1' );
		ATE( LearnerRes, 't1s.htm', 'Topic 1', Topic1 );
			ATE( Topic1, 't1a1s.htm', 'Activity 1' );
			ATE( Topic1, 't1a2s.htm', 'Activity 2' );
			ATE( Topic1, 't1a3s.htm', 'Activity 3' );

		var Topic2 = new TreeMenu( 'Topic2' );
		ATE( LearnerRes, 't2s.htm', 'Topic 2', Topic2 );
			ATE( Topic2, 't2a1s.htm', 'Activity 1' );
			ATE( Topic2, 't2a2s.htm', 'Activity 2' );
			ATE( Topic2, 't2a3s.htm', 'Activity 3' );
			ATE( Topic2, 't2a4s.htm', 'Activity 4' );

		var Topic3 = new TreeMenu( 'Topic3' );
		ATE( LearnerRes, 't3s.htm', 'Topic 3', Topic3 );
			ATE( Topic3, 't3a1s.htm', 'Activity 1' );
			ATE( Topic3, 't3a2s.htm', 'Activity 2' );
			ATE( Topic3, 't3a3s.htm', 'Activity 3' );
			ATE( Topic3, 't3a4s.htm', 'Activity 4' );

		var Topic4 = new TreeMenu( 'Topic4' );
		ATE( LearnerRes, 't4s.htm', 'Topic 4', Topic4 );
			ATE( Topic4, 't4a1s.htm', 'Activity 1' );
			ATE( Topic4, 't4a2s.htm', 'Activity 2' );
			ATE( Topic4, 't4a3s.htm', 'Activity 3' );
			ATE( Topic4, 't4a4s.htm', 'Activity 4' );

		var Topic5 = new TreeMenu( 'Topic5' );
		ATE( LearnerRes, 't5s.htm', 'Topic 5', Topic5 );
			ATE( Topic5, 't5a1s.htm', 'Activity 1' );
			ATE( Topic5, 't5a2s.htm', 'Activity 2' );
			ATE( Topic5, 't5a3s.htm', 'Activity 3' );
//			ATE( Topic5, 't5a4s.htm', 'Activity 4' );

		ATE( LearnerRes, 't6s.htm', 'Topic 6' );

//		var Topic6 = new TreeMenu( 'Topic6' );
//		ATE( LearnerRes, 't6s.htm', 'Topic 6', Topic6 );
//			ATE( Topic6, 't6a1s.htm', 'Activity 1' );
//			ATE( Topic6, 't6a2s.htm', 'Activity 2' );
//			ATE( Topic6, 't6a3s.htm', 'Activity 3' );
//			ATE( Topic6, 't6a4s.htm', 'Activity 4' );

//		ATE( LearnerRes, 'tips.htm', 'Tips' );


		var tipwrite = new TreeMenu( 'tipwrite' );
		ATE( LearnerRes, 'tipsEx.htm', 'Tips & Examples', tipwrite );
			ATE( tipwrite , 'tips.htm', 'Investigation Tips' );
			ATE( tipwrite , 'writeUpExample.htm', 'Write-up Example' );


		ATE( LearnerRes, 'javascript:LaunchActivityViewer()', 'View Your Submissions' );


	ATE( M0, 'javascript:LinkFocus( "teacherGuide/tindex.htm", "teacher" )', 'El Niņo Teacher Guide' );


	var encyclop = new TreeMenu( 'encyclop');
	ATE( M0, 'encyclo.htm', 'Encyclopedia', encyclop );
		ATE( encyclop, 'ency_phen.htm', 'Phenomena' );
		ATE( encyclop, 'ency_proc.htm', 'Processes' );
		ATE( encyclop, 'ency_princ.htm', 'Fund. Principles' );
		ATE( encyclop, 'ency_dataset.htm', 'Datasets' );
		ATE( encyclop, 'ency_tools.htm', 'Tools' );

	ATE( M0, 'mailto:vgee@dlese.org', 'Email Us' );

//	var Communication = new TreeMenu( 'Communication' );
//	ATE( M0, '', 'Communication/Help', Communication );
//		ATE( Communication, 'comm_raj.htm', 'Communication Links' );
//		ATE( Communication, '', 'Chat' );
//		ATE( Communication, '', 'Bulletin Board' );
//		ATE( Communication, 'mailto:vgee@dlese.org', 'Email Us' );
//		ATE( Communication, 'help.htm', 'Help' );

function ShowMenus() {

	if ( !IS_OLD_BROWSER ) {

		if ( IS_DHTML_BROWSER ) {

			Logo();
			Display( M0 );
      document.writeln( '<table width="100%" border="0" cellspacing="0" cellpadding="0"><td width=164><img src="/vgee/images/blank.gif" width="164" height="1"></td><td valign=top width="90%">' );
      document.writeln( '<table width="100%" border="1" cellpadding="14" cellspacing="0"><td bgcolor="#FEF4E2" valign="top">' );
		}
		else {

			Logo();
			document.writeln( '<table width="100%" border="0" cellspacing="0" cellpadding="0"><td valign=top>' );
			Display( M0, '_top' );      
      document.writeln( '</td><td valign=top>' );
      document.writeln( '<table width="100%" border="1" cellpadding="14" cellspacing="0"><td bgcolor="#FEF4E2" valign="top">' );
		}
	}
  else
  	document.writeln( '<b>This site requires a version 3.0+ browser to function fully!</b>' );
}

function Logo() {

	document.writeln( '<div class="logoPos"><a href="index.htm"><img src="' + SITE_BASE + 'images/learnerGfx.jpg" width="140" height="111" border="0"></a></div>');	
}

function ClosePage() {

	if ( !IS_OLD_BROWSER ) {

		document.writeln( '</td></table></td></table>' );
	}	
}



