function IsScaleChecked(strForm, strItem)
{
	var objForm;
	eval("objForm = document." + strForm + ";");

	var lngRecordCount = _GetElementCount(strForm, strItem);

	var objItem;
	eval("objItem = objForm." + strItem + ";");

	var blnIsChecked = false;
	if (lngRecordCount > 1)
	{
		for (var i = 0; i < objItem.length; ++i)
		{
			if (objItem[i].checked)
			{
				blnIsChecked = true;
				break;
			}
		}
	}
	else
	{
		blnIsChecked = objItem.checked;
	}

	return blnIsChecked;
}

function OtherMarketingSvsCheck()
{
		var objForm = document.theForm;
		var objOtherMarketingSvsDesc = objForm.OtherMarketingSvsDesc;
		var strOtherMarketingSvsDesc = objOtherMarketingSvsDesc.value;
		
		if (strOtherMarketingSvsDesc !="")  
		{
			if (!IsScaleChecked("theForm","OtherMarketingSvs"))
				{
					alert ("Please rate the services that you have specified.");
					return false;
				}
	   	}
		else
		{
			if (IsScaleChecked("theForm","OtherMarketingSvs"))
			{
				objOtherMarketingSvsDesc.focus();
				objOtherMarketingSvsDesc.select();
				alert ("You forgot to fill in the other Marketing Services.");
				return false;
			}
		}

		return true;
} 

function OtherAdminSvsCheck()
{
		var objForm = document.theForm;
		var objOtherAdminSvsDesc = objForm.OtherAdminSvsDesc;
		var strOtherAdminSvsDesc = objOtherAdminSvsDesc.value;
		
		if (strOtherAdminSvsDesc !="")  
		{
			if (!IsScaleChecked("theForm","OtherAdminSvs"))
				{
					alert ("Please rate the services that you have specified.");
					return false;
				}
	   	}
		else
		{
			if (IsScaleChecked("theForm","OtherAdminSvs"))
			{
				objOtherAdminSvsDesc.focus();
				objOtherAdminSvsDesc.select();
				alert ("You forgot to fill in the other Administration Services.");
				return false;
			}
		}

		return true;
} 

function OtherShipSurveySvsCheck()
{
		var objForm = document.theForm;
		var objOtherShipSurveySvsDesc = objForm.OtherShipSurveySvsDesc;
		var strOtherShipSurveySvsDesc = objOtherShipSurveySvsDesc.value;
		
		if (strOtherShipSurveySvsDesc !="")  
		{
			if (!IsScaleChecked("theForm","OtherShipSurveySvs"))
				{
					alert ("Please rate the services that you have specified.");
					return false;
				}
	   	}
		else
		{
			if (IsScaleChecked("theForm","OtherShipSurveySvs"))
			{
				objOtherShipSurveySvsDesc.focus();
				objOtherShipSurveySvsDesc.select();
				alert ("You forgot to fill in the other Ship Survey Services.");
				return false;
			}
		}

		return true;
} 

function OtherShipRegDeptCheck()
{
		var objForm = document.theForm;
		var objOtherShipRegDeptDesc = objForm.OtherShipRegDeptDesc;
		var strOtherShipRegDeptDesc = objOtherShipRegDeptDesc.value;
		
		if (strOtherShipRegDeptDesc !="")  
		{
			if (!IsScaleChecked("theForm","OtherShipRegDept"))
				{
					alert ("Please rate the services that you have specified.");
					return false;
				}
	   	}
		else
		{
			if (IsScaleChecked("theForm","OtherShipRegDept"))
			{
				objOtherShipRegDeptDesc.focus();
				objOtherShipRegDeptDesc.select();
				alert ("You forgot to fill in the other Ship Registration Department's Services.");
				return false;
			}
		}

		return true;
} 

function OtherCertificationDeptCheck()
{
		var objForm = document.theForm;
		var objOtherCertificationDeptDesc = objForm.OtherCertificationDeptDesc;
		var strOtherCertificationDeptDesc = objOtherCertificationDeptDesc.value;
		
		if (strOtherCertificationDeptDesc !="")  
		{
			if (!IsScaleChecked("theForm","OtherCertificationDept"))
				{
					alert ("Please rate the services that you have specified.");
					return false;
				}
	   	}
		else
		{
			if (IsScaleChecked("theForm","OtherCertificationDept"))
			{
				objOtherCertificationDeptDesc.focus();
				objOtherCertificationDeptDesc.select();
				alert ("You forgot to fill in the other Certification Department's Services.");
				return false;
			}
		}

		return true;
} 

function OverallPerformanceCheck()
{			
		var objForm = document.theForm;
		var objOverallPerformance = objForm.OverallPerformance;
		
		if (!IsScaleChecked("theForm","OverallPerformance"))
			{
				objOverallPerformance[0].focus();
				objOverallPerformance[0].select();
				alert ("Please rate the Overall Performance.");
				return false;
			}

		return true;
} 

function OnTimeCompletionCheck()
{			
		var objForm = document.theForm;
		var objOnTimeCompletion = objForm.OnTimeCompletion;
		
		if (!IsScaleChecked("theForm","OnTimeCompletion"))
			{
				objOnTimeCompletion[0].focus();
				objOnTimeCompletion[0].select();
				alert ("Please rate the On-Time Completion.");
				return false;
			}

		return true;
} 

function MarketingResponseTimeCheck()
{			
		var objForm = document.theForm;
		var objMarketingResponseTime = objForm.MarketingResponseTime;
		var objCoordinationPlanning = objForm.CoordinationPlanning;
		var objOtherMarketingSvs = objForm.OtherMarketingSvs;
		
		if ((!IsScaleChecked("theForm","MarketingResponseTime")) && (!IsScaleChecked("theForm","CoordinationPlanning")) && (!IsScaleChecked("theForm","OtherMarketingSvs")))
			{
				objMarketingResponseTime[0].focus();
				objMarketingResponseTime[0].select();
				alert ("Please rate at least one of the Marketing Services.");
				return false;
			}

		return true;
} 

function PleasantnessCheck()
{			
		var objForm = document.theForm;
		var objPleasantness = objForm.Pleasantness;
		var objAdminResponseTime = objForm.AdminResponseTime;
		var objAdminWorkAttitude = objForm.AdminWorkAttitude;
		var objOtherAdminSvs = objForm.OtherAdminSvs;		
		
		if ((!IsScaleChecked("theForm","Pleasantness")) && (!IsScaleChecked("theForm","AdminResponseTime")) && (!IsScaleChecked("theForm","AdminWorkAttitude")) && (!IsScaleChecked("theForm","OtherAdminSvs")))
			{
				objPleasantness[0].focus();
				objPleasantness[0].select();
				alert ("Please rate at least one of the Administration Services.");
				return false;
			}

		return true;
} 


