// JavaScript Document
// this function returns list of prescreen questions not answered by the applicant
// this function is used in jobprescreen.asp
function ListOfQuestionsNotAnswered() {
	var totQ
	var Qnos=' '
	//alert("hello")
	//alert("xx:" + form1["Q1"].length)
	totQ=20
	var ValidFlag=false
	for(i=1; i<=totQ ; i++) {
	   optName="q" + i
	   
	   optLen=update[optName].length
	   //alert("Len" + optLen)
	   ValidFlag=false
	   for(j=0; j<optLen ; j++) {
	     if(update[optName][j].checked==true) {
		   ValidFlag=true
		 } //end if
	   }// end for
	   if (ValidFlag==false) {
	      //alert("You have not answered: Question No " & i)
		  //location.href="#" + optName
		  Qnos += i + ', '   // prepare a string of Questions, not answered
		 // return false
	   }//end if
	}//end for
	if (Qnos.length > 1 ) {  // Qnos initialized to ' '. so its intial lenght is 1
	  var Qnos1=Qnos.substring(0, (Qnos.length-2))
	  var Qnofirst=Qnos.substring(1, Qnos.indexOf(','))
	  location.href="#Q" + Qnofirst // set the page focus to the first question in the
	                                // not answered list
	  alert(" Please answer the question/questions: \n" + Qnos1)
	  return false
	}// end if
	//else {

			
	//}
	
	return true
}//end function

