// JavaScript Document

function jump_menu_select(targ,selObj,restore){
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function verifynotify(field1, field2, result_id, match_html, nomatch_html) {
 this.field1 = field1;
 this.field2 = field2;
 this.result_id = result_id;
 this.match_html = match_html;
 this.nomatch_html = nomatch_html;

 this.check = function() {

   // Make sure we don't cause an error /'
   // for browsers that do not support getElementById
   if (!this.result_id) { return false; }
   if (!document.getElementById){ return false; }
   r = document.getElementById(this.result_id);
   if (!r){ return false; }

   if (this.field1.value != "" && this.field1.value == this.field2.value) {
     r.innerHTML = this.match_html;
   } else {
     r.innerHTML = this.nomatch_html;
   }
 }
}

function check_inputs() {
	var field_count = 0;

	var check1 = document.getElementById('check1');
	if (check1.value == "") {		
		field_count++;
	}
	
	var check2 = document.getElementById('check2');
	if (check2.value == "") {		
		field_count++;
	}
	
	var check3 = document.getElementById('check3');
	if (check3.value == "") {		
		field_count++;
	}
	
	var check4 = document.getElementById('check4');
	if (check4.value == "") {		
		field_count++;
	}
	
	var check5 = document.getElementById('check5');
	if (check5.value == "") {		
		field_count++;
	}
	
	var check6 = document.getElementById('check6');
	if (check6.value == "") {		
		field_count++;
	}
	
	var check7 = document.getElementById('check7');
	if (check7.value == "") {		
		field_count++;
	}

	var check8 = document.getElementById('check8');
	if (check8.value == "") {		
		field_count++;
	}
	
	var check9 = document.getElementById('check9');
	if (check9.value == "") {		
		field_count++;
	}
	
	var check10 = document.getElementById('check10');
	if (check10.value == "") {		
		field_count++;
	}
	
	if (field_count == 0) {
		document.password_form.action = "http://www.steffesauctioneers.com/auction_results/process/process_register.php";
		document.password_form.submit();
	}
	else {
		var fill_it_all = document.getElementById('fill_it_all');
		fill_it_all.innerHTML = "Please ensure you have completed all required fields.";
	
		field_count = 0;
	}
}
