//--------------------------------------------------------
function checkRadios() {
 var el = document.forms[0].elements;
 for(var i = 0 ; i < el.length ; ++i) {
  if(el[i].type == "radio") {
   var radiogroup = el[el[i].name]; // get the whole set of radio buttons.
   var itemchecked = false;
   for(var j = 0 ; j < radiogroup.length ; ++j) {
    if(radiogroup[j].checked) {
	 itemchecked = true;
	 break;
	}
   }
   if(!itemchecked) { 
    alert("Please choose an answer for "+el[i].name+".");
    if(el[i].focus)
     el[i].focus();
	return false;
   }
  }
 }
 get_rad_value();
}

//-------------------------------------------------------------------

function computeRadioTotal (form) {
  var total = 0;
  var itemchecked = false;
  for (var e = 0; e < form.elements.length; e++)
    if (form.elements[e].type == 'radio' && form.elements[e].checked){
      total += parseFloat(form.elements[e].value);
	  var itemchecked = true;
	 }
	 
	  if(!itemchecked) 
	  alert("You have skipped at least one question. \nFor more accurate results, please go back and \nanswer all of the diagnostic questions. \nThen click on Show Results again");
	  if (total >= 70)
	  document.aForm.result.value = ("Your total score is " +total + ".\n It would appear that your personal and professional factors, collectively, mean that you are relatively well-suited for the small business world. However, if you have imbedded within this score any scores of 3 or less, you should take careful heed of that item and make sure that you can take at least some measures to overcome an area where your confidence is not positive.");
	  else if ((total<= 69) && (total>= 50))
	  document.aForm.result.value = ("Your total score is " +total + ".\n Your personal chances of business success are fair but you would be well advised to look at the weaker elements in the profile very carefully.");
  	  else if (total<= 49)
	  document.aForm.result.value = ("Your total score is " +total + ".\n You should carefully consider whether owning and managing a small business is the right step for you at this time, especially if you are unsure about having access to additional assistance. To the extent that you have been honest with yourself in completing these various questions, the probability of succeeding in small business is not on your side.  Review the areas where you scored low and see what might be done to raise the targeted scores. \nRemember that this is a preliminary diagnosis of the personal/professional area, providing only an indication of relative success or failure and is therefore not to be construed as a guarantee of either condition.");
}
//-------------------------------------------------------------------
