
function isSatisfSurveyValid(objForm) {
	// validate customer satisfaction form
    var isChecked = false;
    
    isChecked = false;
    // Question 1 - satisfaction with MCSOT
    for (i=0; i < objForm.SATISFACTION.length; i++) {
    	if (objForm.SATISFACTION[i].checked) {
			isChecked = true;
    		}
    	}
    
    if (!isChecked) {
    	showSatisfSurveyMsg("1");
    	return false;
    	}
    
    
    isChecked = false;
    // Question 2a - satisfaction with MCSOT service technicians
    for (i=0; i < objForm.TECHNICIANS_SAT.length; i++) {
    	if (objForm.TECHNICIANS_SAT[i].checked) {
			isChecked = true;
    		}
    	}
    
    if (!isChecked) {
    	showSatisfSurveyMsg("2a");
    	return false;
    	}
    
    
    isChecked = false;
    // Question 2b - importance with MCSOT service technicians
    for (i=0; i < objForm.TECHNICIANS_IMP.length; i++) {
    	if (objForm.TECHNICIANS_IMP[i].checked) {
			isChecked = true;
    		}
    	}
    
    if (!isChecked) {
    	showSatisfSurveyMsg("2b");
    	return false;
    	}
    
    
    isChecked = false;
    // Question 3a - satisfaction with MCSOT sales staff
    for (i=0; i < objForm.SALESSTAFF_SAT.length; i++) {
    	if (objForm.SALESSTAFF_SAT[i].checked) {
			isChecked = true;
    		}
    	}

    if (!isChecked) {
    	showSatisfSurveyMsg("3a");
    	return false;
    }
    
    
    isChecked = false;
    // Question 3b - importance of MCSOT sales staff
    for (i=0; i < objForm.SALESSTAFF_IMP.length; i++) {
    	if (objForm.SALESSTAFF_IMP[i].checked) {
			isChecked = true;
    		}
    	}	
    
    if (!isChecked) {
    	showSatisfSurveyMsg("3b");
    	return false;
    }
    
    
    isChecked = false;
    // Question 4a - satisfaction with MCSOT assistance timeliness
    for (i=0; i < objForm.AVAILABILITY_SAT.length; i++) {
    	if (objForm.AVAILABILITY_SAT[i].checked) {
			isChecked = true;
    		}
    	}
    
    if (!isChecked) {
    	showSatisfSurveyMsg("4a");
    	return false;
    	}
    
    
    isChecked = false;
    // Question 4b - importance of MCSOT assistance timeliness
    for (i=0; i < objForm.AVAILABILITY_IMP.length; i++) {
    	if (objForm.AVAILABILITY_IMP[i].checked) {
			isChecked = true;
    		}
    	}
    
    if (!isChecked) {
    	showSatisfSurveyMsg("4b");
    	return false;
    	}
    
    
    isChecked = false;
    // Question 5a - satisfaction with MCSOT line of IT products and services
    for (i=0; i < objForm.ITBREADTH_SAT.length; i++) {
    	if (objForm.ITBREADTH_SAT[i].checked) {
			isChecked = true;
    		}
    	}
    
    if (!isChecked) {
    	showSatisfSurveyMsg("5a");
    	return false;
    	}
    
    
    isChecked = false;
    // Question 5b - importance of MCSOT line of IT products and services
    for (i=0; i < objForm.ITBREADTH_IMP.length; i++) {
    	if (objForm.ITBREADTH_IMP[i].checked) {
			isChecked = true;
    		}
    	}
    
    if (!isChecked) {
    	showSatisfSurveyMsg("5b");
    	return false;
    	}
    
    
    isChecked = false;
    // Question 6a - satisfaction with MCSOT competative pricing
    for (i=0; i < objForm.PRICING_SAT.length; i++) {
    	if (objForm.PRICING_SAT[i].checked) {
			isChecked = true;
    		}
    	}
    
    if (!isChecked) {
    	showSatisfSurveyMsg("6a");
    	return false;
    	}
    
    
    isChecked = false;
    // Question 6b - importance of MCSOT competative pricing
    for (i=0; i < objForm.PRICING_IMP.length; i++) {
    	if (objForm.PRICING_IMP[i].checked) {
			isChecked = true;
    		}
    	}

    if (!isChecked) {
    	showSatisfSurveyMsg("6b");
    	return false;
    }
    
    
    isChecked = false;
    // Question 7a - satisfaction with MCSOT delivery time
    for (i=0; i < objForm.TIMING_SAT.length; i++) {
    	if (objForm.TIMING_SAT[i].checked) {
			isChecked = true;
    		}
   	 }
    
    if (!isChecked) {
    	showSatisfSurveyMsg("7a");
    	return false;
    	}
    
    
    isChecked = false;
    // Question 7b - importance of MCSOT delivery time
    for (i=0; i < objForm.TIMING_IMP.length; i++) {
    	if (objForm.TIMING_IMP[i].checked) {
			isChecked = true;
    		}
    	}
    
    if (!isChecked) {
    	showSatisfSurveyMsg("7b");
    	return false;
    	}
    
    
    isChecked = false;
    // Question 8a - satisfaction with MCSOT.com ease of use
    for (i=0; i < objForm.WEBEASY_SAT.length; i++) {
    	if (!objForm.WEBEASY_SAT[i].checked) {
			isChecked = true;
    		}
    	}
    
    if (!isChecked) {
    	showSatisfSurveyMsg("8a");
    	return false;
    	}
    
    
    isChecked = false;
    // Question 8b - importance of MCSOT.com ease of use
    for (i=0; i < objForm.WEBEASY_IMP.length; i++) {
    	if (objForm.WEBEASY_IMP[i].checked) {
			isChecked = true;
    		}
    	}
    
    if (!isChecked) {
    	showSatisfSurveyMsg("8b");
    	return false;
    	}
    
    
    isChecked = false;
    // Question 9a - satisfaction with MCSOT.com ease of use
    for (i=0; i < objForm.WEBINFO_SAT.length; i++) {
    	if (objForm.WEBINFO_SAT[i].checked) {
			isChecked = true;
    		}
    	}
    
    if (!isChecked) {
    	showSatisfSurveyMsg("9a");
    	return false;
    	}
    
    
    isChecked = false;
    // Question 9b - importance of MCSOT.com ease of use
    for (i=0; i < objForm.WEBINFO_IMP.length; i++) {
    	if (objForm.WEBINFO_IMP[i].checked) {
			isChecked = true;
    		}
    	}
    
    if (!isChecked) {
    	showSatisfSurveyMsg("9b");
    	return false;
    	}
    
    

  	// if ok, submit the form
  	return true;
  
}



