/******************************************************
*'domread' means that it executes a function when the dom tree is loaded, 
*without waiting for images.  Only works when called from window
****************************************/
window.addEvent('domready', function() {

//this is the animation for the pull down menu with the search box and such at the top
myHeight = new Fx.Slide('pulldown', {duration: 1000, transition: Fx.Transitions.Circ.easeOut});
myHeight.toggle();

//adds an event handler for the about link
//it calls a page (ajax) to load in the "col1_2" div
//it also sets the class to 'nav_current' so that it is representitive of which page you are on
$('li_1_about').addEvent('click', function(e) {
	e = new Event(e).stop();
 
 if(CURRENT_PAGE ==0)
 {
	var url = "about.htm";
 
	/**
	 * The simple way for an Ajax request, 
	 * I can use onRequest/onComplete/onFailure
	 * if needed, but didn't think it was neccessary
	 */
	new Ajax(url, {
		method: 'get',
		update: $('col1_2')
	}).request();
	
	$('li_1_home').setAttribute('class', '');
	$('navigation_1_home').setAttribute('class', '');
	$('li_1_about').setAttribute('class', 'nav_current_li_1');
	$('navigation_1_about').setAttribute('class', 'nav_current_1');
	CURRENT_PAGE = 1;
}

});



//does same thing as above except for the home button
$('li_1_home').addEvent('click', function(e) {
	e = new Event(e).stop();
  if(CURRENT_PAGE ==1)
 {
	var url = "home.htm";
 
	/**
	 * The simple way for an Ajax request, 
	 * I can use onRequest/onComplete/onFailure
	 * if needed, but didn't think it was neccessary
	 */
	new Ajax(url, {
		method: 'get',
		update: $('col1_2')
	}).request();


	$('li_1_about').setAttribute('class', '');
	$('navigation_1_about').setAttribute('class', '');
	$('li_1_home').setAttribute('class', 'nav_current_li_1');
	$('navigation_1_home').setAttribute('class', 'nav_current_1');
	CURRENT_PAGE = 0;
 }
});














});

