// JS To handle assessment form...

function val_form() {
		return confirm('Please note that if you have included a resum&eacute; submitting this form may take a few minutes to process.');
	}
	
 $(document).ready(function() {
	
   $('#phase_0 div.content').show('slow');

   $(".bn_next").click( function() {
	   $(this).parents('div.content').hide('slow');
	   $(this).parents('fieldset').css('background-image','url(/images/tick.gif)');	
	   this_phase = $(this).parents('fieldset').attr('id');
	   next_phase = get_next_phase(this_phase);
	   
	   $(next_phase).show('slow');
	   window.scroll(0,300);
   });
   
   $(".bn_back").click( function() {
	   $(this).parents('div.content').hide('slow');
	   $(this).parents('fieldset').css('background-image','none');	
	   this_phase = $(this).parents('fieldset').attr('id');
	   prev_phase = get_prev_phase(this_phase);
	   $(prev_phase).show('slow'); 
	   $(prev_phase).parents('fieldset').css('background-image','none');
	   window.scroll(0,300);
   });
   
 });
 
 function get_next_phase(cur_phase) {
	 temp = cur_phase.split('_');
	 return '#phase_'+(Number(temp[1])+1)+" div.content";
 }
 
 function get_prev_phase(cur_phase) {
	 temp = cur_phase.split('_');
	 return '#phase_'+(Number(temp[1])-1)+" div.content";
 }