Replace repetetive if(type== with switch/case
Replace repetetive if(type== with switch/case

SVN revision: 69512

tasn/elementary,FlorentRevest/Elementary,tasn/elementary,rvandegrift/elementary,tasn/elementary,tasn/elementary,rvandegrift/elementary,rvandegrift/elementary,tasn/elementary,FlorentRevest/Elementary,rvandegrift/elementary,FlorentRevest/Elementary,FlorentRevest/Elementary