function isComplete() {
var incomplete = 0;
// Create array of reqd form fields
var arrReqd = new Array($('#PresidentName'),$('#SubstituteName'),$('#address'),$('#city'),$('#st'),$('#ZIP'),$('#phone'),$('#email'),$('#SubstitutingFor'));
for (i=0; i<arrReqd.length; i++) {
	if ((arrReqd[i].length == 0) || (arrReqd[i].substring(0,4) == 'enter')) {
		incomplete++;
		}
	}
}

$(document).ready(function() {

	//disable the submit button by default
	$('#submit').attr('disabled','disabled').css( {'cursor':'default','border-color':'#f0f0f0','color':'#ccc'} );

	//create default values for text boxes
	if ( $('#PresidentName').val() == '' ) {
		$('#PresidentName').val('enter your own name…');
	}
	else {
		$('#PresidentName').html( $('#PresidentName').val() );	
	}
	if ( $('#SubstituteName').val() == '' ) {
		$('#SubstituteName').val('enter name of substitute delegate…');
	}
	else {
		$('#SubstituteName').html( $('#SubstituteName').val() );	
	}
	if ( $('#address').val() == '' ) {
		$('#address').val('enter address of substitute delegate…');
	}
	else {
		$('#address').html( $('#address').val() );	
	}
	if ( $('#city').val() == '' ) {
		$('#city').val('enter city of substitute delegate…');
	}
	else {
		$('#city').html( $('#city').val() );	
	}
	if ( $('#st').val() == '' ) {
		$('#st').val('enter state…');
	}
	else {
		$('#st').html( $('#st').val() );	
	}
	if ( $('#ZIP').val() == '' ) {
		$('#ZIP').val('enter ZIP…');
	}
	else {
		$('#ZIP').html( $('#ZIP').val() );	
	}
	if ( $('#phone').val() == '' ) {
		$('#phone').val('enter phone of substitute delegate…');
	}
	else {
		$('#phone').html( $('#phone').val() );	
	}
	if ( $('#email').val() == '' ) {
		$('#email').val('enter email of substitute delegate…');
	}
	else {
		$('#email').html( $('#email').val() );	
	}
	if ( $('#fax').val() == '' ) {
		$('#fax').val('enter fax of substitute delegate-optional');
	}
	else {
		$('#fax').html( $('#fax').val() );	
	}




	if ( $('#SubstitutingFor').val() == '' ) {
		$('#SubstitutingFor').val('enter name of delegate being replaced…');
	}
	else {
		$('#SubstitutingFor').html( $('#SubstitutingFor').val() );	
	}

	//delete the default text box text
	$('#PresidentName').focus(function() {
		if ( $(this).val() == 'enter your own name…' ) {
			//set the value to ''
			$(this).val('');
		}
	});
	$('#SubstituteName').focus(function() {
		if ( $(this).val() == 'enter name of substitute delegate…' ) {
			//set the value to ''
			$(this).val('');
		}
	});
	$('#address').focus(function() {
		if ( $(this).val() == 'enter address of substitute delegate…' ) {
			//set the value to ''
			$(this).val('');
		}
	});
	$('#city').focus(function() {
		if ( $(this).val() == 'enter city of substitute delegate…' ) {
			//set the value to ''
			$(this).val('');
		}
	});
	$('#st').focus(function() {
		if ( $(this).val() == 'enter state…' ) {
			//set the value to ''
			$(this).val('');
		}
	});
	$('#ZIP').focus(function() {
		if ( $(this).val() == 'enter ZIP…' ) {
			//set the value to ''
			$(this).val('');
		}
	});
	$('#phone').focus(function() {
		if ( $(this).val() == 'enter phone of substitute delegate…' ) {
			//set the value to ''
			$(this).val('');
		}
	});
	$('#email').focus(function() {
		if ( $(this).val() == 'enter email of substitute delegate…' ) {
			//set the value to ''
			$(this).val('');
		}
	});
	$('#fax').focus(function() {
		if ( $(this).val() == 'enter fax of substitute delegate-optional' ) {
			//set the value to ''
			$(this).val('');
		}
	});
	$('#SubstitutingFor').focus(function() {
		if ( $(this).val() == 'enter name of delegate being replaced…' ) {
			//set the value to ''
			$(this).val('');
		}
	});

	//recreate the default values for text boxes or display the form with name
	$('#PresidentName').blur(function() {
		//if the value is ''
		if ( $(this).val() == '' ) {
			//set the value to ''
			$(this).val('enter your own name…');
		}
		//if the value is not ''
		else {
			$('#PresidentName').html( $(this).val() );
		}
	});
	$('#SubstituteName').blur(function() {
		//if the value is ''
		if ( $(this).val() == '' ) {
			//set the value to ''
			$(this).val('enter name of the substitute delegate…');
		}
		//if the value is not ''
		else {
			$('#SubstituteName').html( $(this).val() );
		}
	});
	$('#address').blur(function() {
		//if the value is ''
		if ( $(this).val() == '' ) {
			//set the value to ''
			$(this).val('enter address of substitute delegate…');
		}
		//if the value is not ''
		else {
			$('#address').html( $(this).val() );
		}
	});
	$('#city').blur(function() {
		//if the value is ''
		if ( $(this).val() == '' ) {
			//set the value to ''
			$(this).val('enter city of substitute delegate…');
		}
		//if the value is not ''
		else {
			$('#city').html( $(this).val() );
		}
	});
	$('#st').blur(function() {
		//if the value is ''
		if ( $(this).val() == '' ) {
			//set the value to ''
			$(this).val('enter state…');
		}
		//if the value is not ''
		else {
			$('#st').html( $(this).val() );
		}
	});
	$('#ZIP').blur(function() {
		//if the value is ''
		if ( $(this).val() == '' ) {
			//set the value to ''
			$(this).val('enter ZIP…');
		}
		//if the value is not ''
		else {
			$('#ZIP').html( $(this).val() );
		}
	});
	$('#phone').blur(function() {
		//if the value is ''
		if ( $(this).val() == '' ) {
			//set the value to ''
			$(this).val('enter phone of substitute delegate…');
		}
		//if the value is not ''
		else {
			$('#phone').html( $(this).val() );
		}
	});
	$('#email').blur(function() {
		//if the value is ''
		if ( $(this).val() == '' ) {
			//set the value to ''
			$(this).val('enter email of substitute delegate…');
		}
		//if the value is not ''
		else {
			$('#email').html( $(this).val() );
		}
	});
	$('#fax').blur(function() {
		//if the value is ''
		if ( $(this).val() == '' ) {
			//set the value to ''
			$(this).val('enter fax of substitute delegate-optional');
		}
		//if the value is not ''
		else {
			$('#fax').html( $(this).val() );
		}
	});
	$('#SubstitutingFor').blur(function() {
		//if the value is ''
		if ( $(this).val() == '' ) {
			//set the value to ''
			$(this).val('enter name of delegate being replaced…');
		}
		//if the value is not ''
		else {
			$('#SubstitutingFor').html( $(this).val() );
		}
	});
	

	$('#PresidentObligation1').click(function() {
			$('#submit').attr('disabled',false).css( {'cursor':'pointer','border-color':'#ccc','color':'#666'} );							  
	});
	$('#PresidentObligation2').click(function() {
			$('#submit').attr('disabled',false).css( {'cursor':'pointer','border-color':'#ccc','color':'#666'} );							  
	});
});