function load_stuffs(){
	labels_to_captions();
	
	/* do other crap */
	
	// convictions select
	var c = $('Convictions');
	c.addEvent('change',function(){
		var tog = $('ConvictionsToggle');
		if(this.options[this.selectedIndex].value == 'Yes'){
			tog.style.display = 'block';
		}else{
			tog.style.display = 'none';
		}
	});
	
	// travel and overtime select
	var t = $('TravelAndOvertime');
	t.addEvent('change',function(){
		var tog = $('TravelAndOvertimeToggle');
		if(this.options[this.selectedIndex].value == 'No'){
			tog.style.display = 'block';
		}else{
			tog.style.display = 'none';
		}
	})
	
	// worked or applied selects
	var Ab = $('AppliedBefore');
	var Wb = $('WorkedBefore');
	Ab.addEvent('change',function(){
		var tog = $('WorkedOrAppliedExplanationToggle');
		var oth = $('WorkedBefore');
		
		WbVal = oth.options[oth.selectedIndex].value;
		AbVal = this.options[this.selectedIndex].value;
		if(AbVal == 'Yes' || WbVal == 'Yes'){
			tog.style.display = 'block';
		}else{
			tog.style.display = 'none';
		}
	});
	
	Wb.addEvent('change',function(){
		var tog = $('WorkedOrAppliedExplanationToggle');
		var oth = $('AppliedBefore');
		
		AbVal = oth.options[oth.selectedIndex].value;
		WbVal = this.options[this.selectedIndex].value;
		if(AbVal == 'Yes' || WbVal == 'Yes'){
			tog.style.display = 'block';
		}else{
			tog.style.display = 'none';
		}
	});
	
	// days unable to work
	var dU = $('DaysUnableOrUnwillingToWork');
	dU.addEvent('change',function(){
		var tog = $('DaysUnableOrUnwillingToWorkToggle');
		if(this.options[this.selectedIndex].value ==  'Yes'){
			tog.style.display = 'block';
		}else{
			tog.style.display = 'none';
		}
	});
	
	// graduation explanation
	var Hg = $('EducationHighSchoolGraduated');
	var Cg = $('EducationCollegeGraduated');
	Hg.addEvent('change',function(){
		var tog = $('EducationHsCollegeGradToggle');
		var oth = $('EducationCollegeGraduated');
		
		HgVal = this.options[this.selectedIndex].value;
		CgVal = oth.options[oth.selectedIndex].value;
		if(HgVal == 'No' || CgVal == 'No'){
			tog.style.display = 'block';
		}else{
			tog.style.display = 'none';
		}
	});
	
	Cg.addEvent('change',function(){
		var tog = $('EducationHsCollegeGradToggle');
		var oth = $('EducationHighSchoolGraduated');
		
		CgVal = this.options[this.selectedIndex].value;
		HgVal = oth.options[oth.selectedIndex].value;
		if(HgVal == 'No' || CgVal == 'No'){
			tog.style.display = 'block';
		}else{
			tog.style.display = 'none';
		}
	});
	
	// pursue further education
	var Pe = $('PursueFurtherStudies');
	Pe.addEvent('change',function(){
		var tog = $('PursueFurtherStudiesToggle');
		if(this.options[this.selectedIndex].value == 'Yes'){
			tog.style.display = 'block';
		}else{
			tog.style.display = 'none';
		}
	});
	
	// served in military
	var Sm = $('ServedInMilitary');
	Sm.addEvent('change',function(){
		var tog = $('ServedInMilitaryToggle');
		if(this.options[this.selectedIndex].value == 'Yes'){
			tog.style.display = 'block';
		}else{
			tog.style.display = 'none';
		}
	});
	
	// perform all tasks
	var Pt = $('AbleToPerformAllTasks');
	Pt.addEvent('change',function(){
		var tog = $('AbleToPerformAllTasksToggle');
		if(this.options[this.selectedIndex].value == 'No'){
			tog.style.display = 'block';
		}else{
			tog.style.display = 'none';
		}
	});
	
	// fraudulent claims
	var Fc = $('FiledFraudulentClaimAgainstAnyEmployers');
	Fc.addEvent('change',function(){
		var tog = $('FiledFraudulentClaimAgainstAnyEmployersToggle');
		if(this.options[this.selectedIndex].value == 'Yes'){
			tog.style.display = 'block';
		}else{
			tog.style.display = 'none';
		}
	});
	
	// safety violations
	var Sv = $('DisciplinedForViolatingSafetyRules');
	Sv.addEvent('change',function(){
		var tog = $('DisciplinedForViolatingSafetyRulesToggle');
		if(this.options[this.selectedIndex].value == 'Yes'){
			tog.style.display = 'block';
		}else{
			tog.style.display = 'none';
		}
	});
	
	// reporting for work
	var Rw = $('ReportForWorkRegularly');
	Rw.addEvent('change',function(){
		var tog = $('ReportForWorkRegularlyToggle');
		if(this.options[this.selectedIndex].value == 'No'){
			tog.style.display = 'block';
		}else{
			tog.style.display = 'none';
		}
	});
	
	// presently employed
	var Pd = $('PresentlyEmployed');
	Pd.addEvent('change',function(){
		var tog = $('PresentlyEmployedToggle');
		if(this.options[this.selectedIndex].value == 'Yes'){
			tog.style.display = 'block';
		}else{
			tog.style.display = 'none';
		}
	});
	
	// fired or asked to resign
	var Fr = $('FiredOrAskedToResign');
	Fr.addEvent('change',function(){
		var tog = $('FiredOrAskedToResignToggle');
		if(this.options[this.selectedIndex].value == 'Yes'){
			tog.style.display = 'block';
		}else{
			tog.style.display = 'none';
		}
	});
	
	// typing
	var Tw = $('Type');
	Tw.addEvent('change',function(){
		var tog = $('TypeToggle');
		if(this.options[this.selectedIndex].value == 'Yes'){
			tog.style.display = 'block';
		}else{
			tog.style.display = 'none';
		}
	});
	
	// shorthand
	/*
	var Sw = $('Shorthand');
	Sw.addEvent('change',function(){
		var tog = $('ShorthandToggle');
		if(this.options[this.selectedIndex].value == 'Yes'){
			tog.style.display = 'block';
		}else{
			tog.style.display = 'none';
		}
	});
	*/
	
	// computer or word processing exp
	var Cw = $('ComputerOrWordProcessingExperience');
	Cw.addEvent('change',function(){
		var tog = $('ComputerOrWordProcessingExperienceToggle');
		if(this.options[this.selectedIndex].value == 'Yes'){
			tog.style.display = 'block';
		}else{
			tog.style.display = 'none';
		}
	});
	
}

function send_app(){
	var initials = $('MyInitials').value.replace(/([\s])/g,'');
	var agree = $('AgreeToAffidavit').checked;
	var email = $('EmailAddress').value;
	
	var errors = [];
	
	//initials = initials.replace(/^([\s]*)/,'').replace(/([\s]*$)/,'');
	var good_mail = /^(("[\w-\s]+")|([\w-]+(?:\.[\w-]+)*)|("[\w-\s]+")([\w-]+(?:\.[\w-]+)*))(@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$)|(@\[?((25[0-5]\.|2[0-4][0-9]\.|1[0-9]{2}\.|[0-9]{1,2}\.))((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\.){2}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\]?$)/i
	if(!good_mail.test(email)){
		errors.push("You must enter a valid email address");
	}
	
	if(!initials.match(/([\w]{2,3})/)){
		errors.push("You must enter either two or three initials (i.e. JP, or JQP)");
	}

	if(!agree){
		errors.push("You must agree to the affidavit");
	}
	
	if(errors.length){
		alert("Errors...\n\n"+errors.join("\n"));
		return false;
	}
	
	return true;
	
	//$('app_form').submit();
}
window.onload = load_stuffs;