// JavaScript Document

function fpToggle (page)
{
	// find the currently visible page
	for ( i = 1 ; i <=3 ; i ++ ) {
		if ( document.getElementById ("hp-fp-" + i).style.display != "none" ) currentlyVisiblePage = i ;
	}
	
	// see if currentlyVisiblePage is equal page
	if ( page == currentlyVisiblePage ) return ;
	
	// generate id's
	toHideID = "hp-fp-" + currentlyVisiblePage ;
	toShowID = "hp-fp-" + page ;
	lnkToDisactivate = "fp-" + currentlyVisiblePage ;
	lnkToActivate = "fp-" + page ;
	
	//alert ('toHideID: ' + toHideID) ;
	
	// hide the currently visible page and disactivate the button
	$(toHideID).hide();
	document.getElementById (lnkToDisactivate).className = "" ;
	
	// show the new page and activate the button
	$(toShowID).appear({ duration: 1.0 }) ;
	document.getElementById (lnkToActivate).className = "selected" ;
}

function decora (obj, decorate, divToShowHide)
{
	if ( decorate ) {
		// color the obj and show the divToShowHide
		obj.style.backgroundColor = "#eeeeee" ;
		//document.getElementById (divToShowHide).style.display = "" ;
	} else {
		// uncolor the obj and hide the divToShowHide
		obj.style.backgroundColor = "" ;
		//document.getElementById (divToShowHide).style.display = "none" ;
	}
}