var total_questions = 8;

function checkSelected(fn) {
	found = 0;
	tElements = fn.elements.length;
	for (x = 0; x < tElements; x++) {
		if (fn.elements[x].type == "radio" && fn.elements[x].checked == true) {
			found++;
		}
	}
	if (found < total_questions) {
		alert('Please make sure you have answered all of the ' + total_questions + ' questions.');
		return false;
	} else {
		return true;
	}
}

function CopyPlusSelect(fn, FData) {
     //var dataVal = eval('document.'+FData);
     var dataVal = document.forms[fn].elements[FData];
	 dataVal.focus();
     dataVal.select();
     var copyText = dataVal.value;
     if (window.clipboardData) { // IE send-to-clipboard method.
          window.clipboardData.setData('Text', copyText);
          
     } else if (window.netscape) {
          // You have to sign the code to enable this or allow the action in about:config by changing user_pref("signed.applets.codebase_principal_support", true);
          netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
          
          // Store support string in an object.
          var str = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);
          if (!str) return false;
          str.data=copyText;
          
          // Make transferable.
          var trans = Components.classes["@mozilla.org/widget/transferable;1"].createInstance(Components.interfaces.nsITransferable);
          if (!trans) return false;
          
          // Specify what datatypes we want to obtain, which is text in this case.
          trans.addDataFlavor("text/unicode");
          trans.setTransferData("text/unicode",str,copyText.length*2);
          
          var clipid=Components.interfaces.nsIClipboard;
          var clip = Components.classes["@mozilla.org/widget/clipboard;1"].getService(clipid);
          if (!clip) return false;
          
          clip.setData(trans,null,clipid.kGlobalClipboard);
     }
}
