function writer( form ){
var newIndex = form.opttwo.selectedIndex; 

dr_no = form.opttwo.options[ newIndex ].value;
spec_mail = form.specialty.value;

if (dr_no !="none" && spec_mail !="fop"){

		alert( "Please select either a physician or a department. Do not select both." ); 
		document.contactus.practice.value = "Appropriate Department Displayed Here";
		document.contactus.opttwo.value="none";
		document.contactus.specialty.value="fop";
	}
else{
	if ( dr_no == "none" ) { 

		var no_doc = "Appropriate Department Displayed Here";

		document.contactus.practice.value = no_doc;
		alert( "Please select a physician!" ); 

	} else { 


var phys = new Array();

phys[0] = new Array ("Agent, DO, Phil ","Internal Medicine, Main Clinic",'intmed@cooperclinic.com');
phys[1] = new Array ("Asbury, MD, Dale","Family Practice, Eastside Clinic",'eastside@cooperclinic.com');
phys[2] = new Array ("Balis, MD, Luc","Family Practice, Fianna Hills Clinic",'fiannahills@cooperclinic.com');
phys[3] = new Array ("Barton, MD, Lance","Family Practice, Greenwood Clinic",'greenwood@cooperclinic.com');
phys[4] = new Array ("Beachy, MD, Allen","Family Practice, Fianna Hills Clinic",'fiannahills@cooperclinic.com');
phys[5] = new Array ("Bebout, MD, Robert","Orthopedics, Centers of Excellence",'ortho@cooperclinic.com');
phys[6] = new Array ("Beene, MD, Hannah","Pediatrics, Main Clinic",'pediatrics@cooperclinic.com');
phys[7] = new Array ("Buckley, MD, Douglas","Family Practice, Paris Clinic",'paris@cooperclinic.com');
phys[8] = new Array ("Burks, MD, Jennifer","Family Practice, Fianna Hills Clinic",'fiannahills@cooperclinic.com');
phys[9] = new Array ("Callaway, MD, Michael","Family Practice, Fianna Hills Clinic",'fiannahills@cooperclinic.com');
phys[10] = new Array ("Carrick, MD, Garreth","Family Practice, Ozark Clinic",'ozark@cooperclinic.com');
phys[11] = new Array ("Coleman, Jr., MD, Michael","Nephrology, Main Clinic",'neph@cooperclinic.com');
phys[12] = new Array ("Coleman, MD, Christopher ","Surgery, Centers of Excellence",'surgery@cooperclinic.com');
phys[13] = new Array ("Coleman, Sr., MD, Michael","Nephrology, Main Clinic",'neph@cooperclinic.com');
phys[14] = new Array ("Craft, DO, Charles","Family Practice, Greenwood Clinic",'greenwood@cooperclinic.com');
phys[15] = new Array ("de Mondesert, MD, Eduardo","Gastroenterology, Main Clinic",'gastro@cooperclinic.com');
phys[16] = new Array ("Deneke, MD, James","Rheumatology, Main Clinic",'rheum@cooperclinic.com');
phys[17] = new Array ("DuPree, MD., Ivelesse","Pediatrics, Main Clinic",'pediatrics@cooperclinic.com');
phys[18] = new Array ("Eckes, MD, Darryl","Surgery, Centers of Excellence",'surgery@cooperclinic.com');
phys[19] = new Array ("Eckes, MD, Michelle","Pediatrics, Main Clinic",'pediatrics@cooperclinic.com');
phys[20] = new Array ("Edwards, DO, Gary","Family Practice, Family Medical Clinic",'edwards@cooperclinic.com');
phys[21] = new Array ("Enns, MD., Wayne","Family Practice, Paris Clinic",'paris@cooperclinic.com');
phys[22] = new Array ("Erstine, DO, Byron","Otolaryngology (ENT), Main Clinic",'ent@cooperclinic.com');
phys[23] = new Array ("Evans, MD, Jeffrey","Orthopedics, Centers of Excellence",'ortho@cooperclinic.com');
phys[24] = new Array ("Fleck, MD, Peter ","Cardiology, Centers of Excellence",'cardio@cooperclinic.com');
phys[25] = new Array ("Flippin, MD, Tony","Hematology/Oncology, Hembree Reg. Cancer Ctr.",'oncology@cooperclinic.com');
phys[26] = new Array ("Foreman, DO, Riley","Cardiology, Centers of Excellence",'cardio@cooperclinic.com');
phys[27] = new Array ("Francis, MD, Darryl","Urology, Main Clinic",'urology@cooperclinic.com');
phys[28] = new Array ("Gorukanti, MD, Narender","Hematology/Oncology, Hembree Reg. Cancer Ctr.",'oncology@cooperclinic.com');
phys[29] = new Array ("Greer, DO, Christopher","Ophthalmology, Main Clinic",'ophth@cooperclinic.com');
phys[30] = new Array ("Gwartney, MD, Michael","Otolaryngology (ENT), Main Clinic",'ent@cooperclinic.com');
phys[31] = new Array ("Haraway, MD, Stuart","Obstetrics/Gynecology, Centers of Excellence",'obgyn@cooperclinic.com');
phys[32] = new Array ("Harp, MD, John","Orthopedics, Centers of Excellence",'ortho@cooperclinic.com');
phys[33] = new Array ("Heim, MD, Stephen","Orthopedics, Centers of Excellence",'ortho@cooperclinic.com');
phys[34] = new Array ("Hoffman, MD, John","Gynecology, Main Clinic",'gyn@cooperclinic.com');
phys[35] = new Array ("Howell, MD, Paul","Endocrinology, Main Clinic",'endocrin@cooperclinic.com');
phys[36] = new Array ("Hunton, MD, David","Surgery, Centers of Excellence",'surgery@cooperclinic.com');
phys[37] = new Array ("Jackson, MD. Charles","Family Practice, Greenwood Clinic",'greenwood@cooperclinic.com');
phys[38] = new Array ("Joseph, MD, Jacob","Gastroenterology, Main Clinic",'gastro@cooperclinic.com');
phys[39] = new Array ("Kareus, DO, John","Neurology, Main Clinic",'neuro@cooperclinic.com');
phys[40] = new Array ("Keating, MD, Janice","Neurology, Main Clinic",'neuro@cooperclinic.com');
phys[41] = new Array ("Kelly, MD, Thomas","Surgery, Centers of Excellence",'surgery@cooperclinic.com');
phys[42] = new Array ("Keyashian, MD, Mohsen","Internal Medicine, Main Clinic",'intmed@cooperclinic.com');
phys[43] = new Array ("Khemka, MD, Sanjay","Internal Medicine, Main Clinic",'intmed@cooperclinic.com');
phys[44] = new Array ("Knubley, MD, William","Neurology, Main Clinic",'neuro@cooperclinic.com');
phys[45] = new Array ("Kradel, MD, Paul","Gynecology, Main Clinic",'gyn@cooperclinic.com');
phys[46] = new Array ("Landers, MD, Macon","Internal Medicine, Main Clinic",'intmed@cooperclinic.com');
phys[47] = new Array ("Lewis, MD, Luke","Dermatology, Main Clinic",'derm@cooperclinic.com');
phys[48] = new Array ("Mackey, MD, Daniel","Hematology/Oncology, Hembree Reg.Cancer Ctr",'oncology@cooperclinic.com');
phys[49] = new Array ("Magness, MD, Jack","Dermatology, Main Clinic",'derm@cooperclinic.com');
phys[50] = new Array ("Magrini, DPM, Kent","Podiatry, Foot Health Center",'foothealth@cooperclinic.com');
phys[51] = new Array ("Manus, MD, Stephen","Cardiology, Centers of Excellence",'cardio@cooperclinic.com');
phys[52] = new Array ("McClain, MD., Merle","Pediatrics, Main Clinic",'pediatrics@cooperclinic.com');
phys[53] = new Array ("McMicheal, MD., Wanda","Family Practice, Fianna Hills Clinic",'fiannahills@cooperclinic.com');
phys[54] = new Array ("Medlock, MD, Jeffrey","Family Practice, Eastside Clinic",'eastside@cooperclinic.com');
phys[55] = new Array ("Mehl, MD., Kurt","Cardiology, Centers of Excellence",'cardio@cooperclinic.com');
phys[56] = new Array ("Nowlin, MD., Robert","Internal Medicine, Centers of Excellence",'intmedcoe@cooperclinic.com');
phys[57] = new Array ("Passmore, MD, Ann",'Plastic Surgery','plasticsurgery@cooperclinic.com');
phys[58] = new Array ("Phillips, MD, Kevin","Gynecology, Main Clinic",'gyn@cooperclinic.com');
phys[59] = new Array ("Phillips, MD, Sumer","Internal Medicine, Main Clinic",'intmed@cooperclinic.com');
phys[60] = new Array ("Phillips, MD, Tonya","Neurology, Main Clinic",'neuro@cooperclinic.com');
phys[61] = new Array ("Renner, OD, Matthew","Optometry, Main Clinic",'ophth@cooperclinic.com');
phys[62] = new Array ("Richardson, MD., Derrick","Gastroenterology, Main Clinic",'gastro@cooperclinic.com');
phys[63] = new Array ("Richey, MD, Jason","Family Practice, Paris Clinic",'paris@cooperclinic.com');
phys[64] = new Array ("Richey, MD, Jason","Family Practice, Charleston Clinic",'charleston@cooperclinic.com');
phys[65] = new Array ("Rippey, MD, Kelli L.,","Family Practice, Ozark Clinic",'ozark@cooperclinic.com');
phys[66] = new Array ("Sanders, DO, Robert","Internal Medicine, Family Medical Clinic",'edwards@cooperclinic.com');
phys[67] = new Array ("Seffense, MD., Stephen","Surgery, Centers of Excellence",'surgery@cooperclinic.com');
phys[68] = new Array ("Shows, MD, Donald","Cardiology, Centers of Excellence",'cardio@cooperclinic.com');
phys[69] = new Array ("Smith, MD, John","Surgery, Paris Clinic",'paris@cooperclinic.com');
phys[70] = new Array ("Smith, MD, John","Surgery, Ozark Clinic",'ozark@cooperclinic.com');
phys[71] = new Array ("Stites, MD, Kirk","Cardiology, Centers of Excellence",'cardio@cooperclinic.com');
phys[72] = new Array ("Torres, MD Stephen","Obstetrics/Gynecology, Centers of Excellence",'obgyn@cooperclinic.com');
phys[73] = new Array ("Van Asche, MD., Christopher","Gastroenterology, Main Clinic",'gastro@cooperclinic.com');
phys[74] = new Array ("Vernon, MD, Rowland","Cardiovascular Surgery, Centers of Excellence",'cardio@cooperclinic.com');
phys[75] = new Array ("Waack, MD, Timothy","Cardiology, Centers of Excellence",'cardio@cooperclinic.com');
phys[76] = new Array ("Wells, MD, John","Hematology/Oncology, Hembree Reg.Cancer Ctr",'oncology@cooperclinic.com');
phys[77] = new Array ("Werner, DPM, John","Podiatry, Eastside Clinic",'eastside@cooperclinic.com');
phys[78] = new Array ("White, MD, Aaron","Family Practice, Greenwood Clinic",'greenwood@cooperclinic.com');
phys[79] = new Array ("Wilson, MD, Lane","Family Practice, Ozark Clinic",'ozark@cooperclinic.com');
phys[80] = new Array ("Wolfe, MD, Michael","Orthopedics, Fianna Hills Clinic",'fiannahills@cooperclinic.com');
phys[81] = new Array ("Wright, DPM, John","Podiatry - Wright",'wrightpodiatry@cooperclinic.com');
phys[82] = new Array ("Yarborough, MD, Becky","Internal Medicine, Main Clinic",'intmed@cooperclinic.com');
phys[83] = new Array ("Ziegler, MD, Aubrey.","Allergy, NW Allergy Clinic",'nwaallergy@cooperclinic.com');


var physname = phys[dr_no][0];
var department = phys[dr_no][1];
var email_recipient = phys [dr_no][2];


		document.contactus.email.value = email_recipient;
		document.contactus.practice.value = department;
		document.contactus.physician.value = physname;

	} 
}
}