
var website_top_level = undefined ;

var dev_location = 'file:///O:/07-Websites/avelingONLINE.com.au/' ;
var testing_location = 'http://test.aveling.com.au/' ;
var live_location = 'http://www.avelingonline.com.au/' ;
var live_location_without_www = 'http://avelingonline.com.au/' ;



var current_location = window.document.location.toString() ;

if ( current_location.indexOf( dev_location ) > -1 ) 					website_top_level = dev_location ;
if ( current_location.indexOf( testing_location ) > -1 ) 				website_top_level = testing_location ;
if ( current_location.indexOf( live_location ) > -1 ) 					website_top_level = live_location ;
if ( current_location.indexOf( live_location_without_www ) > -1 ) 		website_top_level = live_location_without_www ;


//if ( current_location == undefined ) alert( 'website_top_level not set' ) ;
if ( website_top_level == undefined ) alert( 'website_top_level not set' ) ;






// create a top level for the entire site menu //
var course_links_obj = new Object( ) ;
	course_links_obj.title = 'Aveling Online' ;
	//course_links_obj.url = 'http://www.avelingonline.com.au' ;
	course_links_obj.div = 'nav' ;
	course_links_obj.active = true ;
	course_links_obj.sections = new Array() ;
	course_links_obj.is_top_level = true ;
	

	// create top level entries //
	
	// create an entry for the home page //
	var home_entry = new Object() ;
		home_entry.title = 'Home' ;
		home_entry.id = 'entry_home' ;
		home_entry.url = website_top_level + 'index.htm' ;
		home_entry.active = true ;
		home_entry.sections = new Array() ;

	
	// create an entry for the about us page //
	var about_us_entry = new Object() ;
		about_us_entry.title = 'About Us' ;
		about_us_entry.id = 'entry_about_us' ;
		about_us_entry.url = website_top_level + 'site/about/about.htm' ;
		about_us_entry.active = true ;
		about_us_entry.sections = new Array() ;
		

		// create an entry for the about us / what we do page //
		var about_what_we_do_entry = new Object() ;
			about_what_we_do_entry.title = 'What We Do' ;
			about_what_we_do_entry.id = 'entry_what_we_do' ;
			about_what_we_do_entry.url = website_top_level + 'site/about/what_we_do.htm' ;
			about_what_we_do_entry.active = true ;
			about_what_we_do_entry.sections = new Array() ;

		// create an entry for the about us / how we do it page //
		var about_how_we_do_it_entry = new Object() ;
			about_how_we_do_it_entry.title = 'How We Do It' ;
			about_how_we_do_it_entry.id = 'entry_how_we_do_it' ;
			about_how_we_do_it_entry.url = website_top_level + 'site/about/how_we_do_it.htm' ;
			about_how_we_do_it_entry.active = true ;
			about_how_we_do_it_entry.sections = new Array() ;
		
		// create an entry for the about us / the aveling advantage page //
		var about_the_aveling_advantage_entry = new Object() ;
			about_the_aveling_advantage_entry.title = 'The AVELING Advantage' ;
			about_the_aveling_advantage_entry.id = 'entry_the_aveling_advantage' ;
			about_the_aveling_advantage_entry.url = website_top_level + 'site/about/advantage.htm' ;
			about_the_aveling_advantage_entry.active = true ;
			about_the_aveling_advantage_entry.sections = new Array() ;		
		
		// create an entry for the about us / benefits of e-learning page //
		var about_benefits_of_elearning_entry = new Object() ;
			about_benefits_of_elearning_entry.title = 'Benefits of e-learning' ;
			about_benefits_of_elearning_entry.id = 'entry_benefits_of_elearning' ;
			about_benefits_of_elearning_entry.url = website_top_level + 'site/about/benefits.htm' ;
			about_benefits_of_elearning_entry.active = true ;
			about_benefits_of_elearning_entry.sections = new Array() ;	

		// add the sub elements to about us sections //
		about_us_entry.sections.push( about_what_we_do_entry ) ;
		about_us_entry.sections.push( about_how_we_do_it_entry ) ;
		about_us_entry.sections.push( about_the_aveling_advantage_entry ) ;
		about_us_entry.sections.push( about_benefits_of_elearning_entry ) ;
		
		
		
		

	// create an entry for the online courses page //
	var online_courses_entry = new Object() ;
		online_courses_entry.title = 'Online Courses' ;
		online_courses_entry.id = 'entry_online_courses' ;
		online_courses_entry.url = '#' ;
		online_courses_entry.active = true ;
		online_courses_entry.sections = new Array() ;

		// create an entry for the online courses / blue card page //
		var oc_blue_card_entry = new Object() ;
			oc_blue_card_entry.title = 'WA Construction<br /><span style="margin-left:2px; margin-top:-9px; display:block;">Blue Card/White Card</span>' ;
			oc_blue_card_entry.id = 'entry_wa_construction_blue_card' ;
			oc_blue_card_entry.url = website_top_level + 'site/projects/blue_card/csat.htm' ;
			oc_blue_card_entry.active = true ;
			oc_blue_card_entry.sections = new Array() ;
	

		// create an entry for the online courses / rsa page //
		var oc_rsa_entry = new Object() ;
			oc_rsa_entry.title = 'Responsible Service of Alcohol' ;
			oc_rsa_entry.id = 'entry_rsa' ;
			oc_rsa_entry.url = website_top_level + 'site/projects/rsa/rsa.htm' ;
			oc_rsa_entry.active = true ;
			oc_rsa_entry.sections = new Array() ;

		online_courses_entry.sections.push( oc_blue_card_entry ) ;
		online_courses_entry.sections.push( oc_rsa_entry ) ;


	// create an entry for the customised courses page //
	var customised_courses_entry = new Object() ;
		customised_courses_entry.title = 'Customised Courses' ;
		customised_courses_entry.id = 'entry_customised_courses' ;
		customised_courses_entry.url = website_top_level + 'site/about/customised_courses.htm' ;
		customised_courses_entry.active = true ;
		customised_courses_entry.sections = new Array() ;
	
	// create an entry for the porfolio page //
	var portfolio_entry = new Object() ;
		portfolio_entry.title = 'Portfolio' ;
		portfolio_entry.id = 'entry_portfolio' ;
		portfolio_entry.url = '#' ;
		portfolio_entry.active = true ;
		portfolio_entry.sections = new Array() ;

		// create an entry for the portfolio / rsa online page //
		var pf_rsa_online_entry = new Object() ;
			pf_rsa_online_entry.title = 'RSA Online' ;
			pf_rsa_online_entry.id = 'entry_rsa_online' ;
			pf_rsa_online_entry.url = website_top_level + 'site/projects/rsa/rsa_online.htm' ;
			pf_rsa_online_entry.active = true ;
			pf_rsa_online_entry.sections = new Array() ;

		// create an entry for the portfolio / pilbara iron page //
		var pf_pilbara_iron_entry = new Object() ;
			pf_pilbara_iron_entry.title = 'Pilbara Iron' ;
			pf_pilbara_iron_entry.id = 'entry_pilbara_iron' ;
			pf_pilbara_iron_entry.url = website_top_level + 'site/projects/pilbara_iron/pilbara_iron.htm' ;
			pf_pilbara_iron_entry.active = true ;
			pf_pilbara_iron_entry.sections = new Array() ;

		// create an entry for the portfolio / blue card page //
		var pf_bc_online_entry = new Object() ;
			pf_bc_online_entry.title = 'Blue Card/White Card Online' ;
			pf_bc_online_entry.id = 'entry_blue_card_online' ;
			pf_bc_online_entry.url = website_top_level + 'site/projects/blue_card/blue_card_online.htm' ;
			pf_bc_online_entry.active = true ;
			pf_bc_online_entry.sections = new Array() ;
			
		// create an entry for the portfolio / disability services commission page //
		var pf_dsc_entry = new Object() ;
			pf_dsc_entry.title = 'Disability Services Commission' ;
			pf_dsc_entry.id = 'entry_dsc' ;
			pf_dsc_entry.url = website_top_level + 'site/projects/dsc/dsc.htm' ;
			pf_dsc_entry.active = true ;
			pf_dsc_entry.sections = new Array() ;
			
		// create an entry for the portfolio / aveling training portal page //
		var pf_aveling_training_portal_entry = new Object() ;
			pf_aveling_training_portal_entry.title = 'AVELING Training Portal' ;
			pf_aveling_training_portal_entry.id = 'entry_aveling_training_portal' ;
			pf_aveling_training_portal_entry.url = website_top_level + 'site/aveling_portal/aveling_portal.htm' ;
			pf_aveling_training_portal_entry.active = true ;
			pf_aveling_training_portal_entry.sections = new Array() ;


		portfolio_entry.sections.push( pf_rsa_online_entry ) ;
		portfolio_entry.sections.push( pf_pilbara_iron_entry ) ;
		portfolio_entry.sections.push( pf_bc_online_entry ) ;
		portfolio_entry.sections.push( pf_dsc_entry ) ;
		portfolio_entry.sections.push( pf_aveling_training_portal_entry ) ;

		
	// create an entry for the news page //
	var news_entry = new Object() ;
		news_entry.title = 'News' ;
		news_entry.id = 'entry_news' ;
		news_entry.url = website_top_level + 'site/news/news.htm' ;
		news_entry.active = true ;
		news_entry.sections = new Array() ;
	
	// create an entry for the contact us page //
	var contact_us_entry = new Object() ;
		contact_us_entry.title = 'Contact Us' ;
		contact_us_entry.id = 'entry_contact_us' ;
		contact_us_entry.url = website_top_level + 'site/contact.htm' ;
		contact_us_entry.active = true ;
		contact_us_entry.sections = new Array() ;
		
		
	// add top level entries to entire site menu //
	course_links_obj.sections.push( home_entry ) ;
	course_links_obj.sections.push( about_us_entry ) ;
	course_links_obj.sections.push( online_courses_entry ) ;
	course_links_obj.sections.push( customised_courses_entry ) ;
	course_links_obj.sections.push( portfolio_entry ) ;
	course_links_obj.sections.push( news_entry ) ;
	course_links_obj.sections.push( contact_us_entry ) ;
