//------------------
// Home Image Swap Script
//------------------
//A global value for currentTab needs to be set up front.
var currentTab = 'Strategy';

function changeOut(whichOne) {

//First, we turn the current tab off
document.getElementById(currentTab).src = "/graphics/sub"+currentTab+"_off.gif";

//Then, we turn the selected tab on
document.getElementById(whichOne).src = "/graphics/sub"+whichOne+"_on.gif";

document.getElementById('home'+currentTab).style.display = "none";
document.getElementById('home'+whichOne).style.display = "block";

//Then we fade out the current section and fade in the new section
//new Effect.Fade('home'+currentTab, { afterFinish:function(effect){ new Effect.Appear('home'+whichOne) }});

//Finally, we reset the current tab
currentTab = whichOne;
}

//------------------
// Get Projects Script
//------------------

function getProjects() {
	$('projects').innerHTML = '<div style="text-align:center;"><img src="/graphics/ajax-loader.gif" align="center"></div>';
	new Ajax.Request("wptest.php?type="+$('type').value+"&industry="+$('industry').value,{onSuccess:function(transport){
		$('projects').innerHTML = transport.responseText;
	}});
}