// javascript includes

function qualify_submission(product_form)
{
    if  (  (product_form.elements.ADD_PRODUCT_cancellation_policy.checked) &&
           (product_form.elements.ADD_PRODUCT_attendance_policy.checked)
        )
        { 
            // alert (product_form.attendance_policy_accepted.checked);
            // alert (product_form.attendance_policy_accepted.checked);
            return true;
        }
    else
    {
        alert ("In order to proceed with this registration you must review and accept the Cancellation & Attendance policies.");
        // alert (product_form.attendance_policy_accepted.value);
        // alert (product_form.attendance_policy_accepted.checked);
        return false;
   }

}

function qualify_loud_submission(product_form)
{
    if  (  (product_form.elements.ADD_PRODUCT_cancellation_policy.checked) &&
           (product_form.elements.ADD_PRODUCT_attendance_policy.checked) &&
		   (product_form.elements.ADD_PRODUCT_confidentiality_and_practice_agreement.checked)
        )
        { 
            // alert (product_form.attendance_policy_accepted.checked);
            // alert (product_form.attendance_policy_accepted.checked);
            return true;
        }
    else
    {
        alert ("In order to proceed with this registration you must review and accept the Cancellation and Attendance policies and the Confidentiality & Practice agreement.");
        // alert (product_form.attendance_policy_accepted.value);
        // alert (product_form.attendance_policy_accepted.checked);
        return false;
   }

}

function qualify_online_loud_submission(product_form)
{
    if  ((product_form.elements.ADD_PRODUCT_confidentiality_and_practice_agreement.checked))
	{ 
            return true;
	}
    else
    {
        alert ("In order to proceed with this registration you must review and accept the Confidentiality & Practice agreement.");
        return false;
   }
}

function qualify_online_loud_clinician_name_submission(product_form)
{
	if (product_form.ADD_PRODUCT_attendee_name.value.length<1){
        alert("Please enter the clinician name of the LSVT LOUD certified clinician who will use LSVTC.");
        product_form.ADD_PRODUCT_attendee_name.focus();
        return false;
    }
	
	if (product_form.ADD_PRODUCT_lsvt_certification_note.value.length<1){
        alert("Please enter the LSVT certification number of the LSVT LOUD certified clinician who will use LSVTC.");
        product_form.ADD_PRODUCT_lsvt_certification_note.focus();
        return false;
    }
	
	if (product_form.ADD_PRODUCT_affiliation.value.length<1){
        alert("Please enter the affiliation of the LSVT LOUD certified clinician who will use LSVTC.");
        product_form.ADD_PRODUCT_affiliation.focus();
        return false;
    }
	
    if  ((product_form.elements.ADD_PRODUCT_confidentiality_and_practice_agreement.checked))
	{ 
            return true;
	}
    else
    {
        alert ("In order to proceed with this registration you must review and accept the Confidentiality & Practice agreement.");
        return false;
   }
}

function qualify_online_loud_clinician_name_no_id_submission(product_form)
{
	if (product_form.ADD_PRODUCT_attendee_name.value.length<1){
        alert("Please enter the clinician name of the LSVT LOUD certified clinician who will use LSVTC.");
        product_form.ADD_PRODUCT_attendee_name.focus();
        return false;
    }
	
	if (product_form.ADD_PRODUCT_affiliation.value.length<1){
        alert("Please enter the affiliation of the LSVT LOUD certified clinician who will use LSVTC.");
        product_form.ADD_PRODUCT_affiliation.focus();
        return false;
    }
	
    if  ((product_form.elements.ADD_PRODUCT_confidentiality_and_practice_agreement.checked))
	{ 
            return true;
	}
    else
    {
        alert ("In order to proceed with this registration you must review and accept the Confidentiality & Practice agreement.");
        return false;
   }
}

function qualify_online_loud_clinician_submission(product_form)
{
	if (product_form.ADD_PRODUCT_certified_clinician_id.value.length<1){
        alert("Please enter the clinician ID of the LSVT LOUD certified clinician who will use LSVTC.");
        product_form.ADD_PRODUCT_certified_clinician_id.focus();
        return false;
    }
	
    if  ((product_form.elements.ADD_PRODUCT_confidentiality_and_practice_agreement.checked))
	{ 
		return true;
	}
    else
    {
        alert ("In order to proceed with this registration you must review and accept the Confidentiality & Practice agreement.");
        return false;
   }
}

function qualify_online_submission(product_form) {
	if (product_form.ADD_PRODUCT_certified_clinician_id.value.length<1){
        alert("Please enter the clinician ID of the LSVT LOUD certified clinician who will use LSVTC.");
        product_form.ADD_PRODUCT_certified_clinician_id.focus();
        return false;
    }
	else {
		return true;
	}
}

function toggle_display_state(curobj)
{
  if (curobj)
  {
    if (document.getElementById(curobj).style.display=="none")
    {
      document.getElementById(curobj).style.display="block";
    }
    else
    {
      document.getElementById(curobj).style.display="none";
    }
  }
}

// find LOUD clinician search terms accepted
function qualify_loud_search(loud_search)
{
    if  (loud_search.elements.x_loud_search_terms_conditions.checked)
        { 
            return true;
        }
    else
    {
        alert ("In order to proceed with the Find LSVT LOUD Clinicians search you must review and accept the Search Terms and Conditions.");
        return false;
   }
}

// find BIG clinician search terms accepted
function qualify_big_search(big_search)
{
    if  (big_search.elements.x_big_search_terms_conditions.checked)
        { 
            return true;
        }
    else
    {
        alert ("In order to proceed with the Find BIG Clinicians search you must review and accept the Search Terms and Conditions.");
        return false;
   }
}

// LSVT Companion, Clinician Edition product - Clinician name filled out
function qualify_companion_product(form)
{
    if (form.ADD_PRODUCT_certified_clinician_name.value.length<1){
        alert("Please enter name of the LSVT LOUD certified clinician who will use LSVTC.");
        form.ADD_PRODUCT_certified_clinician_name.focus();
        return false;
    }
}
