    $(document).ready(function(){
        //Hide div w/id extra
		$("#about_patient").css("display","none");
        $("#q1_caregiver").css("display","none");
        $("#q2_caregiver").css("display","none");
        $("#q3_caregiver").css("display","none");
        $("#q4_caregiver").css("display","none");
        $("#infusion_caregiver").css("display","none");
        $("#injection_caregiver").css("display","none");
        $("#oral_caregiver").css("display","none");
        $("#how_many_years_caregiver").css("display","none");
        $("#how_many_years_caregiver2").css("display","none");
        $("#how_many_years_caregiver3").css("display","none");
        $("#how_many_years_caregiver4").css("display","none");
        $("#how_many_years_caregiver5").css("display","none");
        $("#how_many_years_caregiver6").css("display","none");
        $("#how_many_years_caregiver7").css("display","none");
        $("#how_many_years_caregiver8").css("display","none");
        $("#how_many_years_caregiver9").css("display","none");
        $("#how_many_years_caregiver10").css("display","none");
        $("#how_many_years_caregiver11").css("display","none");
        $("#how_many_years_caregiver12").css("display","none");
        $("#how_many_years_caregiver13").css("display","none");
        $("#how_many_years_caregiver14").css("display","none");
        $("#how_many_years_caregiver15").css("display","none");
        $("#how_many_years_caregiver16").css("display","none");
        $("#how_many_years_caregiver17").css("display","none");
        $("#how_many_years_caregiver18").css("display","none");
        $("#how_many_years_caregiver19").css("display","none");
        //$("#infusion_other").css("display","none");
        //$("#injection_other").css("display","none");
        //$("#oral_other").css("display","none");
        $("#signup_infusion").css("display","none");
        $("#signup_injection").css("display","none");
        $("#signup_oral").css("display","none");
        $("#Methotrexate").css("display","none");
        $("#Orencia2").css("display","none");
        $("#Remicade").css("display","none");
        $("#Rituxan").css("display","none");
        $("#Actemra").css("display","none");
        $("#Cimzia").css("display","none");
        $("#Enbrel").css("display","none");
        $("#Humira").css("display","none");
        $("#Kineret").css("display","none");
        $("#Methotrexate2").css("display","none");
        $("#Simponi").css("display","none");
        $("#Prednisone").css("display","none");
        $("#Arava").css("display","none");
        $("#Azulfidine").css("display","none");
        $("#Methotrexate3").css("display","none");
        $("#Plaquenil").css("display","none");
        $("#Ridaura").css("display","none");
        $("#Prednisone2").css("display","none");
        $("#Over_the_counter").css("display","none");
        //$("#prednisone_jia").css("display","none");
        $("#prednisone_ra_caregiver").css("display","none");
        $("#orencia_calendar").css("display","none");
        $("#physician_name").css("display","none");
        $("#tasks").css("display","none");
	    $("#physician_type").css("display","none");
	    $("#medications_considering").css("display","none");
	    //$("#tasks_caregiver").css("display","none");
	    //$("#tasks_patient").css("display","none");
	    //$("#satisfied_caregiver").css("display","none");
	    //$("#satisfied_patient").css("display","none");
	    //$("#doctor_discussed_caregiver").css("display","none");
	    //$("#doctor_discussed_patient").css("display","none");
	    //$("#medications_considering_caregiver").css("display","none");
	    //$("#medications_considering_patient").css("display","none");
	    
        // disable all sub checkbox options
			$.en_disInfusion(true);
			$.en_disInjection(true);
			$.en_disOral(true);
			$.en_disDynamicQuestions(false);

			// caregiver click function
        $("input:radio[name=usertype]").click(function(){
        // If caregiver is checked
        if($("input:radio[value='10016018']").is(":checked"))
        {
            //hide the patient divs and show the caregiver divs
            $("#about_patient").show("fast");
            $("#q1_caregiver").show("fast");
            $("#q2_caregiver").show("fast");
            $("#q3_caregiver").show("fast");
            $("#q4_caregiver").show("fast");
            $("#about_treatment").hide("fast");
            $("#q1_patient").hide("fast");
            $("#q2_patient").hide("fast");
            $("#q3_patient").hide("fast");
            $("#q4_patient").hide("fast");
            $("#infusion_caregiver").show("fast");
            $("#injection_caregiver").show("fast");
            $("#oral_caregiver").show("fast");
            //$("#oral_other").hide("fast");
            $("#infusion_patient").hide("fast");
            $("#injection_patient").hide("fast");
            $("#oral_patient").hide("fast");
            $("#how_many_years_caregiver").show("fast");
            $("#how_many_years_patient").hide("fast");
            $("#how_many_years_caregiver2").show("fast");
            $("#how_many_years_patient2").hide("fast");
            $("#how_many_years_caregiver3").show("fast");
            $("#how_many_years_patient3").hide("fast");
            $("#how_many_years_caregiver4").show("fast");
            $("#how_many_years_patient4").hide("fast");
            $("#how_many_years_caregiver5").show("fast");
            $("#how_many_years_patient5").hide("fast");
            $("#how_many_years_caregiver6").show("fast");
            $("#how_many_years_patient6").hide("fast");
            $("#how_many_years_caregiver7").show("fast");
            $("#how_many_years_patient7").hide("fast");
            $("#how_many_years_caregiver8").show("fast");
            $("#how_many_years_patient8").hide("fast");
            $("#how_many_years_caregiver9").show("fast");
            $("#how_many_years_patient9").hide("fast");
            $("#how_many_years_caregiver10").show("fast");
            $("#how_many_years_patient10").hide("fast");
            $("#how_many_years_caregiver11").show("fast");
            $("#how_many_years_patient11").hide("fast");
            $("#how_many_years_caregiver12").show("fast");
            $("#how_many_years_patient12").hide("fast");
            $("#how_many_years_caregiver13").show("fast");
            $("#how_many_years_patient13").hide("fast");
            $("#how_many_years_caregiver14").show("fast");
            $("#how_many_years_patient14").hide("fast");
            $("#how_many_years_caregiver15").show("fast");
            $("#how_many_years_patient15").hide("fast");
            $("#how_many_years_caregiver16").show("fast");
            $("#how_many_years_patient16").hide("fast");
            $("#how_many_years_caregiver17").show("fast");
            $("#how_many_years_patient17").hide("fast");
            $("#how_many_years_caregiver18").show("fast");
            $("#how_many_years_patient18").hide("fast");
            $("#how_many_years_caregiver19").show("fast");
            $("#how_many_years_patient19").hide("fast");
            $("#prednisone_ra").hide("fast");
			$("#prednisone_ra_caregiver").show("fast");
			
			//checking conditions for dynamic questions display
			$.show_Hide_Questions();
		//	$.check_Caregiver_Conditions();
		    
		    //checking conditions for dynamic questions enable/disable
			$.en_disDynamicQuestions(true);
        }
      /*  else
        {       
            //otherwise, enable patient 
			$("input:radio[value='10016015']").removeAttr("disabled");
        } */
         });
         
         //start - new
        // If caregiver is checked
        if($("input:radio[value='10016018']").is(":checked"))
        {
            //hide the patient divs and show the caregiver divs
            $("#about_patient").show("fast");
            $("#q1_caregiver").show("fast");
            $("#q2_caregiver").show("fast");
            $("#q3_caregiver").show("fast");
            $("#q4_caregiver").show("fast");
            $("#about_treatment").hide("fast");
            $("#q1_patient").hide("fast");
            $("#q2_patient").hide("fast");
            $("#q3_patient").hide("fast");
            $("#q4_patient").hide("fast");
            $("#infusion_caregiver").show("fast");
            $("#injection_caregiver").show("fast");
            $("#oral_caregiver").show("fast");
            //$("#oral_other").hide("fast");
            $("#infusion_patient").hide("fast");
            $("#injection_patient").hide("fast");
            $("#oral_patient").hide("fast");
            $("#how_many_years_caregiver").show("fast");
            $("#how_many_years_patient").hide("fast");
            $("#how_many_years_caregiver2").show("fast");
            $("#how_many_years_patient2").hide("fast");
            $("#how_many_years_caregiver3").show("fast");
            $("#how_many_years_patient3").hide("fast");
            $("#how_many_years_caregiver4").show("fast");
            $("#how_many_years_patient4").hide("fast");
            $("#how_many_years_caregiver5").show("fast");
            $("#how_many_years_patient5").hide("fast");
            $("#how_many_years_caregiver6").show("fast");
            $("#how_many_years_patient6").hide("fast");
            $("#how_many_years_caregiver7").show("fast");
            $("#how_many_years_patient7").hide("fast");
            $("#how_many_years_caregiver8").show("fast");
            $("#how_many_years_patient8").hide("fast");
            $("#how_many_years_caregiver9").show("fast");
            $("#how_many_years_patient9").hide("fast");
            $("#how_many_years_caregiver10").show("fast");
            $("#how_many_years_patient10").hide("fast");
            $("#how_many_years_caregiver11").show("fast");
            $("#how_many_years_patient11").hide("fast");
            $("#how_many_years_caregiver12").show("fast");
            $("#how_many_years_patient12").hide("fast");
            $("#how_many_years_caregiver13").show("fast");
            $("#how_many_years_patient13").hide("fast");
            $("#how_many_years_caregiver14").show("fast");
            $("#how_many_years_patient14").hide("fast");
            $("#how_many_years_caregiver15").show("fast");
            $("#how_many_years_patient15").hide("fast");
            $("#how_many_years_caregiver16").show("fast");
            $("#how_many_years_patient16").hide("fast");
            $("#how_many_years_caregiver17").show("fast");
            $("#how_many_years_patient17").hide("fast");
            $("#how_many_years_caregiver18").show("fast");
            $("#how_many_years_patient18").hide("fast");
            $("#how_many_years_caregiver19").show("fast");
            $("#how_many_years_patient19").hide("fast");
            $("#prednisone_ra").hide("fast");
			$("#prednisone_ra_caregiver").show("fast");
			
        }
	/*	else
		{
			$("input:radio[value='10016015']").removeAttr("disabled");
		} */
         //end - new
        //patient click function
          $("input:radio[value='10016015']").click(function(){
        // If patient is checked
        if ($("input:radio[value='10016015']").is(":checked"))
        {
            //show the patient divs and hide the caregiver divs
            $("#about_patient").hide("fast");
            $("#about_treatment").show("fast");
            $("#q1_patient").show("fast");
            $("#q2_patient").show("fast");
            $("#q3_patient").show("fast");
            $("#q4_patient").show("fast");
            $("#q1_caregiver").hide("fast");
            $("#q2_caregiver").hide("fast");
            $("#q3_caregiver").hide("fast");
            $("#q4_caregiver").hide("fast");
            $("#infusion_caregiver").hide("fast");
            $("#infusion_patient").show("fast");
            //$("#infusion_other").hide("fast");
            //$("#injection_other").hide("fast");
            //$("#oral_other").hide("fast");
            $("#oral_caregiver").hide("fast");
            $("#oral_patient").show("fast");
            $("#injection_caregiver").hide("fast");
            $("#injection_patient").show("fast");
            $("#how_many_years_caregiver").hide("fast");
            $("#how_many_years_patient").show("fast");
            $("#how_many_years_caregiver2").hide("fast");
            $("#how_many_years_patient2").show("fast");
            $("#how_many_years_caregiver3").hide("fast");
            $("#how_many_years_patient3").show("fast");
            $("#how_many_years_caregiver4").hide("fast");
            $("#how_many_years_patient4").show("fast");
            $("#how_many_years_caregiver5").hide("fast");
            $("#how_many_years_patient5").show("fast");
            $("#how_many_years_caregiver6").hide("fast");
            $("#how_many_years_patient6").show("fast");
            $("#how_many_years_caregiver7").hide("fast");
            $("#how_many_years_patient7").show("fast");
            $("#how_many_years_caregiver8").hide("fast");
            $("#how_many_years_patient8").show("fast");
            $("#how_many_years_caregiver9").hide("fast");
            $("#how_many_years_patient9").show("fast");
            $("#how_many_years_caregiver10").hide("fast");
            $("#how_many_years_patient10").show("fast");
            $("#how_many_years_caregiver11").hide("fast");
            $("#how_many_years_patient11").show("fast");
            $("#how_many_years_caregiver12").hide("fast");
            $("#how_many_years_patient12").show("fast");
            $("#how_many_years_caregiver13").hide("fast");
            $("#how_many_years_patient13").show("fast");
            $("#how_many_years_caregiver14").hide("fast");
            $("#how_many_years_patient14").show("fast");
            $("#how_many_years_caregiver15").hide("fast");
            $("#how_many_years_patient15").show("fast");
            $("#how_many_years_caregiver16").hide("fast");
            $("#how_many_years_patient16").show("fast");
            $("#how_many_years_caregiver17").hide("fast");
            $("#how_many_years_patient17").show("fast");
            $("#how_many_years_caregiver18").hide("fast");
            $("#how_many_years_patient18").show("fast");
            $("#how_many_years_caregiver19").hide("fast");
            $("#how_many_years_patient19").show("fast");
			$("#prednisone_ra").show("fast");
			$("#prednisone_ra_caregiver").hide("fast");
			//$("#prednisone_jia").hide("fast");
            //$("#infusion_Rituxan").show("fast");
            //$("#infusion_Remicade").show("fast");
            
            //$.check_Patient_Conditions();
            
            //checking conditions for dynamic questions display
            $.show_Hide_Questions();
            
            //checking conditions for dynamic questions enable/disable
            $.en_disDynamicQuestions(true)
        }
        else
        {       
            //otherwise, hide it 
            $("#about_patient").hide("fast");
        }
         }); 

       //start - new
        //If patient is checked
        if ($("input:radio[value='10016015']").is(":checked"))
        {
            //show the patient divs and hide the caregiver divs
            $("#about_patient").hide("fast");
            //$("#info_type").hide("fast");
            $("#about_treatment").show("fast");
            $("#q1_patient").show("fast");
            $("#q2_patient").show("fast");
            $("#q3_patient").show("fast");
            $("#q4_patient").show("fast");
            $("#q1_caregiver").hide("fast");
            $("#q2_caregiver").hide("fast");
            $("#q3_caregiver").hide("fast");
            $("#q4_caregiver").hide("fast");
            $("#infusion_caregiver").hide("fast");
            $("#infusion_patient").show("fast");
            //$("#infusion_other").hide("fast");
            //$("#injection_other").hide("fast");
            //$("#oral_other").hide("fast");
            $("#oral_caregiver").hide("fast");
            $("#injection_caregiver").hide("fast");
            $("#injection_patient").show("fast");
            $("#oral_patient").show("fast");
            $("#how_many_years_caregiver").hide("fast");
            $("#how_many_years_patient").show("fast");
            $("#how_many_years_caregiver2").hide("fast");
            $("#how_many_years_patient2").show("fast");
            $("#how_many_years_caregiver3").hide("fast");
            $("#how_many_years_patient3").show("fast");
            $("#how_many_years_caregiver4").hide("fast");
            $("#how_many_years_patient4").show("fast");
            $("#how_many_years_caregiver5").hide("fast");
            $("#how_many_years_patient5").show("fast");
            $("#how_many_years_caregiver6").hide("fast");
            $("#how_many_years_patient6").show("fast");
            $("#how_many_years_caregiver7").hide("fast");
            $("#how_many_years_patient7").show("fast");
            $("#how_many_years_caregiver8").hide("fast");
            $("#how_many_years_patient8").show("fast");
            $("#how_many_years_caregiver9").hide("fast");
            $("#how_many_years_patient9").show("fast");
            $("#how_many_years_caregiver10").hide("fast");
            $("#how_many_years_patient10").show("fast");
            $("#how_many_years_caregiver11").hide("fast");
            $("#how_many_years_patient11").show("fast");
            $("#how_many_years_caregiver12").hide("fast");
            $("#how_many_years_patient12").show("fast");
            $("#how_many_years_caregiver13").hide("fast");
            $("#how_many_years_patient13").show("fast");
            $("#how_many_years_caregiver14").hide("fast");
            $("#how_many_years_patient14").show("fast");
            $("#how_many_years_caregiver15").hide("fast");
            $("#how_many_years_patient15").show("fast");
            $("#how_many_years_caregiver16").hide("fast");
            $("#how_many_years_patient16").show("fast");
            $("#how_many_years_caregiver17").hide("fast");
            $("#how_many_years_patient17").show("fast");
            $("#how_many_years_caregiver18").hide("fast");
            $("#how_many_years_patient18").show("fast");
            $("#how_many_years_caregiver19").hide("fast");
            $("#how_many_years_patient19").show("fast");
			$("#prednisone_ra").show("fast");
			$("#prednisone_ra_caregiver").hide("fast");
			//$("#prednisone_jia").hide("fast");
        }
       //end - new 
        
        if ($("input:checkbox[name='infusion']").is(":checked"))
        {
            //show Infusion admin drugs
            $("#signup_infusion").show("fast");

			if($("input:radio[value='10016018']").is(":checked"))
			{
				$("#infusion_patient").hide("fast");
				$("#infusion_caregiver").show("fast");
				$("#injection_patient").hide("fast");
				$("#injection_caregiver").show("fast");
				$("#oral_patient").hide("fast");
				$("#oral_caregiver").show("fast");
			}
			else
			{
				$("#infusion_caregiver").hide("fast");
				$("#infusion_patient").show("fast");
				$("#injection_caregiver").hide("fast");
				$("#injection_patient").show("fast");
				$("#oral_caregiver").hide("fast");
				$("#oral_patient").show("fast");
				//$("#infusion_other").hide("fast");
				//$("#injection_other").hide("fast");
				//$("#oral_other").hide("fast");
			}
        }

        // disable not_taking on onload
		if ($("input:checkbox[name='infusion']").is(":checked") || $("input:checkbox[name='injection']").is(":checked") || $("input:checkbox[name='oral']").is(":checked"))
		{
			$("input:checkbox[name='not_taking']").attr("disabled", "disabled");			
		}
        
        //Infusion click function
       $("input:checkbox[name='infusion']").click(function(){
        // If Infusion is checked
        if ($("input:checkbox[name='infusion']").is(":checked"))
        {
            $.en_disInfusion(false);
            //show Infusion admin drugs
            $("#signup_infusion").show("fast");

			if($("input:radio[value='10016018']").is(":checked"))
			{
				$("#infusion_patient").hide("fast");
				$("#infusion_caregiver").show("fast");
				$("#injection_patient").hide("fast");
				$("#injection_caregiver").show("fast");
				$("#oral_patient").hide("fast");
				$("#oral_caregiver").show("fast");
				
			    //$.check_Caregiver_Conditions();
			}
			else
			{
				$("#infusion_caregiver").hide("fast");
				$("#infusion_patient").show("fast");
				$("#injection_caregiver").hide("fast");
				$("#injection_patient").show("fast");
				$("#oral_caregiver").hide("fast");
				$("#oral_patient").show("fast");
				//$("#infusion_other").hide("fast");
				//$("#injection_other").hide("fast");
				//$("#oral_other").hide("fast");
			    
			    //$.check_Patient_Conditions();
			}
			
        } 
        else
        {       
            //otherwise, hide it 
            $("#signup_infusion").hide("fast");
            //$("#physician_type").hide("fast"); 
            //$("#tasks").hide("fast");
            //$("#medications_considering").hide("fast");
            //disable sub options
			$.en_disInfusion(true);
			$("input:radio[name='orencia_infusion_date']").attr("disabled", "disabled");
		/*	if($("input:radio[value='10016018']").is(":checked"))
			    {
			        $.check_Caregiver_Conditions();
			    }
		    if($("input:radio[value='10016015']").is(":checked"))
		    {
		        $.check_Patient_Conditions();
		    } */
			
        }

		if ($("input:checkbox[name='infusion']").is(":checked") || $("input:checkbox[name='injection']").is(":checked") || $("input:checkbox[name='oral']").is(":checked"))
		{
			$("input:checkbox[name='not_taking']").attr("disabled", "disabled");
		} else
		{
			$("input:checkbox[name='not_taking']").removeAttr("disabled");	
		}
		
	    //checking conditions for show/hide of dynamic questions
		$.show_Hide_Questions();
		
		//checking conditions for dynamic questions enable/disable
		$.en_disDynamicQuestions(true);

         });

        if ($("input:checkbox[name='injection']").is(":checked"))
        {
            //show Injection admin drugs
            $("#signup_injection").show("fast");

			if($("input:radio[value='10016018']").is(":checked"))
			{
				$("#infusion_patient").hide("fast");
				$("#infusion_caregiver").show("fast");
				$("#injection_patient").hide("fast");
				$("#injection_caregiver").show("fast");
				$("#oral_patient").hide("fast");
				$("#oral_caregiver").show("fast");
			}
			else
			{
				$("#infusion_caregiver").hide("fast");
				$("#infusion_patient").show("fast");
				$("#injection_caregiver").hide("fast");
				$("#injection_patient").show("fast");
				$("#oral_caregiver").hide("fast");
				$("#oral_patient").show("fast");
				//$("#infusion_other").hide("fast");
				//$("#injection_other").hide("fast");
				//$("#oral_other").hide("fast");
			}

        }
        
        //Injection click function
        $("input:checkbox[name='injection']").click(function(){
        // If injection is checked
        if ($("input:checkbox[name='injection']").is(":checked"))
        {
            //enable sub options
			$.en_disInjection(false);
            //show Injection admin drugs
            $("#signup_injection").show("fast");

			if($("input:radio[value='10016018']").is(":checked"))
			{
				$("#infusion_patient").hide("fast");
				$("#infusion_caregiver").show("fast");
				$("#injection_patient").hide("fast");
				$("#injection_caregiver").show("fast");
				$("#oral_patient").hide("fast");
				$("#oral_caregiver").show("fast");
				
				//$.check_Caregiver_Conditions();
			}
			else
			{
				$("#infusion_caregiver").hide("fast");
				$("#infusion_patient").show("fast");
				$("#injection_caregiver").hide("fast");
				$("#injection_patient").show("fast");
				$("#oral_caregiver").hide("fast");
				$("#oral_patient").show("fast");
				//$("#infusion_other").hide("fast");
				//$("#injection_other").hide("fast");
				//$("#oral_other").hide("fast");
				
			    //$.check_Patient_Conditions();
			}
        }
        else
        {       
            //otherwise, hide it 
            $("#signup_injection").hide("fast");
            //disable sub options
			$.en_disInjection(true);
			
		/*	if($("input:radio[value='10016018']").is(":checked"))
			    {
			        $.check_Caregiver_Conditions();
			    }
		    if($("input:radio[value='10016015']").is(":checked"))
		    {
		        $.check_Patient_Conditions();
		    }	*/
        }

		if ($("input:checkbox[name='infusion']").is(":checked") || $("input:checkbox[name='injection']").is(":checked") || $("input:checkbox[name='oral']").is(":checked"))
		{
			$("input:checkbox[name='not_taking']").attr("disabled", "disabled");			
		} else
		{
			$("input:checkbox[name='not_taking']").removeAttr("disabled");	
		}
		//checking conditions for show/hide of dynamic questions
		$.show_Hide_Questions();
		
		//checking conditions for dynamic questions enable/disable
		$.en_disDynamicQuestions(true);

        }); 

        if ($("input:checkbox[name='oral']").is(":checked"))

        {
            //show Oral admin drugs 
            $("#signup_oral").show("fast");

			if($("input:radio[value='10016018']").is(":checked"))
			{
				$("#infusion_patient").hide("fast");
				$("#infusion_caregiver").show("fast");
				$("#injection_patient").hide("fast");
				$("#injection_caregiver").show("fast");
				$("#oral_patient").hide("fast");
				$("#oral_caregiver").show("fast");
			}
			else
			{
				$("#infusion_caregiver").hide("fast");
				$("#infusion_patient").show("fast");
				$("#injection_caregiver").hide("fast");
				$("#injection_patient").show("fast");
				$("#oral_caregiver").hide("fast");
				$("#oral_patient").show("fast");
				//$("#infusion_other").hide("fast");
				//$("#injection_other").hide("fast");
				//$("#oral_other").hide("fast");
			}
        }
        
        //Oral click function
        $("input:checkbox[name='oral']").click(function(){
        // If oral is checked
        if ($("input:checkbox[name='oral']").is(":checked"))
        {
            //enable sub options
			$.en_disOral(false);
            //show the hidden div
            $("#signup_oral").show("fast");

			if($("input:radio[value='10016018']").is(":checked"))
			{
				$("#infusion_patient").hide("fast");
				$("#infusion_caregiver").show("fast");
				$("#injection_patient").hide("fast");
				$("#injection_caregiver").show("fast");
				$("#oral_patient").hide("fast");
				$("#oral_caregiver").show("fast");
				
				//$.check_Caregiver_Conditions();
			}
			else
			{
				$("#infusion_caregiver").hide("fast");
				$("#infusion_patient").show("fast");
				$("#injection_caregiver").hide("fast");
				$("#injection_patient").show("fast");
				$("#oral_caregiver").hide("fast");
				$("#oral_patient").show("fast");
				//$("#infusion_other").hide("fast");
				//$("#injection_other").hide("fast");
				//$("#oral_other").hide("fast");
				
		        //$.check_Patient_Conditions();
		       	
			}
        }
        else
        {       
            //otherwise, hide it 
            $("#signup_oral").hide("fast");
            //disable sub options
			$.en_disOral(true);
            
           /* if($("input:radio[value='10016018']").is(":checked"))
			    {
			        $.check_Caregiver_Conditions();
			    }
	        if($("input:radio[value='10016015']").is(":checked"))
	        {
	            $.check_Patient_Conditions();
	        }	*/
        }

		if ($("input:checkbox[name='infusion']").is(":checked") || $("input:checkbox[name='injection']").is(":checked") || $("input:checkbox[name='oral']").is(":checked"))
		{
			$("input:checkbox[name='not_taking']").attr("disabled", "disabled");			
		} else
		{
			$("input:checkbox[name='not_taking']").removeAttr("disabled");	
		}
		
		//checking conditions for show/hide of dynamic questions
		$.show_Hide_Questions();
		
		//checking conditions for dynamic questions enable/disable
		$.en_disDynamicQuestions(true);

         }); 

		if ($("input:checkbox[name='not_taking']").is(":checked"))
        {
            //hide Infusion, Injection and Oral drugs when not taking is selected
            $("#signup_infusion").hide("fast");
			$("#signup_injection").hide("fast");
			$("#signup_oral").hide("fast");
			$("input:checkbox[name='infusion']").attr("disabled", "disabled");
			$("input:checkbox[name='injection']").attr("disabled", "disabled");			
			$("input:checkbox[name='oral']").attr("disabled", "disabled");
        }
        
        //Not currently on medication click function
       $("input:checkbox[name='not_taking']").click(function(){
        // If Not currently on medication is checked
        if ($("input:checkbox[name='not_taking']").is(":checked"))
        {
            //hide Infusion, Injection and Oral drugs when not taking is selected
            $("#signup_infusion").hide("fast");
			$("#signup_injection").hide("fast");
			$("#signup_oral").hide("fast");
			$("input:checkbox[name='infusion']").attr("disabled", "disabled");
			$("input:checkbox[name='injection']").attr("disabled", "disabled");			
			$("input:checkbox[name='oral']").attr("disabled", "disabled");
			
			//checking conditions for show/hide of dynamic questions
		    $.show_Hide_Questions();
		
		    //checking conditions for dynamic questions enable/disable
		    $.en_disDynamicQuestions(false);
			
        }
        else
        {       
            //otherwise, enable Infusion, Injection and Oral checkboxes
			$("input:checkbox[name='infusion']").removeAttr("disabled");
            $("input:checkbox[name='injection']").removeAttr("disabled");
			$("input:checkbox[name='oral']").removeAttr("disabled");
			
			//checking conditions for show/hide of dynamic questions
		    $.show_Hide_Questions();
		
		    //checking conditions for dynamic questions enable/disable
		    $.en_disDynamicQuestions(true);
        }

        });
         
        //Methotrexate click function 
        $("input:checkbox[name='checkbox_Methotrexate']").click(function(){
        
        // If Methotrexate is checked
        if ($("input:checkbox[name='checkbox_Methotrexate']").is(":checked"))
        {
            //show the hidden div
            $("#Methotrexate").show("fast");
			$("input:radio[name='how_long_methotrexate']").removeAttr("disabled");
			
			if ($("input:radio[value='10016015']").is(":checked"))
			{
				$("#how_many_years_caregiver").hide("fast");
				$("#how_many_years_patient").show("fast");
				//$.hide_Caregiver_Questions();
				
			}
			if($("input:radio[value='10016018']").is(":checked"))
			{
				$("#how_many_years_caregiver").show("fast");
				$("#how_many_years_patient").hide("fast");
				//$.hide_Patient_Questions();
			}
        }
        else
        {       
            //otherwise, hide it 
            $("#Methotrexate").hide("fast");
            $("input:radio[name='how_long_methotrexate']").attr("disabled", "disabled");
            //checking conditions for dynamic questions display
            //$.show_Hide_Questions();
        }
		//checking conditions for dynamic questions enable/disable
		//$.en_disDynamicQuestions(true);
     });
            
        // If Methotrexate is checked
        if ($("input:checkbox[name='checkbox_Methotrexate']").is(":checked"))
        {
            //show the hidden div
            $("#Methotrexate").show("fast");

			if ($("input:radio[value='10016015']").is(":checked"))
			{
				$("#how_many_years_caregiver").hide("fast");
				$("#how_many_years_patient").show("fast");
			}
			if($("input:radio[value='10016018']").is(":checked"))
			{
				$("#how_many_years_caregiver").show("fast");
				$("#how_many_years_patient").hide("fast");
			}
        }
        else
        {       
            //otherwise, hide it 
            $("#Methotrexate").hide("fast");
            $("input:radio[name='how_long_methotrexate']").attr("disabled", "disabled");
        }

    //INFUSION BIOLOGIC
    
        //Orencia click function
        $("input:checkbox[name='checkbox_Orencia']").click(function(){
        // If Orencia is checked
        if ($("input:checkbox[name='checkbox_Orencia']").is(":checked"))
        {
            //show the hidden div
            $("#Orencia2").show("fast");
            
          $("input:radio[name='orencia_infusion_date']").removeAttr("disabled"); 
          $("input:checkbox[name='checkbox_Rituxan']").attr("disabled", "disabled");
          $("input:checkbox[name='checkbox_Remicade']").attr("disabled", "disabled");
          $("input:checkbox[name='checkbox_Actemra']").attr("disabled", "disabled");

			if ($("input:radio[value='10016015']").is(":checked"))
			{
				$("#how_many_years_caregiver2").hide("fast");
				$("#how_many_years_patient2").show("fast");
			}
			if($("input:radio[value='10016018']").is(":checked"))
			{
				$("#how_many_years_caregiver2").show("fast");
				$("#how_many_years_patient2").hide("fast");
			}
			
			//hide and disable additional questions on selection of orencia
			$("#physician_type").hide("fast");
            document.getElementById("physician-type<10002329,ID>").disabled = true;
            document.getElementById("physician-name").disabled = true; 
            $("#physician_name").hide("fast"); 
            $("#tasks").hide("fast");
            $("#medications_considering").hide("fast");
            $("input:checkbox[name='checkbox_tasks']").attr("disabled", "disabled");
            $("input:radio[name='how_satisfied']").attr("disabled", "disabled");
            $("input:radio[name='doctor_discussed']").attr("disabled", "disabled");
            $("input:checkbox[name='medications_ra']").attr("disabled", "disabled");
            $("input:radio[name='next_appt_ra']").attr("disabled", "disabled");
        }
        else
        {       
            //otherwise, hide it 
            $("#Orencia2").hide("fast");
            $("input:radio[name='orencia_infusion_date']").attr("disabled", "disabled")
            
            //checking conditions for dynamic questions display
            $.show_Hide_Questions();
            
            //checking conditions for dynamic questions enable/disable
            $.en_disDynamicQuestions(true);
            
            //enable other checkboxes
            $("input:checkbox[name='checkbox_Rituxan']").removeAttr("disabled");
            $("input:checkbox[name='checkbox_Remicade']").removeAttr("disabled");
            $("input:checkbox[name='checkbox_Actemra']").removeAttr("disabled");
        }
        
     });

        // If Orencia is checked
        if ($("input:checkbox[name='checkbox_Orencia']").is(":checked"))
        {
            //show the hidden div
            $("#Orencia2").show("fast");
            $("input:radio[name='orencia_infusion_date']").removeAttr("disabled");

              $("input:checkbox[name='checkbox_Rituxan']").attr("disabled", "disabled");
              $("input:checkbox[name='checkbox_Remicade']").attr("disabled", "disabled");
              $("input:checkbox[name='checkbox_Actemra']").attr("disabled", "disabled");

			if ($("input:radio[value='10016015']").is(":checked"))
			{
				$("#how_many_years_caregiver2").hide("fast");
				$("#how_many_years_patient2").show("fast");
			}
			if($("input:radio[value='10016018']").is(":checked"))
			{
				$("#how_many_years_caregiver2").show("fast");
				$("#how_many_years_patient2").hide("fast");
			}
        }
        else
        {       
            //otherwise, hide it 
            $("#Orencia2").hide("fast");
            $("input:radio[name='orencia_infusion_date']").attr("disabled", "disabled");
        } 
          //Remicade click function
          $("input:checkbox[name='checkbox_Remicade']").click(function(){
        // If Remicade is checked
        if ($("input:checkbox[name='checkbox_Remicade']").is(":checked"))
        {
            //show the hidden div
            $("#Remicade").show("fast");
            $("input:radio[name='how_long_remicade']").removeAttr("disabled");
            
              $("input:checkbox[name='checkbox_Rituxan']").attr("disabled", "disabled");
              $("input:checkbox[name='checkbox_Orencia']").attr("disabled", "disabled");
              $("input:checkbox[name='checkbox_Actemra']").attr("disabled", "disabled");

			if ($("input:radio[value='10016015']").is(":checked"))
			{
				$("#how_many_years_caregiver3").hide("fast");
				$("#how_many_years_patient3").show("fast");
				//$.hide_Caregiver_Questions();
			}
			if($("input:radio[value='10016018']").is(":checked"))
			{
				$("#how_many_years_caregiver3").show("fast");
				$("#how_many_years_patient3").hide("fast");
				//$.hide_Patient_Questions();	
			}
        }
        else
        {       
            //otherwise, hide it 
            $("#Remicade").hide("fast");
            $("input:radio[name='how_long_remicade']").attr("disabled", "disabled");
            
            //$.show_Hide_Questions();
            
            //enable other checkboxes
            $("input:checkbox[name='checkbox_Rituxan']").removeAttr("disabled");
            $("input:checkbox[name='checkbox_Orencia']").removeAttr("disabled");
            $("input:checkbox[name='checkbox_Actemra']").removeAttr("disabled");
        }
        //checking conditions for dynamic questions enable/disable
		//$.en_disDynamicQuestions(true);
     });
		  
        // If Remicade is checked
        if ($("input:checkbox[name='checkbox_Remicade']").is(":checked"))
        {
            //show the hidden div
            $("#Remicade").show("fast");
            $("input:radio[name='how_long_remicade']").removeAttr("disabled");

              $("input:checkbox[name='checkbox_Rituxan']").attr("disabled", "disabled");
              $("input:checkbox[name='checkbox_Orencia']").attr("disabled", "disabled");
              $("input:checkbox[name='checkbox_Actemra']").attr("disabled", "disabled");

			if ($("input:radio[value='10016015']").is(":checked"))
			{
				$("#how_many_years_caregiver3").hide("fast");
				$("#how_many_years_patient3").show("fast");
			}
			if($("input:radio[value='10016018']").is(":checked"))
			{
				$("#how_many_years_caregiver3").show("fast");
				$("#how_many_years_patient3").hide("fast");
			}
        }
        else
        {       
            //otherwise, hide it 
            $("#Remicade").hide("fast");
            $("input:radio[name='how_long_remicade']").attr("disabled", "disabled");
        }
        

      $("input:checkbox[name='checkbox_Rituxan']").click(function(){
        // If checked
        if ($("input:checkbox[name='checkbox_Rituxan']").is(":checked"))
        {
            //show the hidden div
            $("#Rituxan").show("fast");
            $("input:radio[name='how_long_rituxan']").removeAttr("disabled");

              $("input:checkbox[name='checkbox_Remicade']").attr("disabled", "disabled");
              $("input:checkbox[name='checkbox_Orencia']").attr("disabled", "disabled");
              $("input:checkbox[name='checkbox_Actemra']").attr("disabled", "disabled");

			if ($("input:radio[value='10016015']").is(":checked"))
			{
				$("#how_many_years_caregiver4").hide("fast");
				$("#how_many_years_patient4").show("fast");
				//$.hide_Caregiver_Questions();
			}
			if($("input:radio[value='10016018']").is(":checked"))
			{
				$("#how_many_years_caregiver4").show("fast");
				$("#how_many_years_patient4").hide("fast");
				//$.hide_Patient_Questions();
			}
        }
        else
        {       
            //otherwise, hide it 
            $("#Rituxan").hide("fast");
            $("input:radio[name='how_long_rituxan']").attr("disabled", "disabled");
            
            //checking conditions for dynamic questions display
            //$.show_Hide_Questions();
            
            //enable other checkboxes
            $("input:checkbox[name='checkbox_Remicade']").removeAttr("disabled");
            $("input:checkbox[name='checkbox_Orencia']").removeAttr("disabled");
            $("input:checkbox[name='checkbox_Actemra']").removeAttr("disabled");
        }
        //checking conditions for dynamic questions enable/disable
        //$.en_disDynamicQuestions(true);
     });
             
        // If checked
        if ($("input:checkbox[name='checkbox_Rituxan']").is(":checked"))
        {
            //show the hidden div
            $("#Rituxan").show("fast");
            $("input:radio[name='how_long_rituxan']").removeAttr("disabled");

              $("input:checkbox[name='checkbox_Remicade']").attr("disabled", "disabled");
              $("input:checkbox[name='checkbox_Orencia']").attr("disabled", "disabled");
              $("input:checkbox[name='checkbox_Actemra']").attr("disabled", "disabled");

			if ($("input:radio[value='10016015']").is(":checked"))
			{
				$("#how_many_years_caregiver4").hide("fast");
				$("#how_many_years_patient4").show("fast");
			}
			if($("input:radio[value='10016018']").is(":checked"))
			{
				$("#how_many_years_caregiver4").show("fast");
				$("#how_many_years_patient4").hide("fast");
			}
        }
        else
        {       
            //otherwise, hide it 
            $("#Rituxan").hide("fast");
            $("input:radio[name='how_long_rituxan']").attr("disabled", "disabled");
        }
        
        $("input:checkbox[name='checkbox_Actemra']").click(function(){
        // If checked
        if ($("input:checkbox[name='checkbox_Actemra']").is(":checked"))
        {
            //show the hidden div
            $("#Actemra").show("fast");
            $("input:radio[name='how_long_actemra']").removeAttr("disabled");

              $("input:checkbox[name='checkbox_Remicade']").attr("disabled", "disabled");
              $("input:checkbox[name='checkbox_Orencia']").attr("disabled", "disabled");
              $("input:checkbox[name='checkbox_Rituxan']").attr("disabled", "disabled");

			if ($("input:radio[value='10016015']").is(":checked"))
			{
				$("#how_many_years_caregiver19").hide("fast");
				$("#how_many_years_patient19").show("fast");
				//$.hide_Caregiver_Questions();     
			}
			if($("input:radio[value='10016018']").is(":checked"))
			{
				$("#how_many_years_caregiver19").show("fast");
				$("#how_many_years_patient19").hide("fast");
				//$.hide_Patient_Questions();
			}
        }
        else
        {       
            //otherwise, hide it 
            $("#Actemra").hide("fast");
            $("input:radio[name='how_long_actemra']").attr("disabled", "disabled");
            
            //checking conditions for dynamic questions display
            //$.show_Hide_Questions();
            
            //enable other checkboxes
            $("input:checkbox[name='checkbox_Remicade']").removeAttr("disabled");
            $("input:checkbox[name='checkbox_Orencia']").removeAttr("disabled");
            $("input:checkbox[name='checkbox_Rituxan']").removeAttr("disabled");
        }
        
        //checking conditions for dynamic questions enable/disable
        //$.en_disDynamicQuestions(true);
     });
             
        // If checked
        if ($("input:checkbox[name='checkbox_Actemra']").is(":checked"))
        {
            //show the hidden div
            $("#Actemra").show("fast");
            $("input:radio[name='how_long_actemra']").removeAttr("disabled");

              $("input:checkbox[name='checkbox_Remicade']").attr("disabled", "disabled");
              $("input:checkbox[name='checkbox_Orencia']").attr("disabled", "disabled");
              $("input:checkbox[name='checkbox_Rituxan']").attr("disabled", "disabled");


			if ($("input:radio[value='10016015']").is(":checked"))
			{
				$("#how_many_years_caregiver19").hide("fast");
				$("#how_many_years_patient19").show("fast");
			}
			if($("input:radio[value='10016018']").is(":checked"))
			{
				$("#how_many_years_caregiver19").show("fast");
				$("#how_many_years_patient19").hide("fast");
			}
        }
        else
        {       
            //otherwise, hide it 
            $("#Actemra").hide("fast");
            $("input:radio[name='how_long_actemra']").attr("disabled", "disabled");
        }

        //INJECTION BIOLOGIC
         $("input:checkbox[name='checkbox_Cimzia']").click(function(){
        // If checked
        if ($("input:checkbox[name='checkbox_Cimzia']").is(":checked"))
        {
            //show the hidden div
            $("#Cimzia").show("fast");
            $("input:radio[name='how_long_cimzia']").removeAttr("disabled");

            $("input:checkbox[name='checkbox_Enbrel']").attr("disabled", "disabled");
            $("input:checkbox[name='checkbox_Humira']").attr("disabled", "disabled");
            $("input:checkbox[name='checkbox_Simponi']").attr("disabled", "disabled");
            $("input:checkbox[name='checkbox_Kineret']").attr("disabled", "disabled");

			if ($("input:radio[value='10016015']").is(":checked"))
			{
				$("#how_many_years_caregiver5").hide("fast");
				$("#how_many_years_patient5").show("fast");
				//$.hide_Caregiver_Questions();
			}
			if($("input:radio[value='10016018']").is(":checked"))
			{
				$("#how_many_years_caregiver5").show("fast");
				$("#how_many_years_patient5").hide("fast");
				//$.hide_Patient_Questions();
			}
		}
        else
        {       
            //otherwise, hide it 
            $("#Cimzia").hide("fast");
            $("input:radio[name='how_long_cimzia']").attr("disabled", "disabled");
            
            //checking conditions for dynamic questions display
            //$.show_Hide_Questions();
            
            //enable checkboxes
            $("input:checkbox[name='checkbox_Enbrel']").removeAttr("disabled");
            $("input:checkbox[name='checkbox_Humira']").removeAttr("disabled");
            $("input:checkbox[name='checkbox_Simponi']").removeAttr("disabled");
            $("input:checkbox[name='checkbox_Kineret']").removeAttr("disabled");
        }
        
        //checking conditions for dynamic questions enable/disable
        //$.en_disDynamicQuestions(true);
     });
            
        // If checked
        if ($("input:checkbox[name='checkbox_Cimzia']").is(":checked"))
        {
            //show the hidden div
            $("#Cimzia").show("fast");
            $("input:radio[name='how_long_cimzia']").removeAttr("disabled");
            
            $("input:checkbox[name='checkbox_Enbrel']").attr("disabled", "disabled");
            $("input:checkbox[name='checkbox_Humira']").attr("disabled", "disabled");
            $("input:checkbox[name='checkbox_Simponi']").attr("disabled", "disabled");
            $("input:checkbox[name='checkbox_Kineret']").attr("disabled", "disabled");

			if ($("input:radio[value='10016015']").is(":checked"))
			{
				$("#how_many_years_caregiver5").hide("fast");
				$("#how_many_years_patient5").show("fast");
			}
			if($("input:radio[value='10016018']").is(":checked"))
			{
				$("#how_many_years_caregiver5").show("fast");
				$("#how_many_years_patient5").hide("fast");
			}
        }
        else
        {       
            //otherwise, hide it 
            $("#Cimzia").hide("fast");
            $("input:radio[name='how_long_cimzia']").attr("disabled", "disabled");

        }
         
      $("input:checkbox[name='checkbox_Enbrel']").click(function(){
        // If checked
        if ($("input:checkbox[name='checkbox_Enbrel']").is(":checked"))
        {
            //show the hidden div
            $("#Enbrel").show("fast");
            $("input:radio[name='how_long_enbrel']").removeAttr("disabled");

            $("input:checkbox[name='checkbox_Cimzia']").attr("disabled", "disabled");
            $("input:checkbox[name='checkbox_Humira']").attr("disabled", "disabled");
            $("input:checkbox[name='checkbox_Simponi']").attr("disabled", "disabled");
            $("input:checkbox[name='checkbox_Kineret']").attr("disabled", "disabled");
			
			if ($("input:radio[value='10016015']").is(":checked"))
			{
				$("#how_many_years_caregiver6").hide("fast");
				$("#how_many_years_patient6").show("fast");
				//$.hide_Caregiver_Questions();
			}
			if($("input:radio[value='10016018']").is(":checked"))
			{
				$("#how_many_years_caregiver6").show("fast");
				$("#how_many_years_patient6").hide("fast");
				//$.hide_Patient_Questions();
			}
        }
        else
        {       
            //otherwise, hide it 
            $("#Enbrel").hide("fast");
            $("input:radio[name='how_long_enbrel']").attr("disabled", "disabled");
            
            //checking conditions for dynamic questions display
            //$.show_Hide_Questions();
            
            //enable checkboxes
            $("input:checkbox[name='checkbox_Cimzia']").removeAttr("disabled");
            $("input:checkbox[name='checkbox_Humira']").removeAttr("disabled");
            $("input:checkbox[name='checkbox_Simponi']").removeAttr("disabled");
            $("input:checkbox[name='checkbox_Kineret']").removeAttr("disabled");
        }
        //checking conditions for dynamic questions enable/disable
        //$.en_disDynamicQuestions(true);
     });
            
        // If checked
        if ($("input:checkbox[name='checkbox_Enbrel']").is(":checked"))
        {
            //show the hidden div
            $("#Enbrel").show("fast");
            $("input:radio[name='how_long_enbrel']").removeAttr("disabled");

            $("input:checkbox[name='checkbox_Cimzia']").attr("disabled", "disabled");
            $("input:checkbox[name='checkbox_Humira']").attr("disabled", "disabled");
            $("input:checkbox[name='checkbox_Simponi']").attr("disabled", "disabled");
            $("input:checkbox[name='checkbox_Kineret']").attr("disabled", "disabled");

			if ($("input:radio[value='10016015']").is(":checked"))
			{
				$("#how_many_years_caregiver6").hide("fast");
				$("#how_many_years_patient6").show("fast");
			}
			if($("input:radio[value='10016018']").is(":checked"))
			{
				$("#how_many_years_caregiver6").show("fast");
				$("#how_many_years_patient6").hide("fast");
			}
        }
        else
        {       
            //otherwise, hide it 
            $("#Enbrel").hide("fast");
            $("input:radio[name='how_long_enbrel']").attr("disabled", "disabled");

        }
         
      $("input:checkbox[name='checkbox_Humira']").click(function(){
        // If checked
        if ($("input:checkbox[name='checkbox_Humira']").is(":checked"))
        {
            //show the hidden div
            $("#Humira").show("fast");
            $("input:radio[name='how_long_humira']").removeAttr("disabled");

            $("input:checkbox[name='checkbox_Cimzia']").attr("disabled", "disabled");
            $("input:checkbox[name='checkbox_Enbrel']").attr("disabled", "disabled");
            $("input:checkbox[name='checkbox_Simponi']").attr("disabled", "disabled");
            $("input:checkbox[name='checkbox_Kineret']").attr("disabled", "disabled");

			if ($("input:radio[value='10016015']").is(":checked"))
			{
				$("#how_many_years_caregiver7").hide("fast");
				$("#how_many_years_patient7").show("fast");
				//$.hide_Caregiver_Questions();
			}
			if($("input:radio[value='10016018']").is(":checked"))
			{
				$("#how_many_years_caregiver7").show("fast");
				$("#how_many_years_patient7").hide("fast");
				//$.hide_Patient_Questions();
			}
        }
        else
        {       
            //otherwise, hide it 
            $("#Humira").hide("fast");
            $("input:radio[name='how_long_humira']").attr("disabled", "disabled");
            
            //checking conditions for dynamic questions display
            //$.show_Hide_Questions();
            
            //enable checkboxes
            $("input:checkbox[name='checkbox_Cimzia']").removeAttr("disabled");
            $("input:checkbox[name='checkbox_Enbrel']").removeAttr("disabled");
            $("input:checkbox[name='checkbox_Simponi']").removeAttr("disabled");
            $("input:checkbox[name='checkbox_Kineret']").removeAttr("disabled");
        }
        
        //checking conditions for dynamic questions enable/disable
        //$.en_disDynamicQuestions(true);
     });
             
        // If checked
        if ($("input:checkbox[name='checkbox_Humira']").is(":checked"))
        {
            //show the hidden div
            $("#Humira").show("fast");
            $("input:radio[name='how_long_humira']").removeAttr("disabled");

            $("input:checkbox[name='checkbox_Cimzia']").attr("disabled", "disabled");
            $("input:checkbox[name='checkbox_Enbrel']").attr("disabled", "disabled");
            $("input:checkbox[name='checkbox_Simponi']").attr("disabled", "disabled");
            $("input:checkbox[name='checkbox_Kineret']").attr("disabled", "disabled");

			if ($("input:radio[value='10016015']").is(":checked"))
			{
				$("#how_many_years_caregiver7").hide("fast");
				$("#how_many_years_patient7").show("fast");
			}
			if($("input:radio[value='10016018']").is(":checked"))
			{
				$("#how_many_years_caregiver7").show("fast");
				$("#how_many_years_patient7").hide("fast");
			}
        }
        else
        {       
            //otherwise, hide it 
            $("#Humira").hide("fast");
            $("input:radio[name='how_long_humira']").attr("disabled", "disabled");
        }

      $("input:checkbox[name='checkbox_Simponi']").click(function(){
        // If checked
        if ($("input:checkbox[name='checkbox_Simponi']").is(":checked"))
        {
            //show the hidden div
            $("#Simponi").show("fast");
            $("input:radio[name='how_long_simponi']").removeAttr("disabled");

            $("input:checkbox[name='checkbox_Cimzia']").attr("disabled", "disabled");
            $("input:checkbox[name='checkbox_Enbrel']").attr("disabled", "disabled");
            $("input:checkbox[name='checkbox_Humira']").attr("disabled", "disabled");
            $("input:checkbox[name='checkbox_Kineret']").attr("disabled", "disabled");

			if ($("input:radio[value='10016015']").is(":checked"))
			{
				$("#how_many_years_caregiver10").hide("fast");
				$("#how_many_years_patient10").show("fast");
				//$.hide_Caregiver_Questions();
			}
			if($("input:radio[value='10016018']").is(":checked"))
			{
				$("#how_many_years_caregiver10").show("fast");
				$("#how_many_years_patient10").hide("fast");
				//$.hide_Patient_Questions();
			}
        }
        else
        {       
            //otherwise, hide it 
            $("#Simponi").hide("fast");
            $("input:radio[name='how_long_simponi']").attr("disabled", "disabled");
            
            //checking conditions for dynamic questions display
            //$.show_Hide_Questions();
            
            //enable checkboxes
            $("input:checkbox[name='checkbox_Cimzia']").removeAttr("disabled");
            $("input:checkbox[name='checkbox_Enbrel']").removeAttr("disabled");
            $("input:checkbox[name='checkbox_Humira']").removeAttr("disabled");
            $("input:checkbox[name='checkbox_Kineret']").removeAttr("disabled");
        }
        //checking conditions for dynamic questions enable/disable
        //$.en_disDynamicQuestions(true);
     });
        
        // If checked
        if ($("input:checkbox[name='checkbox_Simponi']").is(":checked"))
        {
            //show the hidden div
            $("#Simponi").show("fast");
            $("input:radio[name='how_long_simponi']").removeAttr("disabled");

            $("input:checkbox[name='checkbox_Cimzia']").attr("disabled", "disabled");
            $("input:checkbox[name='checkbox_Enbrel']").attr("disabled", "disabled");
            $("input:checkbox[name='checkbox_Humira']").attr("disabled", "disabled");
            $("input:checkbox[name='checkbox_Kineret']").attr("disabled", "disabled");

			if ($("input:radio[value='10016015']").is(":checked"))
			{
				$("#how_many_years_caregiver10").hide("fast");
				$("#how_many_years_patient10").show("fast");
				$("#physician_type").show("fast");
				$("#q2_caregiver").hide("fast");
			}
			if($("input:radio[value='10016018']").is(":checked"))
			{
				$("#how_many_years_caregiver10").show("fast");
				$("#how_many_years_patient10").hide("fast");
				$("#physician_type").show("fast");
				$("#q2_patient").hide("fast");
			}
        }
        else
        {       
            //otherwise, hide it 
            $("#Simponi").hide("fast");
            $("input:radio[name='how_long_simponi']").attr("disabled", "disabled");
        }

      $("input:checkbox[name='checkbox_Kineret']").click(function(){
        // If checked
        if ($("input:checkbox[name='checkbox_Kineret']").is(":checked"))
        {
            //show the hidden div
            $("#Kineret").show("fast");
            $("input:radio[name='how_long_kineret']").removeAttr("disabled");

            $("input:checkbox[name='checkbox_Cimzia']").attr("disabled", "disabled");
            $("input:checkbox[name='checkbox_Enbrel']").attr("disabled", "disabled");
            $("input:checkbox[name='checkbox_Humira']").attr("disabled", "disabled");
            $("input:checkbox[name='checkbox_Simponi']").attr("disabled", "disabled");

			if ($("input:radio[value='10016015']").is(":checked"))
			{
				$("#how_many_years_caregiver8").hide("fast");
				$("#how_many_years_patient8").show("fast");
				//$.hide_Caregiver_Questions();
			}
			if($("input:radio[value='10016018']").is(":checked"))
			{
				$("#how_many_years_caregiver8").show("fast");
				$("#how_many_years_patient8").hide("fast");
				//$.hide_Patient_Questions();
			}
        }
        else
        {       
            //otherwise, hide it 
            $("#Kineret").hide("fast");
            $("input:radio[name='how_long_kineret']").attr("disabled", "disabled");
            
            //checking conditions for dynamic questions display
            //$.show_Hide_Questions();
            
            //enable checkboxes
            $("input:checkbox[name='checkbox_Cimzia']").removeAttr("disabled");
            $("input:checkbox[name='checkbox_Enbrel']").removeAttr("disabled");
            $("input:checkbox[name='checkbox_Humira']").removeAttr("disabled");
            $("input:checkbox[name='checkbox_Simponi']").removeAttr("disabled");
        }
        //checking conditions for dynamic questions enable/disable
        //$.en_disDynamicQuestions(true);
     });
        
        // If checked
        if ($("input:checkbox[name='checkbox_Kineret']").is(":checked"))
        {
            //show the hidden div
            $("#Kineret").show("fast");
            $("input:radio[name='how_long_kineret']").removeAttr("disabled");

            $("input:checkbox[name='checkbox_Cimzia']").attr("disabled", "disabled");
            $("input:checkbox[name='checkbox_Enbrel']").attr("disabled", "disabled");
            $("input:checkbox[name='checkbox_Humira']").attr("disabled", "disabled");
            $("input:checkbox[name='checkbox_Simponi']").attr("disabled", "disabled");

			if ($("input:radio[value='10016015']").is(":checked"))
			{
				$("#how_many_years_caregiver8").hide("fast");
				$("#how_many_years_patient8").show("fast");
			}
			if($("input:radio[value='10016018']").is(":checked"))
			{
				$("#how_many_years_caregiver8").show("fast");
				$("#how_many_years_patient8").hide("fast");
			}
        }
        else
        {       
            //otherwise, hide it 
            $("#Kineret").hide("fast");
            $("input:radio[name='how_long_kineret']").attr("disabled", "disabled");
		}
        
      $("input:checkbox[name='checkbox_Methotrexate2']").click(function(){
        // If checked
        if ($("input:checkbox[name='checkbox_Methotrexate2']").is(":checked"))
        {
            //show the hidden div
            $("#Methotrexate2").show("fast");
            $("input:radio[name='how_long_methotrexate2']").removeAttr("disabled");

			if ($("input:radio[value='10016015']").is(":checked"))
			{
				$("#how_many_years_caregiver9").hide("fast");
				$("#how_many_years_patient9").show("fast");
				//$.hide_Caregiver_Questions();
			}
			if($("input:radio[value='10016018']").is(":checked"))
			{
				$("#how_many_years_caregiver9").show("fast");
				$("#how_many_years_patient9").hide("fast");
				//$.hide_Patient_Questions();
			}
        }
        else
        {       
            //otherwise, hide it 
            $("#Methotrexate2").hide("fast");
            $("input:radio[name='how_long_methotrexate2']").attr("disabled", "disabled");
            
            //checking conditions for dynamic questions display
            //$.show_Hide_Questions();
        }
        //checking conditions for dynamic questions enable/disable
        //$.en_disDynamicQuestions(true);
     });
        
        // If checked
        if ($("input:checkbox[name='checkbox_Methotrexate2']").is(":checked"))
        {
            //show the hidden div
            $("#Methotrexate2").show("fast");
            $("input:radio[name='how_long_methotrexate2']").removeAttr("disabled");

			if ($("input:radio[value='10016015']").is(":checked"))
			{
				$("#how_many_years_caregiver9").hide("fast");
				$("#how_many_years_patient9").show("fast");
			}
			if($("input:radio[value='10016018']").is(":checked"))
			{
				$("#how_many_years_caregiver9").show("fast");
				$("#how_many_years_patient9").hide("fast");
			}
        }
        else
        {       
            //otherwise, hide it 
            $("#Methotrexate2").hide("fast");
            $("input:radio[name='how_long_methotrexate2']").attr("disabled", "disabled");
        }
             
    /* could not find checkbox_Prednisone element on the page. Keeping it as is. */
      $("#checkbox_Prednisone").click(function(){
        
        // If checked
        if ($("#checkbox_Prednisone").is(":checked"))
        {
            //show the hidden div
            $("#Prednisone").show("fast");
        }
        else
        {       
            //otherwise, hide it 
            $("#Prednisone").hide("fast");
        }
        
     });
         
        // If checked
        if ($("#checkbox_Prednisone").is(":checked"))
        {
            //show the hidden div
            $("#Prednisone").show("fast");
        }
        else
        {       
            //otherwise, hide it 
            $("#Prednisone").hide("fast");
        }
        
     $("input:checkbox[name='checkbox_Arava']").click(function(){
        // If checked
        if ($("input:checkbox[name='checkbox_Arava']").is(":checked"))
        {
            //show the hidden div
            $("#Arava").show("fast");
            $("input:radio[name='how_long_arava']").removeAttr("disabled");

			if ($("input:radio[value='10016015']").is(":checked"))
			{
				$("#how_many_years_caregiver12").hide("fast");
				$("#how_many_years_patient12").show("fast");
				//$.hide_Caregiver_Questions();
			}
			if($("input:radio[value='10016018']").is(":checked"))
			{
				$("#how_many_years_caregiver12").show("fast");
				$("#how_many_years_patient12").hide("fast");
				//$.hide_Patient_Questions();
			}
        }
        else
        {       
            //otherwise, hide it 
            $("#Arava").hide("fast");
            $("input:radio[name='how_long_arava']").attr("disabled", "disabled");
            //$.show_Hide_Questions();
        }
        //checking conditions for dynamic questions enable/disable
        //$.en_disDynamicQuestions(true);
     });
         
        // If checked
        if ($("input:checkbox[name='checkbox_Arava']").is(":checked"))
        {
            //show the hidden div
            $("#Arava").show("fast");
            $("input:radio[name='how_long_arava']").removeAttr("disabled");

			if ($("input:radio[value='10016015']").is(":checked"))
			{
				$("#how_many_years_caregiver12").hide("fast");
				$("#how_many_years_patient12").show("fast");
			}
			if($("input:radio[value='10016018']").is(":checked"))
			{
				$("#how_many_years_caregiver12").show("fast");
				$("#how_many_years_patient12").hide("fast");
			}
        }
        else
        {       
            //otherwise, hide it 
            $("#Arava").hide("fast");
            $("input:radio[name='how_long_arava']").attr("disabled", "disabled");
        }
        
      $("input:checkbox[name='checkbox_Azulfidine']").click(function(){
        // If checked
        if ($("input:checkbox[name='checkbox_Azulfidine']").is(":checked"))
        {
            //show the hidden div
            $("#Azulfidine").show("fast");
            $("input:radio[name='how_long_azulfidine']").removeAttr("disabled");
			
			if ($("input:radio[value='10016015']").is(":checked"))
			{
				$("#how_many_years_caregiver13").hide("fast");
				$("#how_many_years_patient13").show("fast");
				//$.hide_Caregiver_Questions();
			}
			if($("input:radio[value='10016018']").is(":checked"))
			{
				$("#how_many_years_caregiver13").show("fast");
				$("#how_many_years_patient13").hide("fast");
				//$.hide_Patient_Questions();
			}
        }
        else
        {       
            //otherwise, hide it 
            $("#Azulfidine").hide("fast");
            $("input:radio[name='how_long_azulfidine']").attr("disabled", "disabled");
            
            //checking conditions for dynamic questions display
            //$.show_Hide_Questions();
        }
        //checking conditions for dynamic questions enable/disable
        //$.en_disDynamicQuestions(true);
     });
     
        // If checked
        if ($("input:checkbox[name='checkbox_Azulfidine']").is(":checked"))
        {
            //show the hidden div
            $("#Azulfidine").show("fast");
            $("input:radio[name='how_long_azulfidine']").removeAttr("disabled");

			if ($("input:radio[value='10016015']").is(":checked"))
			{
				$("#how_many_years_caregiver13").hide("fast");
				$("#how_many_years_patient13").show("fast");
			}
			if($("input:radio[value='10016018']").is(":checked"))
			{
				$("#how_many_years_caregiver13").show("fast");
				$("#how_many_years_patient13").hide("fast");
			}
        }
        else
        {       
            //otherwise, hide it 
            $("#Azulfidine").hide("fast");
            $("input:radio[name='how_long_azulfidine']").attr("disabled", "disabled");
        }
        
      $("input:checkbox[name='checkbox_Methotrexate3']").click(function(){
        // If checked
        if ($("input:checkbox[name='checkbox_Methotrexate3']").is(":checked"))
        {
            //show the hidden div
            $("#Methotrexate3").show("fast");
            $("input:radio[name='how_long_methotrexate3']").removeAttr("disabled");

			if ($("input:radio[value='10016015']").is(":checked"))
			{
				$("#how_many_years_caregiver14").hide("fast");
				$("#how_many_years_patient14").show("fast");
				//$.hide_Caregiver_Questions();
			}
			if($("input:radio[value='10016018']").is(":checked"))
			{
				$("#how_many_years_caregiver14").show("fast");
				$("#how_many_years_patient14").hide("fast");
				//$.hide_Patient_Questions();
			}
        }
        else
        {       
            //otherwise, hide it 
            $("#Methotrexate3").hide("fast");
            $("input:radio[name='how_long_methotrexate3']").attr("disabled", "disabled");
            
            //checking conditions for dynamic questions display
            //$.show_Hide_Questions();
        }
        //checking conditions for dynamic questions enable/disable
        //$.en_disDynamicQuestions(true);
     });
         
        // If checked
        if ($("input:checkbox[name='checkbox_Methotrexate3']").is(":checked"))
        {
            //show the hidden div
            $("#Methotrexate3").show("fast");
            $("input:radio[name='how_long_methotrexate3']").removeAttr("disabled");

			if ($("input:radio[value='10016015']").is(":checked"))
			{
				$("#how_many_years_caregiver14").hide("fast");
				$("#how_many_years_patient14").show("fast");
			}
			if($("input:radio[value='10016018']").is(":checked"))
			{
				$("#how_many_years_caregiver14").show("fast");
				$("#how_many_years_patient14").hide("fast");
			}
        }
        else
        {       
            //otherwise, hide it 
            $("#Methotrexate3").hide("fast");
            $("input:radio[name='how_long_methotrexate3']").attr("disabled", "disabled");
        }
        
     $("input:checkbox[name='checkbox_Plaquenil']").click(function(){
        // If checked
        if ($("input:checkbox[name='checkbox_Plaquenil']").is(":checked"))
        {
            //show the hidden div
            $("#Plaquenil").show("fast");
            $("input:radio[name='how_long_plaquenil']").removeAttr("disabled");

			if ($("input:radio[value='10016015']").is(":checked"))
			{
				$("#how_many_years_caregiver15").hide("fast");
				$("#how_many_years_patient15").show("fast");
				//$.hide_Caregiver_Questions();
			}
			if($("input:radio[value='10016018']").is(":checked"))
			{
				$("#how_many_years_caregiver15").show("fast");
				$("#how_many_years_patient15").hide("fast");
				//$.hide_Patient_Questions();
			}
        }
        else
        {       
            //otherwise, hide it 
            $("#Plaquenil").hide("fast");
            $("input:radio[name='how_long_plaquenil']").attr("disabled", "disabled");
            
            //checking conditions for dynamic questions display
            //$.show_Hide_Questions();
        }
        //checking conditions for dynamic questions enable/disable
        //$.en_disDynamicQuestions(true);
     });
         
        // If checked
        if ($("input:checkbox[name='checkbox_Plaquenil']").is(":checked"))
        {
            //show the hidden div
            $("#Plaquenil").show("fast");
            $("input:radio[name='how_long_plaquenil']").removeAttr("disabled");

			if ($("input:radio[value='10016015']").is(":checked"))
			{
				$("#how_many_years_caregiver15").hide("fast");
				$("#how_many_years_patient15").show("fast");
			}
			if($("input:radio[value='10016018']").is(":checked"))
			{
				$("#how_many_years_caregiver15").show("fast");
				$("#how_many_years_patient15").hide("fast");
			}
        }
        else
        {       
            //otherwise, hide it 
            $("#Plaquenil").hide("fast");
            $("input:radio[name='how_long_plaquenil']").attr("disabled", "disabled");
        }
        
      $("input:checkbox[name='checkbox_Ridaura']").click(function(){
        // If checked
        if ($("input:checkbox[name='checkbox_Ridaura']").is(":checked"))
        {
            //show the hidden div
            $("#Ridaura").show("fast");
            $("input:radio[name='how_long_ridaura']").removeAttr("disabled");

			if ($("input:radio[value='10016015']").is(":checked"))
			{
				$("#how_many_years_caregiver16").hide("fast");
				$("#how_many_years_patient16").show("fast");
				//$.hide_Caregiver_Questions();
			}
			if($("input:radio[value='10016018']").is(":checked"))
			{
				$("#how_many_years_caregiver16").show("fast");
				$("#how_many_years_patient16").hide("fast");
				//$.hide_Patient_Questions();
			}
        }
        else
        {       
            //otherwise, hide it 
            $("#Ridaura").hide("fast");
            $("input:radio[name='how_long_ridaura']").attr("disabled", "disabled");
            
            //checking conditions for dynamic questions display
            //$.show_Hide_Questions();
        }
        //checking conditions for dynamic questions enable/disable
        //$.en_disDynamicQuestions(true);
     });
             
        // If checked
        if ($("input:checkbox[name='checkbox_Ridaura']").is(":checked"))
        {
            //show the hidden div
            $("#Ridaura").show("fast");
            $("input:radio[name='how_long_ridaura']").removeAttr("disabled");

			if ($("input:radio[value='10016015']").is(":checked"))
			{
				$("#how_many_years_caregiver16").hide("fast");
				$("#how_many_years_patient16").show("fast");
			}
			if($("input:radio[value='10016018']").is(":checked"))
			{
				$("#how_many_years_caregiver16").show("fast");
				$("#how_many_years_patient16").hide("fast");
			}
        }
        else
        {       
            //otherwise, hide it 
            $("#Ridaura").hide("fast");
            $("input:radio[name='how_long_ridaura']").attr("disabled", "disabled");
        }
        
        /* could not find checkbox_Prednisone2 element on the page. Keeping it as is. */
       $("#checkbox_Prednisone2").click(function(){
        
        // If checked
        if ($("#checkbox_Prednisone2").is(":checked"))
        {
            //show the hidden div
            $("#Prednisone2").show("fast");
        }
        else
        {       
            //otherwise, hide it 
            $("#Prednisone2").hide("fast");
        }
        
     });
             
        // If checked
        if ($("#checkbox_Prednisone2").is(":checked"))
        {
            //show the hidden div
            $("#Prednisone2").show("fast");
        }
        else
        {       
            //otherwise, hide it 
            $("#Prednisone2").hide("fast");
        }
        
     $("input:checkbox[name='otc_nonpresc']").click(function(){
        // If checked
        if ($("input:checkbox[name='otc_nonpresc']").is(":checked"))
        {
            //show the hidden div
            $("#Over_the_counter").show("fast");
            $("input:radio[name='how_long_over_the_counter']").removeAttr("disabled");

			if ($("input:radio[value='10016015']").is(":checked"))
			{
				$("#how_many_years_caregiver18").hide("fast");
				$("#how_many_years_patient18").show("fast");
				//$.hide_Caregiver_Questions();
			}
			if($("input:radio[value='10016018']").is(":checked"))
			{
				$("#how_many_years_caregiver18").show("fast");
				$("#how_many_years_patient18").hide("fast");
				//$.hide_Patient_Questions();
			}
        }
        else
        {       
            //otherwise, hide it 
            $("#Over_the_counter").hide("fast");
            $("input:radio[name='how_long_over_the_counter']").attr("disabled", "disabled");
            
            //checking conditions for dynamic questions display
            //$.show_Hide_Questions();
        }
        
        //checking conditions for dynamic questions enable/disable
        //$.en_disDynamicQuestions(true);
     });    
     
        // If checked
        if ($("input:checkbox[name='otc_nonpresc']").is(":checked"))
        {
            //show the hidden div
            $("#Over_the_counter").show("fast");
            $("input:radio[name='how_long_over_the_counter']").removeAttr("disabled");

			if ($("input:radio[value='10016015']").is(":checked"))
			{
				$("#how_many_years_caregiver18").hide("fast");
				$("#how_many_years_patient18").show("fast");
			}
			if($("input:radio[value='10016018']").is(":checked"))
			{
				$("#how_many_years_caregiver18").show("fast");
				$("#how_many_years_patient18").hide("fast");
			}
        }
        else
        {       
            //otherwise, hide it 
            $("#Over_the_counter").hide("fast");
            $("input:radio[name='how_long_over_the_counter']").attr("disabled", "disabled");
        }
        
        $("input:radio[name='orencia_infusion_date']").click(function(){
         if ($("input:radio[value='10006019']").is(":checked") || $("input:radio[value='30004645']").is(":checked"))
         {
            $("#orencia_calendar").show("fast");
            document.getElementById("datepicker").disabled = false;
            document.getElementById("datepicker<15008959,OPEN>").disabled = false;
         }
         else
        {
            $("#orencia_calendar").hide("fast");
            document.getElementById("datepicker").disabled = true;
            document.getElementById("datepicker<15008959,OPEN>").disabled = true;
        }
    });
    
    $("input:radio[name='doctor_discussed']").click(function(){
        $.display_Medications();
    });
    
    $("input:checkbox[name='checkbox_tasks']").click(function(){
         var tasks_count = 0;
         var opening_jar = document.getElementById("check-opening-a-jar<15008958,10001002>");
         var turning_key = document.getElementById("check-turning-a-key<15008956,10001002>");
         var bending_down = document.getElementById("check-bending-down<15008964,10001002>");
         var fastening_button = document.getElementById("check-fastening-a-button<15008968,10001002>");
         var brushing_teeth = document.getElementById("check-brushing-teeth<15008946,10001002>");
         var using_knife = document.getElementById("check-using-a-knife<15008947,10001002>");
         var climbing_stars = document.getElementById("check-climbing-stairs<15008969,10001002>");
         var getting_outof_bed = document.getElementById("check-getting-out-of-bed<15008967,10001002>");
         var lifting = document.getElementById("check-lifting<15008966,10001002>");
         var shaving = document.getElementById("check-shaving<15008957,10001002>");
         var dont_find_any = document.getElementById("check-i-do-not-find<15008965,10001002>");
         
         if(dont_find_any.checked)
         {
            opening_jar.disabled = true;
            turning_key.disabled = true;
            bending_down.disabled = true;
            fastening_button.disabled = true;
            fastening_button.disabled = true;
            brushing_teeth.disabled = true;
            using_knife.disabled = true;
            climbing_stars.disabled = true;
            getting_outof_bed.disabled = true;
            lifting.disabled = true;
            shaving.disabled = true;
         }
         else
         {
            opening_jar.disabled = false;
            turning_key.disabled = false;
            bending_down.disabled = false;
            fastening_button.disabled = false;
            fastening_button.disabled = false;
            brushing_teeth.disabled = false;
            using_knife.disabled = false;
            climbing_stars.disabled = false;
            getting_outof_bed.disabled = false;
            lifting.disabled = false;
            shaving.disabled = false;
         }
         
         if(!dont_find_any.checked)
         {
             for (i = 0; i < document.forms[0].checkbox_tasks.length; i++)
             {
                    
                    if (document.forms[0].checkbox_tasks[i].checked)
                    {
                            dont_find_any.disabled = true;
                            tasks_count++;
                    }
             }
            if(tasks_count >= 3)
            {
                for (i = 0; i < document.forms[0].checkbox_tasks.length; i++)
                {
                    if(!document.forms[0].checkbox_tasks[i].checked)
                    {
                      document.forms[0].checkbox_tasks[i].disabled = true;
                    }
                }
            }
         }
         if(tasks_count == 0)
         {
            dont_find_any.disabled = false;
         }

    });
    
    $("input:checkbox[name='medications_ra']").click(function(){
         var actemra = document.getElementById("check-actemra<15008943,10001002>");
         var orencia = document.getElementById("check-orencia<15008953,10001002>");
         var cimzia = document.getElementById("check-cimzia<15008948,10001002>");
         var remicade = document.getElementById("check-remicade<15008952,10001002>");
         var enbrel = document.getElementById("check-enbrel<15008949,10001002>");
         var rituxan = document.getElementById("check-rituxan<15008951,10001002>");
         var humira = document.getElementById("check-humira<15008950,10001002>");
         var simponi = document.getElementById("check-simponi<15008970,10001002>");
         var kineret = document.getElementById("check-kineret<15008955,10001002>");
         var none = document.getElementById("check-none-at-this-time<15008954,10001002>");
         
         if(none.checked)
         {
            actemra.disabled = true;
            orencia.disabled = true;
            cimzia.disabled = true;
            remicade.disabled = true;
            enbrel.disabled = true;
            rituxan.disabled = true;
            humira.disabled = true;
            simponi.disabled = true;
            kineret.disabled = true;
         }
         else
         {
            actemra.disabled = false;
            orencia.disabled = false;
            cimzia.disabled = false;
            remicade.disabled = false;
            enbrel.disabled = false;
            rituxan.disabled = false;
            humira.disabled = false;
            simponi.disabled = false;
            kineret.disabled = false;
            
            var none_enable = true;
            
            for (i = 0; i < document.forms[0].medications_ra.length; i++)
             {
                    
                    if (document.forms[0].medications_ra[i].checked)
                    {
                            none.disabled = true;
                            none_enable = false;
                            break;
                            
                    }
             }
             
             if(none_enable)
             {
                none.disabled = false;
             }
         }
         
    });
    
});
        
        
(function ($)
{
    //function added for enable/disable dynamic questions
    $.en_disDynamicQuestions=function en_disDynamicQuestions(bEnable){
    if(bEnable)
    {
        var infcheck = $("input:checkbox[name='infusion']").is(":checked");
        var injcheck = $("input:checkbox[name='injection']").is(":checked");
        var oralcheck = $("input:checkbox[name='oral']").is(":checked");
        var orencia = $("input:checkbox[name='checkbox_Orencia']").is(":checked");
        var disable = true;  
                
        if(infcheck || injcheck || oralcheck)
        {
            disable = false;
        }
        
        if(infcheck && orencia)
        {
            disable = true;
        }
           
       //disable the dynamic entries if no admin questions are chosen  
       if(disable)
       {
            document.getElementById("physician-type<10002329,ID>").disabled = true;
            document.getElementById("physician-name").disabled = true;
            $("input:checkbox[name='checkbox_tasks']").attr("disabled", "disabled");
            $("input:radio[name='how_satisfied']").attr("disabled", "disabled");
            $("input:radio[name='doctor_discussed']").attr("disabled", "disabled");
            $("input:checkbox[name='medications_ra']").attr("disabled", "disabled");
            $("input:radio[name='next_appt_ra']").attr("disabled", "disabled");
            if(infcheck && orencia)
            {
                $("input:radio[name='orencia_infusion_date']").removeAttr("disabled");
            }
            else
            {  
                $("input:radio[name='orencia_infusion_date']").attr("disabled", "disabled"); 
            }
       }
       else
       {
            document.getElementById("physician-type<10002329,ID>").disabled = false;
            //document.getElementById("physician-name").disabled = false;
            $("input:checkbox[name='checkbox_tasks']").removeAttr("disabled");
            $("input:radio[name='how_satisfied']").removeAttr("disabled");
            $("input:radio[name='doctor_discussed']").removeAttr("disabled");
            if (document.getElementById("doctor-discussed-yes<15008962,10001001>").checked)
            {
                $("input:checkbox[name='medications_ra']").removeAttr("disabled");
                $("input:radio[name='next_appt_ra']").removeAttr("disabled");
            }
       }   
    }
    else
    {
        //onload of the page disable all dynamic entries
        document.getElementById("physician-type<10002329,ID>").disabled = true;
        document.getElementById("physician-name").disabled = true;
        document.getElementById("datepicker").disabled = true;
        document.getElementById("datepicker<15008959,OPEN>").disabled = true;
        $("input:checkbox[name='checkbox_tasks']").attr("disabled", "disabled");
        $("input:radio[name='how_satisfied']").attr("disabled", "disabled");
        $("input:radio[name='doctor_discussed']").attr("disabled", "disabled");
        $("input:checkbox[name='medications_ra']").attr("disabled", "disabled");
        $("input:radio[name='next_appt_ra']").attr("disabled", "disabled");
        $("input:radio[name='orencia_infusion_date']").attr("disabled", "disabled");
    }
    
    }
    //function ended
    
	$.en_disInfusion=function en_disInfusion(bEnable){
		if(bEnable) 
		{
			$("input:checkbox[name='checkbox_Methotrexate']").attr("disabled", "disabled");
			$("input:checkbox[name='checkbox_Orencia']").attr("disabled", "disabled");
			$("input:checkbox[name='checkbox_Remicade']").attr("disabled", "disabled");
			$("input:checkbox[name='checkbox_Rituxan']").attr("disabled", "disabled");
			$("input:checkbox[name='checkbox_Actemra']").attr("disabled", "disabled");
			$("input:checkbox[name='infusion_dont_know']").attr("disabled", "disabled");
		}
		else
		{
		    $("input:checkbox[name='checkbox_Methotrexate']").removeAttr("disabled");
			$("input:checkbox[name='checkbox_Orencia']").removeAttr("disabled");
			$("input:checkbox[name='checkbox_Remicade']").removeAttr("disabled");
			$("input:checkbox[name='checkbox_Rituxan']").removeAttr("disabled");
			$("input:checkbox[name='checkbox_Actemra']").removeAttr("disabled");
			$("input:checkbox[name='infusion_dont_know']").removeAttr("disabled");
		}
	}
	
	$.en_disInjection=function(bEnable){		
		if(bEnable){
			
			$("input:checkbox[name='checkbox_Cimzia']").attr("disabled", "disabled");
			$("input:checkbox[name='checkbox_Enbrel']").attr("disabled", "disabled");
			$("input:checkbox[name='checkbox_Humira']").attr("disabled", "disabled");
			$("input:checkbox[name='checkbox_Kineret']").attr("disabled", "disabled");
			$("input:checkbox[name='checkbox_Methotrexate2']").attr("disabled", "disabled");
			$("input:checkbox[name='checkbox_Simponi']").attr("disabled", "disabled");
			$("input:checkbox[name='injection_dont_know']").attr("disabled", "disabled");
		}
		else
		{
		    $("input:checkbox[name='checkbox_Cimzia']").removeAttr("disabled");
			$("input:checkbox[name='checkbox_Enbrel']").removeAttr("disabled");
			$("input:checkbox[name='checkbox_Humira']").removeAttr("disabled");
			$("input:checkbox[name='checkbox_Kineret']").removeAttr("disabled");
			$("input:checkbox[name='checkbox_Methotrexate2']").removeAttr("disabled");
			$("input:checkbox[name='checkbox_Simponi']").removeAttr("disabled");
			$("input:checkbox[name='injection_dont_know']").removeAttr("disabled");
		}
	}
	
	$.en_disOral=function(bEnable){
		if(bEnable){
			
			$("input:checkbox[name='checkbox_Arava']").attr("disabled", "disabled");
			$("input:checkbox[name='checkbox_Azulfidine']").attr("disabled", "disabled");
			$("input:checkbox[name='checkbox_Methotrexate3']").attr("disabled", "disabled");
			$("input:checkbox[name='checkbox_Plaquenil']").attr("disabled", "disabled");
			$("input:checkbox[name='checkbox_Ridaura']").attr("disabled", "disabled");
			$("input:checkbox[name='otc_nonpresc']").attr("disabled", "disabled");
			//$("input:checkbox[name='check_oral_other']").attr("disabled", "disabled");
			$("input:checkbox[name='check_oral_dont_know']").attr("disabled", "disabled");
		}
		else
		{
		    $("input:checkbox[name='checkbox_Arava']").removeAttr("disabled");
			$("input:checkbox[name='checkbox_Azulfidine']").removeAttr("disabled");
			$("input:checkbox[name='checkbox_Methotrexate3']").removeAttr("disabled");
			$("input:checkbox[name='checkbox_Plaquenil']").removeAttr("disabled");
			$("input:checkbox[name='checkbox_Ridaura']").removeAttr("disabled");
			$("input:checkbox[name='otc_nonpresc']").removeAttr("disabled");
			//$("input:checkbox[name='check_oral_other']").removeAttr("disabled");
			$("input:checkbox[name='check_oral_dont_know']").removeAttr("disabled");
		}
	}
	$.show_Hide_Questions=function show_Hide_Questions(){
	var infcheck = $("input:checkbox[name='infusion']").is(":checked");
    var injcheck = $("input:checkbox[name='injection']").is(":checked");
    var oralcheck = $("input:checkbox[name='oral']").is(":checked");
    var orencia = $("input:checkbox[name='checkbox_Orencia']").is(":checked");
    var showHide = true;
            
    if(infcheck || injcheck || oralcheck)
    {
        showHide = false;
    }
    
    //hide additional questions when both orencia & infusion selected
    if(infcheck && orencia)
    {
        showHide = true;
    }
    
    if(showHide)
    {
        $("#physician_type").hide("fast");
        document.getElementById("physician-type<10002329,ID>").disabled = true;
        $("#physician_name").hide("fast");
        document.getElementById("physician-name").disabled = true;
        $("#tasks").hide("fast");
        $("#medications_considering").hide("fast");
    }
    else
    {
        if ($("input:radio[value='10016015']").is(":checked"))
        {
            $.hide_Caregiver_Questions();
        }
        if ($("input:radio[value='10016018']").is(":checked"))
        {
            $.hide_Patient_Questions();
        }
    }
    
    }
    
    $.hide_Caregiver_Questions=function hide_Caregiver_Questions(){
        
        $("#physician_type").show("fast");
        document.getElementById("physician-type<10002329,ID>").disabled = false;
        
        var physician = document.getElementById("physician-type<10002329,ID>");
        var physicianName = document.getElementById("physician-name");
        if(physician.options[physician.selectedIndex].text == "Rheumatologist")
        {
            physicianName.disabled = false;
            $("#physician_name").show("fast");
        }
        else
        {
            physicianName.disabled = true;
            $("#physician_name").hide("fast");
        }
        
        $("#q2_caregiver").hide("fast");
        $("#tasks").show("fast");
        $("#tasks_patient").show("fast");
        $("#tasks_caregiver").hide("fast");
        $("#satisfied_patient").show("fast");
        $("#satisfied_caregiver").hide("fast");
        $("#doctor_discussed_patient").show("fast");
        $("#doctor_discussed_caregiver").hide("fast");
        $("#task-do-not-find").html("&nbsp;I do not find any of these <span class='taskspadding'>tasks challenging</span>");
        //display medications
        $.display_Medications();
     }  
    
    $.hide_Patient_Questions=function hide_Patient_Questions(){
       
        $("#physician_type").show("fast");
        
        var physician = document.getElementById("physician-type<10002329,ID>");
        var physicianName = document.getElementById("physician-name");
        if(physician.options[physician.selectedIndex].text == "Rheumatologist")
        {
            physicianName.disabled = false;
            $("#physician_name").show("fast");
        }
        else
        {
            physicianName.disabled = true;
            $("#physician_name").hide("fast");
        }
        
	    $("#q2_patient").hide("fast");
	    $("#tasks").show("fast");
        $("#tasks_patient").hide("fast");
        $("#tasks_caregiver").show("fast");
        $("#satisfied_patient").hide("fast");
        $("#satisfied_caregiver").show("fast");
        $("#doctor_discussed_patient").hide("fast");
        $("#doctor_discussed_caregiver").show("fast");
        $("#task-do-not-find").html("&nbsp;The patient does not find any of these <span class='taskspadding'>tasks challenging</span>");
        //display medications
        $.display_Medications();
    }
	
	$.display_Medications=function display_Medications(){
	    if (document.getElementById("doctor-discussed-yes<15008962,10001001>").checked)
         {
                $("input:checkbox[name='medications_ra']").removeAttr("disabled");
                $("input:radio[name='next_appt_ra']").removeAttr("disabled");
                
                if($("input:radio[value='10016015']").is(":checked"))
                {
                    $("#medications_considering").show("fast");
                    $("#medications_considering_patient").show("fast");
                    $("#medications_considering_caregiver").hide("fast");
                    $("#next_appt_patient").show("fast");
                    $("#next_appt_caregiver").hide("fast");
                }
                
                if($("input:radio[value='10016018']").is(":checked"))
                {
                    $("#medications_considering").show("fast");
                    $("#medications_considering_patient").hide("fast");
                    $("#medications_considering_caregiver").show("fast");
                    $("#next_appt_patient").hide("fast");
                    $("#next_appt_caregiver").show("fast");
                }
          }
          else
          {
            $("#medications_considering").hide("fast");
            $("input:checkbox[name='medications_ra']").attr("disabled", "disabled");
            $("input:radio[name='next_appt_ra']").attr("disabled", "disabled");
          }
        
	}
}
)(jQuery);

function clearTextBox(p_tbName,p_value)
{
    if (document.getElementById(p_tbName).value == p_value)
    {
        document.getElementById(p_tbName).value = "";
    }
}

function resetTextBox(p_tbName,p_value)
{
    if (document.getElementById(p_tbName).value == "")
    {
        document.getElementById(p_tbName).value = p_value;
    }
}
