		
		
		
		
		//alert ("javascript.js is loading...");
		//alert ('the_section = ' + the_section);
		//alert ('the_section_sub = ' + the_section_sub);
		
		
		
		
//	FUNCTIONS

//	NOTE : 	THESE FUNCTIONS ARE LISTED IN ALPHABETICAL ORDER.

//			>>>  KEEP IT THAT WAY!  <<<<


	function add_load_event(func) {
	
	//	When another developer adds rollovers, etc. w/ Dreamweaver, DW adds an onLoad call in the body.
	//	This function allows us to retain those commands while adding our own to the list (ie: prepare_elements())
	
		var old_onload = window.onload;
		
		if (typeof window.onload != 'function') {
			
			window.onload = func;
		
		} else {
		
			window.onload = function () {
				old_onload();
				func();
			}
		}
	}
	
	function getElementsByClass(elem, classname){
		
		classes = new Array();
		
		alltags = document.getElementsByTagName(elem);
		
		for (i=0; i<alltags.length; i++) {
		
			if (alltags[i].className == classname) {
				
				classes[classes.length] = alltags[i];
			}
		}
		
		return classes;
	}
	
	function image_swap (id, src) {
		
			//alert ("rolling over " + id + ", swapping with " + src);
			
		document.getElementById(id).src = src;
	}
	
	function nav_highlight_current_section() {
	
			//alert ("highlighting current section's nav item");
			//alert ('the_section_selected = ' + the_section_selected);
		
		for (i=0; i<nav_items.length; i++) {
			
				//alert ('name = ' + nav_items[i].getAttribute('id').substring(4));
			
			if (nav_items[i].getAttribute('id').substring(4) == the_section) {
			
			//	Unlight this nav item
				image_swap(nav_items[i].getAttribute('id'), the_path + '___media/__global/_page/' + nav_items[i].getAttribute('id') + '_over.gif');
			
			} else {
			
					//alert ('selected = ' + nav_items[i].getAttribute('id').substring(9)); 
			
			//	Highlight this nav item
				image_swap(nav_items[i].getAttribute('id'), the_path + '___media/__global/_page/' + nav_items[i].getAttribute('id') + '.gif');
			}
		}
	}
	
	function prepare_elements(){
	
			//alert ("preparing elements...");
	
	//	MENU VARS & FUNCTIONS	
	
	//	NOTE : These vars are NOT DECLARED so that they become available outside of this function
		nav_items = getElementsByClass('img','nav_item');
		
	//	Attach functionality to the nav links
		for (i=0; i<nav_items.length; i++) {
			
			nav_items[i].onmouseover = function () {
			
					//alert ('rolling over ' + the_path + '___media/__global/_page_top/' + this.getAttribute('id') + '_over.gif');
			
			//	Turn off all other buttons
				for (var i=0; i<nav_items.length; i++) {
					image_swap(nav_items[i].getAttribute('id'), the_path + '___media/__global/_page/' + nav_items[i].getAttribute('id') + '.gif');
				}
			
			//	HIghlight this button
				image_swap(this.getAttribute('id'), the_path + '___media/__global/_page/' + this.getAttribute('id') + '_over.gif');
			}
			
			nav_items[i].onmouseout = function () {
				
					//alert ('rolling out');
				
				image_swap(this.getAttribute('id'), the_path + '___media/__global/_page/' + this.getAttribute('id') + '.gif');
	
			//	Highlight nav button for the current section
				nav_highlight_current_section();
			}
		}
	
	//	Highlight nav button for the current section
		nav_highlight_current_section();
	
			//alert ('Elements prepared.');
 	
 	}	/* END PREPARE ELEMENTS */
 	
	function popup (link, name, width, height, features) {
	
			//alert ("opening a popup");
	
		window.open(link, name, "width="+width+","+"height="+height+","+features);
	}
	
	function toggle (id, state) {
	
			//alert ("toggling " + id + " to " + state);
	
		document.getElementById(id).style.display = state;
	}
		
		
		
		
		
		
		

//	ACTIONS	 //




//	Preload rollover graphics

	var images_to_preload = [
		the_path+'___media/__global/_page/nav_home_over.gif',
		the_path+'___media/__global/_page/nav_company_over.gif',
		the_path+'___media/__global/_page/nav_jobs_over.gif',
		the_path+'___media/__global/_page/nav_contact_over.gif'
	];
	
	for (var i=0; i<images_to_preload.length; i++) {
		
		var preloaded_image = new Image();
		
		preloaded_image.src = the_path + images_to_preload[i];
	}
	
		//alert ("Not broken...");
		



//	Add prepare_elements to the list of functions executed after the page loads
	add_load_event(prepare_elements);
	




	
	
	
	//alert ("javascript.js has loaded.");
	
	
	
	