function sponsor(addr){
	window.open(addr);
}

function tout(page){
	window.location = page;
}
function drawHome(){
	//open the copy block to show all copy, or expand the inner area to fill the copy block
	if ($('copy-one').getHeight() < $('copy-one-inner').getHeight()){
		$('copy-one').setStyle({height: $('copy-one-inner').getHeight()});
	} else {
		$('copy-one-inner').setStyle({height: $('copy-one').getHeight()});
	}
	//extend the main wrapper
	$('main').setStyle({height: $('copy-one-inner').cumulativeOffset().top - $('main').cumulativeOffset().top + $('copy-one-inner').getHeight() + $('footer').getHeight()});
	//extend the news box
	$('newsroll').setStyle({height: $('copy-one-inner').cumulativeOffset().top - $('newsroll').cumulativeOffset().top + $('copy-one-inner').getHeight()});
	//position the footer and make it visible
	$('footer').setStyle({display: 'block', top: $('main').getHeight() - $('footer').getHeight()});
	//swfobject.embedSWF("home_page_flash.swf", "banner", "100%", "100%", "9.0.0.115", "include/expressInstall.swf");
	drawSearch();
}
function drawTraining(){
	//open the copy block to show all copy, or expand the inner area to fill the copy block
	if ($('copy-two').getHeight() < $('copy-two-inner').getHeight()){
		$('copy-two').setStyle({height: $('copy-two-inner').getHeight()});
	} else {
		$('copy-two-inner').setStyle({height: $('copy-two').getHeight()});
	}
	//extend the main wrapper
	$('main').setStyle({height: $('copy-two-inner').cumulativeOffset().top - $('main').cumulativeOffset().top + $('copy-two-inner').getHeight()});
	drawSearch();
}
function drawFlash(){
	$('copy-two').setStyle({'top':'390px'});
	drawTraining();
}
function drawAwards(){
	//open the copy block to show all copy, or expand the inner area to fill the copy block
	if ($('copy-three').getHeight() < $('copy-three-inner').getHeight()){
		$('copy-three').setStyle({height: $('copy-three-inner').getHeight()});
	} else {
		$('copy-three-inner').setStyle({height: $('copy-three').getHeight()});
	}
	//open the awards block to show all copy, or expand the inner area to fill the awards block
	if ($('awards').getHeight() < $('awards-inner').getHeight()){
		$('awards').setStyle({height: $('awards-inner').getHeight()});
	} else {
		$('awards-inner').setStyle({height: $('awards').getHeight()});
	}
	//extend the main wrapper to the taller of the copy block or the awards block
	if ($('copy-three').getHeight() > $('awards').getHeight()){
		$('main').setStyle({height: $('copy-three-inner').cumulativeOffset().top - $('main').cumulativeOffset().top + $('copy-three-inner').getHeight()});
	} else {
		$('main').setStyle({height: $('awards').cumulativeOffset().top - $('main').cumulativeOffset().top + $('awards').getHeight()});
	}
	drawSearch();
}
function drawSearch(){
	if(!($('searchForm'))){
		var sf = new Element('form',{'id':'searchForm','method':'GET','action':'/search.php'});
		$('header_right').insert(sf);
	}
	var s = new Element('span').update('Search: ');
	var f = new Element('input', {'type':'text','id':'search','name':'search','size':'16'});
	var a = new Element('a', {'href':'#search','class':'button','onclick':"$('searchForm').submit()"}).update("Go");
	$('searchForm').insert(s);
	$('searchForm').insert(f);
	$('searchForm').insert(a);
}
