France has opened a judicial investigation into allegations that former President Nicolas Sarkozy's 2007 election bid won illicit funds from late Libyan leader Muammar Gaddafi, the public prosecutor's office said on Friday.