You should create a device template. It is really very easy.
You could use template 1812 Gyration Go Mouse or 2147 TS820 Trackball mouse as an example and use information from http://wiki.linuxmce.org/index.php/Creating_a_Device_Template_for_a_Remote_that_uses_the_kernel_input_subsystem
Pay particular attention to steps 6, 7 and Plug and Play and use xev to get the codes your mouse puts out then reference the existing templates and you should be able to work it out. if you just want to map F6,F7,F8 the TS820 template maps just those such that in the #60 Mapping box:
where 115 is the code generated when the button I wanted as F7 is pressed (73 is the code for F7);
178 is the code generated when the button I wanted as F8 is pressed (74 is the code for F8);
236 is the code generated when the button I wanted as F6 is pressed (72 is the code for F6);