Ghost-writing grants - Is it legal? Lawyers please chime in

First a little background: I work at a defense company that is breaking into the commercial markets of education and healthcare with a particular type of computing technology formerly used in the military.

Many customers such as schools and physician practices are interested, but in the currently sour US economy, do not have money to pay for it. Grant money from the government and non-profits is available in different forms to either entirely pay for it (for the school) or subsidize it (for healthcare). The problem is that neither the schools nor the practices have experience writing grants nor do they have the time to do so.

I DO have the time and the experience. So can I ghost-write the grant on their behalf (and with their permission, of course) to get the money, then use it to fund my own sales? Well, of course I CAN do it, but is it legal. Obviously we benefit, and the customer benefits, but is that fraud? If the customer applied themselves, there is no question that would be legal. If I do it for them, is it still legal?