function validateEndorsement()
{	
	var message = "Are you sure you want to delete the following endorsements:";
	var confirmation = false;	
	for (i=0;i<document.SmartForm.elements.length;i++)
	{
		objName = document.SmartForm.elements[i].name;
		if(objName == 'optionalEndorCheckbox_'+document.SmartForm.addedInsuredCheckboxIndex.value)
		{
			if(document.SmartForm.addedInsuredFoundInDb.value == 'yes' && !document.SmartForm.elements[i].checked) 
			{		
				if(confirmation)
				{
					message = message+", "+document.SmartForm.addedInsuredEndorCode.value;
				} else 
				{
					message = message+""+document.SmartForm.addedInsuredEndorCode.value; 
				}
				confirmation = true;
			}
		} else if(objName == 'optionalEndorCheckbox_'+document.SmartForm.addedPremiseLiabilityCheckboxIndex.value)
		{
			if(document.SmartForm.addedPremiseLiabilityFoundInDb.value == 'yes' && !document.SmartForm.elements[i].checked) 
			{
				if(confirmation)
				{
					message = message+", "+document.SmartForm.addedPremiseEndorCode.value;
				} else 
				{
					message = message+""+document.SmartForm.addedPremiseEndorCode.value;
				}
				confirmation = true;
			}
		}
	}
	if(confirmation)
	{	
		 setActionForForm('EndorsementNextAction.do');		
		 enableConfirmDialog(message);			
	} else 
	{		
		return true;
	}
}

/*
 * tests to see if HO-225 endosement is persisted in DB but user chose to delete
 * tests to see if HO-225 endosement is persisted in DB but user chose to delete
 */ 
 
function test225And301EndorsementDelete(form, message)
{
	if(form.ho225FoundInDb.value == 'yes'){
	
	} else {
	
	}
	
}

function showRatingSheet(actionString){	
	window.open(actionString, 'RatingSheet', 'left=25, top=25, width = 950, height=650, status=0, scrollbars=1, resizable=1');	
}