function showSatisfSurveyMsg( intErr ) {
	switch(intErr) {
		case "1":
			alert("Please select your overall satisfication with MCSOT.");
			break;
		case "2a":
			alert("Please select your satisfication with MCSOT service technicians.");
			break;
	 	case "2b":
			alert("Please select your level of importance, in regards to MCSOT service technicians.");
			break;
		case "3a":
			alert("Please select your satisfication with MCSOT sales staff.");
			break;
		case "3b":
			alert("Please select your level of importance, in regards to MCSOT sales staff.");
			break;
		case "4a":
			alert("Please select your satisfaction with MCSOT assistance.");
			break;
		case "4b":
			alert("Please select your level of importance, in regards to calling for assistance.");
			break;
		case "5a":
			alert("Please select your satisfaction with our IT products and services.");
			break;
		case "5b":
			alert("Please select your level of importance, in regards to our IT products and services.");
			break;
		case "6a":
			alert("Please select your satisfaction with the competitiveness of our pricing.");
			break;
		case "6b":
			alert("Please select your level of importance, in regards to the competitiveness of pricing.");
			break;
		case "7a":
			alert("Please select your satisfaction with the delivery period for products.");
			break;
		case "7b":
			alert("Please select your level of importance, in regards to the delivery period for products.");
			break;
		case "8a":
			alert("Please select your satisfaction with our website's ease of use.");
			break;
		case "8b":
			alert("Please select your level of importance, in regards to our website's ease of use.");
			break;
		case "9a":
			alert("Please select your satisfaction with our website's usefulness.");
			break;
		case "9b":
			alert("Please select your level of importance, in regards to our website's uesfulness.");
			break;
	}
}






function isScheduleWorkValid(objForm) {
	// validate the schedule worked

    // Business
    if (objForm.CUSTOMER_TYPE[0].checked) {
    	if (objForm.COMPANY_NAME.value == "") {
			alert("Please enter your company's name.");
			return false;
    		}
    	if (objForm.CONTACT.value == "") {
    		alert("Please enter your name or the contact for the company.");
    		return false;
    		}
    	if (objForm.LOCATION.value == "") {
    		alert("Please enter the location, building, or city where the problem is occuring.");
    		return false;
    		}
    	
    	}
    
    // Individual 
    else {
    	if (objForm.FIRST_NAME.value == "") {
			alert("Please enter your first name.");
			return false;
    		}
    	if (objForm.LAST_NAME.value == "") {
    		alert("Please enter your last name.");
    		return false;
    		}
    	if (objForm.ADDRESS.value == "") {
    		alert("Please enter your street address and city.");
    		return false;
    		}
    		
    	}
    
    if (objForm.PHONE_NUM1.value == "") {
    	alert("Please enter the area code of your phone number");
    	return false;
    	}
    if (objForm.PHONE_NUM2.value == "") {
    	alert("Please enter the first three digits of your phone number");
    	return false;
    	}
    if (objForm.PHONE_NUM3.value == "") {
       	alert("Please enter the last four digits of your phone number.");
       	return false;
    	}
    if (objForm.DESCRIPTION.value == "") {
    	alert("Please enter a description of your issue.");
    	return false;
    	}
    
    // Everything was fine, return true and submit form
    return true;
    
    
}
