// JavaScript Document


/***********************************************
This is for the transfer first steps page it 
it hides questions and gives recommendation 
based on answers
**********************************************/

function show_hide(formname,groupname,answer,question,display) { //start function

	if (answer == "yes") {//if 	
	  document.getElementById(question).style.display = display;
	  document.getElementById('result').style.display = 'none';
	   for (var i=0; i < formname.elements.length; i++){//for
		  if (formname.elements[i].name == groupname){//nested if 
		 formname.elements[i].checked=false;
		  }//nested if
	 }//for
	 
	}//end if 
	
	else {//start else
		document.getElementById(question).style.display = display;
		//write the no and uncertain result
		document.getElementById('result').innerHTML='<p class = \"para\"><strong>Recommendation</strong> <hr />You are required to take an assessment to help you choose the best classes. You can sign up now at <a href=\"http://site.www.umb.edu/advising/assess.php\" title=\"Assessment\">Assessment</a><hr /><br /><br /></p>';
		document.getElementById('result').style.display='block';
		}//end else


}//end function

function result(formname,answer){
if (answer == "yes"){
	//write the yes result
	document.getElementById('result').innerHTML='<p class = \"para\"><strong>Recommendation</strong><hr />Critical analysis and effective writing are foundations of the UMass Boston curriculum.  Would you like faculty to evaluate your proficiency, to help you and your advisor choose the best course for you? If yes, sign up for <a href="http://site.www.umb.edu/advising/assess.php" title="Assessment"> Assessment.</a> <strong>If you believe you do not need assessment</strong>, sign up for <a href="http://site.www.umb.edu/advising/advising.php" title="Advising and Registration">Advising and Registration.</a><hr /> <br /><br /><br /><br /></p>';
	document.getElementById('result').style.display='block';
}

else{
//write the no or not sure result
	document.getElementById('result').innerHTML='<p class = \"para\"><strong>Recommendation</strong> <hr>Critical analysis and writing are foundations of the UMass Boston curriculum.  We strongly recommend that you have your proficiency in this area evaluated by faculty so that you can choose the best classes. If you agree, sign up for <a href=\"http://site.www.umb.edu/advising/assess.php\" title=\"Assessment\">Assessment.</a> <strong>If you believe you do not need assessment,</strong> sign up for <a href=\"http://site.www.umb.edu/advising/advising.php\" title=\"NSAR\">Advising and Registration.</a> <hr><br /><br /><br /><br /></p>';
	document.getElementById('result').style.display='block';
}
}

//This is for crw assessment
function transfercredits(answer,appearfieldset,disappearfieldset,display,formid) {
 	 //for those who choose after they have submitted
	 document.getElementById('warningfewer').style.display = 'none';
	 document.getElementById('warninggreater').style.display = 'none';
	    
		//clear out answers if user switches back and forth
		for (var i=0; i < document.getElementById(formid).elements.length; i++){//for
		document.getElementById(formid).elements[i].checked=false;

	 }//for
if (answer == "0-29") {//if 	
	  document.getElementById(appearfieldset).style.display = display;
	  document.getElementById(disappearfieldset).style.display = 'none';
	  document.getElementById('fewersubmit').style.display = display;
  	  document.getElementById('greatersubmit').style.display = 'none';
	  	 //for those who choices after they have submitted
	 document.getElementById('warningfewer').style.display = 'none';

	}//end if 

else{
	  document.getElementById(appearfieldset).style.display = display;
	  document.getElementById(disappearfieldset).style.display = 'none';
	  document.getElementById('greatersubmit').style.display = display;
	  document.getElementById('fewersubmit').style.display = 'none';
}
}

