Try this:
StringBuilder js = new StringBuilder();
for (int i = 0; i < grdAdditionalInsured.Rows.Count; i++)
{
bool checked = ((CheckBox)grdAdditionalInsured.Rows[i].Cells[0].FindControl("chkAdditionalInsured")).Checked;
if (checked)
{
//**some code to get the id based on values**
js.AppendFormat(@"WindowPopup('/CertPrints/{0}.pdf');",id));
}
}
ScriptManager.RegisterStartupScript(this, this.GetType(), "filePopup", js.ToString(), true);