Event.observe(window, 'load', page_loaded_alpha);

function page_loaded_alpha(evt) {	
	if($('firstTimeAlphaLink')) {
		$('firstTimeAlphaLink').onclick=show_first_time_alpha_form;
		}	
		
	if($('alphaRegisterBack')) {
		$('alphaRegisterBack').onclick=show_initial_alpha_page;
		}
		
	if($('alphaPasswordBack')) {
		$('alphaPasswordBack').onclick=function() {
			window.location = alphaWelcomeLocation;	
			}
		}
	}
	
function show_first_time_alpha_form() {
	$('firstTimeAlphaLink').onclick= null;
	$('addEmailToWaitListForm').removeClassName('paddedAddEmailToWaitListForm');
	Effect.Fade('initialFormsArea', { duration: 0.9, queue: 'front' });
	Effect.Appear('alphaRegistrationFormsArea', { duration: 0.9, queue: 'end' });
	$('alphaRegistrationFormsArea').style.opacity=1;
	$('alphaRegisterBack').onclick=show_initial_alpha_page;
	}		
	
function show_initial_alpha_page() {
	$('alphaRegisterBack').onclick="";
	Effect.Fade('alphaRegistrationFormsArea', { duration: 0.9, queue: 'front' });
	Effect.Appear('initialFormsArea', { duration: 0.9, queue: 'end' });
	$('initialFormsArea').style.opacity=1;
	$('addEmailToWaitListForm').addClassName('paddedAddEmailToWaitListForm');
	$('firstTimeAlphaLink').onclick=show_first_time_alpha_form;
	}

