function getform(form) {
var bAgent = navigator.userAgent;
var IsIE = bAgent.indexOf("MSIE") > -1;
var IsIE3 = IsIE && parseInt (navigator.appVersion) == 2;

 if (form.formslist.selectedIndex > 0){
    var myindex=form.formslist.selectedIndex;
    var filename=form.formslist.options[myindex].value;}

if (IsIE3) {
	window.open("/forms/" + filename,'newWin','scrollbars=yes,status=yes');
    }

else {  form.reset();
	document.location.href="/forms/" + filename;}

}

var formfiles = new Array();

	formfiles[0] = ["Adoption Reimbursement","Aetna HMO Vision Claim Form","Basic Dental CT","Basic Dental, Dental FOC","Claims Appeals","Dental/Vision, Dental Care, Retiree Dental","Dependent Care Account Reimbursement Form 2008","Health Care Account Reimbursement Form 2008","Hearing Claim Form","Horizon HMO Vision","Horizon Indemnity Health","Horizon POS Health/Vision","Lasik Eye Surgery Benefits Claim Form","MetLife LTD Employee Statement","MetLife LTD Physician Statement","Horizon COB/Medical Release","Aetna Disabled Dependent Enrollment","Horizon Disabled Dependent Enrollment","Model QDRO","Model QMSCO","Employee Stock Purchase Plan Enrollment Form","Medco Mail-Order Form","Horizon Provider Nomination","W4P—Federal and State","Change of Address Request","Postretirement Supp. Health Benefits Enrollment/Change Form","Payments Rights Notice","Direct Deposit","Medco Prescription Reimbursement Claim Form","Dependent Care Account Reimbursement Form","Health Care Account Reimbursement Form","Beneficiary Designation Form"];
	formfiles[1] = ["a_form_adoptionreimb_claim.pdf","form_aetnahmovision_claim.pdf","a_form_dentalct_claim.pdf","a_form_dentalfoc_claim.pdf","formpub_claimsappeals.pdf","form_dentalvision_claim.pdf","form_dca_claim.pdf","form_hca_claim.pdf","a_form_aetnahearing_claim.pdf","form_horizonvision_claim.pdf","form_horizonindem_claim.pdf","form_horizonpos_claim.pdf","a_form_lasik_claim.pdf","a_form_metltd_claim.pdf","a_form_metltdphy_claim.pdf","a_form_horizoncob.pdf","a_form_aetnahdcp.pdf","a_form_disenroll.pdf","a_formpub_qdromodels.pdf","a_formpub_qmed.pdf","a_form_eestockenroll.pdf","form_medco_mailorder.pdf","form_horizonprovidernom.pdf","form_w4p.pdf","form_pensionchangeadd.pdf","form_postretiree.pdf","a_form_taxnotice.pdf","a_form_directdeposit.pdf","form_medco_claim.pdf","form_dca_claim.pdf","form_hca_claim.pdf","form_cashbalbeneficiary.pdf"];

function changedropdown(includes,droplist,titlearray,filearray){
	
	for (var count = 0; count < includes.length; count++){
		droplist.options.length = count+1;
                droplist.options[count+1] = new Option(titlearray[includes[count]], filearray[includes[count]]);}
        droplist.options[0].selected = true;
        droplist.options.length =count+1;
}

function formseval(form){
	var selected = form.formselect[form.formselect.selectedIndex].value;
 
	// alert (selected);
	
	if (selected == "cashbal")
	     {changedropdown([31],form.formslist,formfiles[0],formfiles[1]);}
	if (selected == "claims")
	     {changedropdown([0,1,3,4,5,29,30,9,10,11,12,13,14,28],form.formslist,formfiles[0],formfiles[1]);}
	if (selected == "cob")
		{changedropdown([15],form.formslist,formfiles[0],formfiles[1]);}
	if (selected == "dep")
	     {changedropdown([16,17,18,19],form.formslist,formfiles[0],formfiles[1]);}
	if (selected == "directdep")
	     {changedropdown([27],form.formslist,formfiles[0],formfiles[1]);}
	if (selected == "eestock")
	     {changedropdown([20],form.formslist,formfiles[0],formfiles[1]);}
	if (selected == "pre")
	     {changedropdown([21,28],form.formslist,formfiles[0],formfiles[1]);}
	if (selected == "plan")
	     {changedropdown([23,24,25],form.formslist,formfiles[0],formfiles[1]);}
	if (selected == "thrift")
	     {changedropdown([26],form.formslist,formfiles[0],formfiles[1]);}
}
