Skip to content
Browse files

add click to display depute info

  • Loading branch information...
1 parent d532609 commit 355beebf66e583117a397d49e3cff80942dae240 @alx committed
View
8 json_server/application.rb
@@ -37,3 +37,11 @@
end
{:max => max, :data => $SEATS}.to_json
end
+
+get '/depute/:seat' do
+ @depute_id = $NAMES[params[:seat].to_i][:id]
+ depute_url = "http://www.nosdeputes.fr/#{@depute_id}/json"
+ json = api_json(depute_url)
+ @depute = json["depute"]
+ erb :depute, :layout => false
+end
View
19 json_server/lib/json_parser.rb
@@ -8,29 +8,35 @@ def create_name_table
depute_seats = Array.new(650)
depute_list = api_json("http://www.nosdeputes.fr/deputes/json")
- depute_list["deputes"].each do |depute_json|
+ depute_list["deputes"].each do |json|
- depute = depute_json["depute"]
+ depute = json["depute"]
depute_api = api_json(depute["api_url"])
+ id = depute["api_url"].gsub("http://www.nosdeputes.fr/", "").gsub("/json", "")
name = depute_api["depute"]["nom"]
seat = depute_api["depute"]["place_en_hemicycle"].to_i
pp "name: #{name} - seat: #{seat}"
if seat > 0
- depute_seats[seat] = name
+ depute_seats[seat] = {:name => name, :id => id}
end
end
File.open('names.rb', 'w') do |file|
file.write "$NAMES=[\n"
- depute_seats.each do |name|
- file.write "\"#{name}\",\n"
+ depute_seats.each do |seat|
+ if seat
+ file.write("{:id => \"#{seat[:id]}\",:name => \"#{seat[:name]}\"},\n")
+ else
+ file.write("{},\n")
+ end
end
file.write "]"
end
end
+
def api_json(json_url)
url = URI.parse(json_url)
cached_file = File.join(File.dirname(__FILE__), "/../cache/", url.path)
@@ -55,7 +61,7 @@ def parse_synthese(date)
json["deputes"].each do |depute_json|
depute = depute_json["depute"]
nb_interventions = depute["hemicycle_interventions"]
- seat_index = $NAMES.index(depute["nom"])
+ seat_index = $NAMES.index{|store| store[:name] == depute["nom"]}
if seat_index.to_i > 0 && nb_interventions > 0
if seat = $SEATS.select{|seat| seat[:id] == seat_index}.first
if seat[:count]
@@ -88,4 +94,3 @@ def seat_data
file.write output
end
end
-
View
1,302 json_server/lib/names.rb
@@ -1,653 +1,653 @@
$NAMES=[
-"",
-"Jean-Marie Binetruy",
-"Michel Raison",
-"Cécile Gallez",
-"",
-"Christian Patria",
-"Jean-Paul Garraud",
-"Jean-François Chossy",
-"Françoise Branget",
-"Pierre Lang",
-"Bernard Debré",
-"Philippe Armand Martin",
-"Bernard Reynès",
-"Patrick Labaune",
-"Gabriel Biancheri",
-"Étienne Mourrut",
-"Didier Julia",
-"Jean-Yves Bony",
-"Franck Marlin",
-"Jean-Louis Christ",
-"Jacques Houssin",
-"Bernard Depierre",
-"Sylvia Bassot",
-"Gérard Menuel",
-"Jean-Claude Bouchet",
-"Edwige Antier",
-"Jean-Claude Beaulieu",
-"Jean-Claude Mignon",
-"Michel Voisin",
-"",
-"Alain Marc",
-"Patrice Calméjane",
-"Gérard Lorgeoux",
-"Camille de Rocca Serra",
-"",
-"Jean-Pierre Decool",
-"Marie-Jo Zimmermann",
-"",
-"Jacques Lamblin",
-"Marie-Christine Dalloz",
-"Charles de La Verpillière",
-"Édouard Courtial",
-"",
-"Alain Moyne-Bressand",
-"Gérard Voisin",
-"Étienne Blanc",
-"",
-"Jean-Frédéric Poisson",
-"Jacques Grosperrin",
-"Vincent Descoeur",
-"Xavier Breton",
-"Christian Ménard",
-"Lucien Degauchy",
-"Christian Vanneste",
-"Marc Le Fur",
-"",
-"Jean-Pierre Marcon",
-"André Wojciechowski",
-"Jean-Philippe Maurer",
-"Michel Lezeau",
-"Jean Auclair",
-"",
-"Daniel Fasquelle",
-"Olivier Carré",
-"David Douillet",
-"",
-"Véronique Besse",
-"François-Xavier Villain",
-"Nicolas Dupont-Aignan",
-"",
-"François Bayrou",
-"Jean Lassalle",
-"Dominique Souchet",
-"Abdoulatifou Aly",
-"",
-"Jean-Pierre Grand",
-"Richard Mallié",
-"Bernard Accoyer",
-"Hervé Mariton",
-"Yves Censi",
-"Jean Roatta",
-"Jean Tiberi",
-"Catherine Vautrin",
-"Dominique Perben",
-"Jacques Pélissard",
-"Daniel Poulou",
-"Marie-Anne Montchamp",
-"Nicole Ameline",
-"Xavier Bertrand",
-"Georges Mothron",
-"Christian Jacob",
-"Jacques Kossowski",
-"Bérengère Poletti",
-"Thierry Mariani",
-"François Cornut-Gentille",
-"Jérôme Chartier",
-"Renaud Muselier",
-"Philippe Briand",
-"Michèle Tabarot",
-"Jean-François Copé",
-"Yves Deniaud",
-"Jean-François Lamour",
-"Jean-Pierre Giran",
-"Bernard Brochand",
-"Chantal Brunel",
-"Jean-Michel Ferrand",
-"Jérôme Bignon",
-"",
-"Michel Terrot",
-"Jean-Marc Lefranc",
-"Michel Buillard",
-"René-Paul Victoria",
-"Roland Blum",
-"Jean-Yves Besselat",
-"Jean-Pierre Dupont",
-"",
-"Daniel Spagnou",
-"Jean-Jacques Gaultier",
-"Michel Heinrich",
-"Gérard Cherpion",
-"Jacques Le Guen",
-"",
-"Guy Malherbe",
-"Alfred Almont",
-"Gilles d'Ettore",
-"Patrice Martin-Lalande",
-"Marc Francina",
-"Gabrielle Louis-Carabin",
-"Michel Diefenbacher",
-"Marguerite Lamour",
-"Jacques Domergue",
-"",
-"Éric Ciotti",
-"Franck Gilard",
-"Élie Aboud",
-"Denis Jacquat",
-"André Flajolet",
-"Pierre Morel-A-L'Huissier",
-"Charles-Ange Ginesy",
-"Philippe Meunier",
-"Max Roustan",
-"Daniel Fidelin",
-"",
-"Michel Grall",
-"Valérie Rosso-Debord",
-"Fernand Siré",
-"François Calvet",
-"Daniel Mach",
-"Daniel Garrigue",
-"Guénhaël Huet",
-"Philippe Gosselin",
-"Christine Marin",
-"Didier Gonzales",
-"Françoise Guégot",
-"Michel Havard",
-"Marianne Dubois",
-"Philippe Morenvillier",
-"Lionel Tardy",
-"Jacqueline Irles",
-"",
-"",
-"",
-"François Loos",
-"Antoine Herth",
-"André Schneider",
-"Jean-Jacques Guillet",
-"Jean-Luc Reitzer",
-"Jean Ueberschlag",
-"Guy Teissier",
-"Pierre Cardo",
-"Hervé Gaymard",
-"Jean-Michel Couve",
-"Claude Goasguen",
-"René Couanau",
-"François Baroin",
-"Alain Cousin",
-"Gilles Carrez",
-"Françoise de Panafieu",
-"Yves Bur",
-"Jean-Luc Warsmann",
-"Patrick Ollier",
-"Jean Leonetti",
-"Martine Aurillac",
-"Christian Kert",
-"Yves Jego",
-"Michel Bouvard",
-"Pierre Méhaignerie",
-"Jean-Claude Guibal",
-"Brigitte Barèges",
-"Jean-Pierre Soisson",
-"Serge Grouard",
-"Jean-Louis Bernard",
-"Marie-Josée Roig",
-"Émile Blessig",
-"",
-"Jean-Paul Anciaux",
-"Dino Cinieri",
-"Chantal Bourragué",
-"Guy Geoffroy",
-"Henriette Martinez",
-"Sébastien Huyghe",
-"Patrick Beaudouin",
-"",
-"Bernard Perrut",
-"Manuel Aeschlimann",
-"Dominique Le Mèner",
-"Jean-Louis Léonard",
-"Muriel Marland-Militello",
-"",
-"Guy Lefrand",
-"Geneviève Colot",
-"Michel Lejeune",
-"Robert Lecou",
-"Louis Guédon",
-"Michel Zumkeller",
-"François Grosdidier",
-"Frédéric Reiss",
-"Damien Meslot",
-"",
-"Béatrice Pavy",
-"Jean-Claude Mathis",
-"Rémi Delatte",
-"Céleste Lett",
-"Valérie Boyer",
-"Franck Riester",
-"Yves Albarello",
-"Cécile Dumoulin",
-"Francis Saint-Léger",
-"Marcel Bonnot",
-"",
-"Marie-Louise Fort",
-"Martial Saddier",
-"Philippe Goujon",
-"Yves Vandewalle",
-"Éric Diard",
-"Arnaud Robinet",
-"Isabelle Vasseur",
-"Gaël Yanno",
-"Anne Grommerch",
-"Nicolas Dhuicq",
-"Gérard Gaudron",
-"Franck Reynier",
-"Didier Robert",
-"Jean-Marie Morisset",
-"Sauveur Gandolfi-Scheit",
-"Dominique Tian",
-"",
-"",
-"Pascal Clément",
-"Yves Fromion",
-"Loïc Bouvard",
-"Gérard Hamel",
-"",
-"Bernard Deflesselles",
-"Marc Laffineur",
-"François Goulard",
-"Jean Bardet",
-"Jean-Claude Lenoir",
-"François-Michel Gonnot",
-"Michel Herbillon",
-"Alain Gest",
-"Claude Gatignol",
-"Serge Poignant",
-"Claude Greff",
-"Dominique Dord",
-"Yves Nicolin",
-"Françoise Hostalier",
-"Didier Quentin",
-"Éric Raoult",
-"Pierre Lequiller",
-"Claude Birraux",
-"Philippe Cochet",
-"Alfred Trassy-Paillogues",
-"Georges Tron",
-"Joëlle Ceccaldi-Raynaud",
-"",
-"Lionnel Luca",
-"Pierre Frogier",
-"Marc Bernier",
-"Jean-Pierre Door",
-"Arnaud Richard",
-"Jean-Pierre Nicolas",
-"Arlette Grosskost",
-"",
-"Dominique Caillaud",
-"Axel Poniatowski",
-"Louis Giscard d'Estaing",
-"Michel Piron",
-"Jacques Alain Bénisti",
-"",
-"François Scellier",
-"Pierre-Christophe Baguet",
-"Jacques Myard",
-"Jean-Claude Flory",
-"Alain Suguenot",
-"Maryse Joissains-Masini",
-"Louis Cosyns",
-"Alain Ferry",
-"Bruno Bourg-Broc",
-"",
-"Jean-Marie Rolland",
-"Michel Sordi",
-"Jean-Marc Roubaud",
-"Georges Siffredi",
-"Christophe Priou",
-"Yanick Paternotte",
-"Gilles Bourdouleix",
-"Sophie Delong",
-"Éric Straumann",
-"Jean-Marie Sermier",
-"",
-"Jean Grenet",
-"Geneviève Levy",
-"Georges Ginesta",
-"Josette Pons",
-"Jean-Sébastien Vialatte",
-"",
-"Alain Marty",
-"Claude Bodin",
-"Philippe Boënnec",
-"Paul Jeanneteau",
-"Fabienne Labrette-Ménager",
-"Laure de La Raudière",
-"Bruno Sandras",
-"Bernard Gérard",
-"Patrice Verchère",
-"Bertrand Pancher",
-"Philippe Vitel",
-"",
-"Étienne Pinte",
-"Jean-Claude Thomas",
-"Jean Proriol",
-"Pierre Morange",
-"Pierre Lasbordes",
-"Thierry Lazaro",
-"Jacques Le Nay",
-"Jean-Marc Nesme",
-"Philippe Houillon",
-"Henri Plagnol",
-"Yannick Favennec",
-"Jean-Pierre Gorges",
-"François Vannson",
-"Olivier Dassault",
-"Jean-Michel Fourgous",
-"Nicolas Forissier",
-"Laurent Hénart",
-"Marc-Philippe Daubresse",
-"Georges Colombier",
-"Bernard Carayon",
-"Christophe Guilloteau",
-"Jean-Charles Taugourdeau",
-"Françoise Briand",
-"Philippe Nauche",
-"Michel Vergnier",
-"Alain Vidalies",
-"",
-"Jacques Remiller",
-"Richard Dell'Agnola",
-"Patrick Balkany",
-"Patrice Debray",
-"Daniel Boisserie",
-"Martine Carrillon-Couvreur",
-"Jean-Pierre Dufau",
-"",
-"François Sauvadet",
-"André Santini",
-"Rudy Salles",
-"Jean-Christophe Lagarde",
-"François Rochebloine",
-"",
-"Françoise De Salvador",
-"Frédéric Cuvillier",
-"Jean Grellier",
-"Delphine Batho",
-"Hervé de Charette",
-"Nicolas Perruchot",
-"Charles de Courson",
-"Maurice Leroy",
-"Francis Vercamer",
-"",
-"Marie-Odile Bouillé",
-"Olivier Dussopt",
-"Pascale Got",
-"Michèle Delaunay",
-"Yvan Lachaud",
-"Jean-Pierre Abelin",
-"Michel Hunault",
-"Stéphane Demilly",
-"Philippe Folliot",
-"Philippe Vigier",
-"",
-"Marc Vampa",
-"Raymond Durand",
-"Jean-Louis Gagnaire",
-"Henri Jibrayel",
-"Jean-Patrick Gille",
-"",
-"Jean Dionis du Séjour",
-"Jean-Luc Préel",
-"Francis Hillmeyer",
-"Olivier Jardé",
-"Claude Leteurtre",
-"Thierry Benoit",
-"Colette Le Moal",
-"François Deluga",
-"Christophe Sirugue",
-"Marc Goua",
-"Daniel Goldberg",
-"",
-"Serge Letchimy",
-"Martine Lignières-Cassou",
-"Jean-Paul Bacquet",
-"Élisabeth Guigou",
-"Marie-Françoise Clergeau",
-"Pascal Terrasse",
-"Jean-Louis Bianco",
-"Julien Dray",
-"Michel Vauzelle",
-"Alain Rousset",
-"Jack Lang",
-"Tony Dreyfus",
-"Bruno Le Roux",
-"Danièle Hoffman-Rispal",
-"Gaëtan Gorce",
-"Patricia Adam",
-"Manuel Valls",
-"Alain Claeys",
-"Daniel Vaillant",
-"Marie-Françoise Pérol-Dumont",
-"Sandrine Mazetier",
-"Pierre Moscovici",
-"Jean-Christophe Cambadélis",
-"Marisol Touraine",
-"Jean-Marie Le Guen",
-"Christian Bataille",
-"",
-"Marie-Renée Oget",
-"Gérard Bapt",
-"Jean-Pierre Balligand",
-"Philippe Duron",
-"François Pupponi",
-"Danielle Bousquet",
-"Serge Janquin",
-"",
-"Germinal Peiro",
-"Jean Michel",
-"David Habib",
-"Jean-Yves Le Déaut",
-"Christophe Caresche",
-"",
-"Annick Lepetit",
-"George Pau-Langevin",
-"Jean-Yves Le Bouillonnec",
-"Patrick Bloche",
-"Jacques Bascou",
-"Jean-Paul Dupré",
-"Maxime Bono",
-"Michel Françaix",
-"Thierry Carcenac",
-"",
-"Claude Darciaux",
-"Jean-Paul Chanteguet",
-"André Vézinhet",
-"Monique Iborra",
-"Simon Renucci",
-"William Dumas",
-"Louis-Joseph Manscour",
-"René Rouquet",
-"Éric Jalton",
-"Jean Launay",
-"",
-"Jean Gaubert",
-"Armand Jung",
-"Kléber Mesquida",
-"Pierre Forgues",
-"Yves Durand",
-"",
-"",
-"Gilbert Mathon",
-"Marcel Rogemont",
-"Dominique Raimbourg",
-"Marie-Line Reynaud",
-"Catherine Quéré",
-"Michel Issindou",
-"Jean-René Marsac",
-"Annick Le Loch",
-"Jean-Jacques Urvoas",
-"Bernard Lesterlin",
-"Jean Mallot",
-"",
-"",
-"",
-"",
-"",
-"Françoise Olivier-Coupeau",
-"Jean Glavany",
-"Catherine Génisson",
-"François Lamy",
-"André Vallini",
-"Michel Pajon",
-"Marylise Lebranchu",
-"Henri Emmanuelli",
-"Christian Paul",
-"Arnaud Montebourg",
-"Jean-Jack Queyranne",
-"Victorin Lurel",
-"Michel Sapin",
-"Jean-Pierre Kucheida",
-"Jean-Marc Ayrault",
-"François Hollande",
-"Bernard Roman",
-"Odette Duriez",
-"Albert Facon",
-"Michel Lefait",
-"Jérôme Cahuzac",
-"Laurent Fabius",
-"Jean-Claude Perez",
-"Philippe Martin",
-"Michel Sainte-Marie",
-"François Brottes",
-"Pierre Bourguignon",
-"",
-"Alain Néri",
-"Sylvie Andrieux",
-"Didier Mathus",
-"Claude Bartolone",
-"François Loncle",
-"Jean-Claude Leroy",
-"Bernard Derosier",
-"",
-"Odile Saugues",
-"Conchita Lacuey",
-"Françoise Imbert",
-"Michel Delebarre",
-"Geneviève Gaillard",
-"",
-"Pascale Crozon",
-"Philippe Vuilque",
-"Laurent Cathala",
-"Jean-Michel Boucheron",
-"Patrick Lemasle",
-"Jean-Louis Idiart",
-"Pierre Cohen",
-"Michel Destot",
-"Henri Nayrou",
-"",
-"Aurélie Filippetti",
-"Serge Blisko",
-"Jérôme Lambert",
-"Pierre-Alain Muet",
-"Patrick Roy",
-"Michel Liebgott",
-"Philippe Tourtelier",
-"Jean-Claude Viollet",
-"René Dosière",
-"Bernard Cazeneuve",
-"",
-"Jean-Louis Dumont",
-"Apeleto Albert Likuvalu",
-"Marietta Karamanli",
-"Jean-Louis Touraine",
-"Jean-Claude Fruteau",
-"",
-"",
-"Régis Juanico",
-"Corinne Erhel",
-"Guillaume Garot",
-"Jean-Michel Villaumé",
-"Geneviève Fioraso",
-"Frédérique Massat",
-"Marie-Lou Marcel",
-"Martine Martinel",
-"Catherine Lemorton",
-"Jacques Valax",
-"Patrick Lebreton",
-"",
-"André Gerin",
-"Jean-Paul Lecoq",
-"Pierre Gosnat",
-"",
-"Marie-Hélène Amiable",
-"Jacques Desallangre",
-"Jean-Jacques Candelier",
-"Jean-Pierre Brard",
-"Roland Muzeau",
-"Patrick Braouezec",
-"François Asensi",
-"Jean-Claude Sandrier",
-"Daniel Paul",
-"Michel Vaxès",
-"Jacqueline Fraysse",
-"Alfred Marie-Jeanne",
-"Alain Bocquet",
-"Marie-George Buffet",
-"André Chassaigne",
-"Maxime Gremetz",
-"Noël Mamère",
-"Huguette Bello",
-"",
-"Martine Billard",
-"Yves Cochet",
-"François de Rugy",
-"Marc Dolez",
-"Anny Poursinoff",
-"Michel Ménard",
-"",
-"Christian Hutin",
-"Gilbert Le Bris",
-"",
-"Alain Rodet",
-"Monique Boulestin",
-"Catherine Coutelle",
-"Jean-Michel Clément",
-"",
-"Gérard Charasse",
-"Christiane Taubira",
-"Paul Giacobbi",
-"",
-"Chantal Robin-Rodrigo",
-"Jeanny Marc",
-"Joël Giraud",
-"Annick Girardin",
-"",
-"Guy Delcourt",
-"Jacqueline Maquet",
-"Alain Cacheux",
-"Dominique Baert",
-"Jean-Luc Pérat",
-"Sylvia Pinel",
-"Chantal Berthelot",
-"Dominique Orliac",
-"",
-"Gilles Cocquempot",
-"Sandrine Hurel",
-"Christophe Bouillon",
-"",
-"Valérie Fourneyron",
-"Gisèle Biémouret",
-"Pascal Deguilhem",
-"Colette Langlade",
-"Marie-Noëlle Battistel",
-"",
-"Martine Faure",
-"Philippe Plisson",
-"Laurence Dumont",
-"Hervé Féron",
-"",
-"",
-"Christian Eckert",
-"Martine Pinville",
-"Guy Chambefort",
+{},
+{:id => "jean-marie-binetruy",:name => "Jean-Marie Binetruy"},
+{:id => "michel-raison",:name => "Michel Raison"},
+{:id => "cecile-gallez",:name => "Cécile Gallez"},
+{},
+{:id => "christian-patria",:name => "Christian Patria"},
+{:id => "jean-paul-garraud",:name => "Jean-Paul Garraud"},
+{:id => "jean-francois-chossy",:name => "Jean-François Chossy"},
+{:id => "francoise-branget",:name => "Françoise Branget"},
+{:id => "pierre-lang",:name => "Pierre Lang"},
+{:id => "bernard-debre",:name => "Bernard Debré"},
+{:id => "philippe-armand-martin",:name => "Philippe Armand Martin"},
+{:id => "bernard-reynes",:name => "Bernard Reynès"},
+{:id => "patrick-labaune",:name => "Patrick Labaune"},
+{:id => "gabriel-biancheri",:name => "Gabriel Biancheri"},
+{:id => "etienne-mourrut",:name => "Étienne Mourrut"},
+{:id => "didier-julia",:name => "Didier Julia"},
+{:id => "jean-yves-bony",:name => "Jean-Yves Bony"},
+{:id => "franck-marlin",:name => "Franck Marlin"},
+{:id => "jean-louis-christ",:name => "Jean-Louis Christ"},
+{:id => "jacques-houssin",:name => "Jacques Houssin"},
+{:id => "bernard-depierre",:name => "Bernard Depierre"},
+{:id => "sylvia-bassot",:name => "Sylvia Bassot"},
+{:id => "gerard-menuel",:name => "Gérard Menuel"},
+{:id => "jean-claude-bouchet",:name => "Jean-Claude Bouchet"},
+{:id => "edwige-antier",:name => "Edwige Antier"},
+{:id => "jean-claude-beaulieu",:name => "Jean-Claude Beaulieu"},
+{:id => "jean-claude-mignon",:name => "Jean-Claude Mignon"},
+{:id => "michel-voisin",:name => "Michel Voisin"},
+{},
+{:id => "alain-marc",:name => "Alain Marc"},
+{:id => "patrice-calmejane",:name => "Patrice Calméjane"},
+{:id => "gerard-lorgeoux",:name => "Gérard Lorgeoux"},
+{:id => "camille-de-rocca-serra",:name => "Camille de Rocca Serra"},
+{},
+{:id => "jean-pierre-decool",:name => "Jean-Pierre Decool"},
+{:id => "marie-jo-zimmermann",:name => "Marie-Jo Zimmermann"},
+{},
+{:id => "jacques-lamblin",:name => "Jacques Lamblin"},
+{:id => "marie-christine-dalloz",:name => "Marie-Christine Dalloz"},
+{:id => "charles-de-la-verpilliere",:name => "Charles de La Verpillière"},
+{:id => "edouard-courtial",:name => "Édouard Courtial"},
+{},
+{:id => "alain-moyne-bressand",:name => "Alain Moyne-Bressand"},
+{:id => "gerard-voisin",:name => "Gérard Voisin"},
+{:id => "etienne-blanc",:name => "Étienne Blanc"},
+{},
+{:id => "jean-frederic-poisson",:name => "Jean-Frédéric Poisson"},
+{:id => "jacques-grosperrin",:name => "Jacques Grosperrin"},
+{:id => "vincent-descoeur",:name => "Vincent Descoeur"},
+{:id => "xavier-breton",:name => "Xavier Breton"},
+{:id => "christian-menard",:name => "Christian Ménard"},
+{:id => "lucien-degauchy",:name => "Lucien Degauchy"},
+{:id => "christian-vanneste",:name => "Christian Vanneste"},
+{:id => "marc-le-fur",:name => "Marc Le Fur"},
+{},
+{:id => "jean-pierre-marcon",:name => "Jean-Pierre Marcon"},
+{:id => "andre-wojciechowski",:name => "André Wojciechowski"},
+{:id => "jean-philippe-maurer",:name => "Jean-Philippe Maurer"},
+{:id => "michel-lezeau",:name => "Michel Lezeau"},
+{:id => "jean-auclair",:name => "Jean Auclair"},
+{},
+{:id => "daniel-fasquelle",:name => "Daniel Fasquelle"},
+{:id => "olivier-carre",:name => "Olivier Carré"},
+{:id => "david-douillet",:name => "David Douillet"},
+{},
+{:id => "veronique-besse",:name => "Véronique Besse"},
+{:id => "francois-xavier-villain",:name => "François-Xavier Villain"},
+{:id => "nicolas-dupont-aignan",:name => "Nicolas Dupont-Aignan"},
+{},
+{:id => "francois-bayrou",:name => "François Bayrou"},
+{:id => "jean-lassalle",:name => "Jean Lassalle"},
+{:id => "dominique-souchet",:name => "Dominique Souchet"},
+{:id => "abdoulatifou-aly",:name => "Abdoulatifou Aly"},
+{},
+{:id => "jean-pierre-grand",:name => "Jean-Pierre Grand"},
+{:id => "richard-mallie",:name => "Richard Mallié"},
+{:id => "bernard-accoyer",:name => "Bernard Accoyer"},
+{:id => "herve-mariton",:name => "Hervé Mariton"},
+{:id => "yves-censi",:name => "Yves Censi"},
+{:id => "jean-roatta",:name => "Jean Roatta"},
+{:id => "jean-tiberi",:name => "Jean Tiberi"},
+{:id => "catherine-vautrin",:name => "Catherine Vautrin"},
+{:id => "dominique-perben",:name => "Dominique Perben"},
+{:id => "jacques-pelissard",:name => "Jacques Pélissard"},
+{:id => "daniel-poulou",:name => "Daniel Poulou"},
+{:id => "marie-anne-montchamp",:name => "Marie-Anne Montchamp"},
+{:id => "nicole-ameline",:name => "Nicole Ameline"},
+{:id => "xavier-bertrand",:name => "Xavier Bertrand"},
+{:id => "georges-mothron",:name => "Georges Mothron"},
+{:id => "christian-jacob",:name => "Christian Jacob"},
+{:id => "jacques-kossowski",:name => "Jacques Kossowski"},
+{:id => "berengere-poletti",:name => "Bérengère Poletti"},
+{:id => "thierry-mariani",:name => "Thierry Mariani"},
+{:id => "francois-cornut-gentille",:name => "François Cornut-Gentille"},
+{:id => "jerome-chartier",:name => "Jérôme Chartier"},
+{:id => "renaud-muselier",:name => "Renaud Muselier"},
+{:id => "philippe-briand",:name => "Philippe Briand"},
+{:id => "michele-tabarot",:name => "Michèle Tabarot"},
+{:id => "jean-francois-cope",:name => "Jean-François Copé"},
+{:id => "yves-deniaud",:name => "Yves Deniaud"},
+{:id => "jean-francois-lamour",:name => "Jean-François Lamour"},
+{:id => "jean-pierre-giran",:name => "Jean-Pierre Giran"},
+{:id => "bernard-brochand",:name => "Bernard Brochand"},
+{:id => "chantal-brunel",:name => "Chantal Brunel"},
+{:id => "jean-michel-ferrand",:name => "Jean-Michel Ferrand"},
+{:id => "jerome-bignon",:name => "Jérôme Bignon"},
+{},
+{:id => "michel-terrot",:name => "Michel Terrot"},
+{:id => "jean-marc-lefranc",:name => "Jean-Marc Lefranc"},
+{:id => "michel-buillard",:name => "Michel Buillard"},
+{:id => "rene-paul-victoria",:name => "René-Paul Victoria"},
+{:id => "roland-blum",:name => "Roland Blum"},
+{:id => "jean-yves-besselat",:name => "Jean-Yves Besselat"},
+{:id => "jean-pierre-dupont",:name => "Jean-Pierre Dupont"},
+{},
+{:id => "daniel-spagnou",:name => "Daniel Spagnou"},
+{:id => "jean-jacques-gaultier",:name => "Jean-Jacques Gaultier"},
+{:id => "michel-heinrich",:name => "Michel Heinrich"},
+{:id => "gerard-cherpion",:name => "Gérard Cherpion"},
+{:id => "jacques-le-guen",:name => "Jacques Le Guen"},
+{},
+{:id => "guy-malherbe",:name => "Guy Malherbe"},
+{:id => "alfred-almont",:name => "Alfred Almont"},
+{:id => "gilles-d-ettore",:name => "Gilles d'Ettore"},
+{:id => "patrice-martin-lalande",:name => "Patrice Martin-Lalande"},
+{:id => "marc-francina",:name => "Marc Francina"},
+{:id => "gabrielle-louis-carabin",:name => "Gabrielle Louis-Carabin"},
+{:id => "michel-diefenbacher",:name => "Michel Diefenbacher"},
+{:id => "marguerite-lamour",:name => "Marguerite Lamour"},
+{:id => "jacques-domergue",:name => "Jacques Domergue"},
+{},
+{:id => "eric-ciotti",:name => "Éric Ciotti"},
+{:id => "franck-gilard",:name => "Franck Gilard"},
+{:id => "elie-aboud",:name => "Élie Aboud"},
+{:id => "denis-jacquat",:name => "Denis Jacquat"},
+{:id => "andre-flajolet",:name => "André Flajolet"},
+{:id => "pierre-morel-a-l-huissier",:name => "Pierre Morel-A-L'Huissier"},
+{:id => "charles-ange-ginesy",:name => "Charles-Ange Ginesy"},
+{:id => "philippe-meunier",:name => "Philippe Meunier"},
+{:id => "max-roustan",:name => "Max Roustan"},
+{:id => "daniel-fidelin",:name => "Daniel Fidelin"},
+{},
+{:id => "michel-grall",:name => "Michel Grall"},
+{:id => "valerie-rosso-debord",:name => "Valérie Rosso-Debord"},
+{:id => "fernand-sire",:name => "Fernand Siré"},
+{:id => "francois-calvet",:name => "François Calvet"},
+{:id => "daniel-mach",:name => "Daniel Mach"},
+{:id => "daniel-garrigue",:name => "Daniel Garrigue"},
+{:id => "guenhael-huet",:name => "Guénhaël Huet"},
+{:id => "philippe-gosselin",:name => "Philippe Gosselin"},
+{:id => "christine-marin",:name => "Christine Marin"},
+{:id => "didier-gonzales",:name => "Didier Gonzales"},
+{:id => "francoise-guegot",:name => "Françoise Guégot"},
+{:id => "michel-havard",:name => "Michel Havard"},
+{:id => "marianne-dubois",:name => "Marianne Dubois"},
+{:id => "philippe-morenvillier",:name => "Philippe Morenvillier"},
+{:id => "lionel-tardy",:name => "Lionel Tardy"},
+{:id => "jacqueline-irles",:name => "Jacqueline Irles"},
+{},
+{},
+{},
+{:id => "francois-loos",:name => "François Loos"},
+{:id => "antoine-herth",:name => "Antoine Herth"},
+{:id => "andre-schneider",:name => "André Schneider"},
+{:id => "jean-jacques-guillet",:name => "Jean-Jacques Guillet"},
+{:id => "jean-luc-reitzer",:name => "Jean-Luc Reitzer"},
+{:id => "jean-ueberschlag",:name => "Jean Ueberschlag"},
+{:id => "guy-teissier",:name => "Guy Teissier"},
+{:id => "pierre-cardo",:name => "Pierre Cardo"},
+{:id => "herve-gaymard",:name => "Hervé Gaymard"},
+{:id => "jean-michel-couve",:name => "Jean-Michel Couve"},
+{:id => "claude-goasguen",:name => "Claude Goasguen"},
+{:id => "rene-couanau",:name => "René Couanau"},
+{:id => "francois-baroin",:name => "François Baroin"},
+{:id => "alain-cousin",:name => "Alain Cousin"},
+{:id => "gilles-carrez",:name => "Gilles Carrez"},
+{:id => "francoise-de-panafieu",:name => "Françoise de Panafieu"},
+{:id => "yves-bur",:name => "Yves Bur"},
+{:id => "jean-luc-warsmann",:name => "Jean-Luc Warsmann"},
+{:id => "patrick-ollier",:name => "Patrick Ollier"},
+{:id => "jean-leonetti",:name => "Jean Leonetti"},
+{:id => "martine-aurillac",:name => "Martine Aurillac"},
+{:id => "christian-kert",:name => "Christian Kert"},
+{:id => "yves-jego",:name => "Yves Jego"},
+{:id => "michel-bouvard",:name => "Michel Bouvard"},
+{:id => "pierre-mehaignerie",:name => "Pierre Méhaignerie"},
+{:id => "jean-claude-guibal",:name => "Jean-Claude Guibal"},
+{:id => "brigitte-bareges",:name => "Brigitte Barèges"},
+{:id => "jean-pierre-soisson",:name => "Jean-Pierre Soisson"},
+{:id => "serge-grouard",:name => "Serge Grouard"},
+{:id => "jean-louis-bernard",:name => "Jean-Louis Bernard"},
+{:id => "marie-josee-roig",:name => "Marie-Josée Roig"},
+{:id => "emile-blessig",:name => "Émile Blessig"},
+{},
+{:id => "jean-paul-anciaux",:name => "Jean-Paul Anciaux"},
+{:id => "dino-cinieri",:name => "Dino Cinieri"},
+{:id => "chantal-bourrague",:name => "Chantal Bourragué"},
+{:id => "guy-geoffroy",:name => "Guy Geoffroy"},
+{:id => "henriette-martinez",:name => "Henriette Martinez"},
+{:id => "sebastien-huyghe",:name => "Sébastien Huyghe"},
+{:id => "patrick-beaudouin",:name => "Patrick Beaudouin"},
+{},
+{:id => "bernard-perrut",:name => "Bernard Perrut"},
+{:id => "manuel-aeschlimann",:name => "Manuel Aeschlimann"},
+{:id => "dominique-le-mener",:name => "Dominique Le Mèner"},
+{:id => "jean-louis-leonard",:name => "Jean-Louis Léonard"},
+{:id => "muriel-marland-militello",:name => "Muriel Marland-Militello"},
+{},
+{:id => "guy-lefrand",:name => "Guy Lefrand"},
+{:id => "genevieve-colot",:name => "Geneviève Colot"},
+{:id => "michel-lejeune",:name => "Michel Lejeune"},
+{:id => "robert-lecou",:name => "Robert Lecou"},
+{:id => "louis-guedon",:name => "Louis Guédon"},
+{:id => "michel-zumkeller",:name => "Michel Zumkeller"},
+{:id => "francois-grosdidier",:name => "François Grosdidier"},
+{:id => "frederic-reiss",:name => "Frédéric Reiss"},
+{:id => "damien-meslot",:name => "Damien Meslot"},
+{},
+{:id => "beatrice-pavy",:name => "Béatrice Pavy"},
+{:id => "jean-claude-mathis",:name => "Jean-Claude Mathis"},
+{:id => "remi-delatte",:name => "Rémi Delatte"},
+{:id => "celeste-lett",:name => "Céleste Lett"},
+{:id => "valerie-boyer",:name => "Valérie Boyer"},
+{:id => "franck-riester",:name => "Franck Riester"},
+{:id => "yves-albarello",:name => "Yves Albarello"},
+{:id => "cecile-dumoulin",:name => "Cécile Dumoulin"},
+{:id => "francis-saint-leger",:name => "Francis Saint-Léger"},
+{:id => "marcel-bonnot",:name => "Marcel Bonnot"},
+{},
+{:id => "marie-louise-fort",:name => "Marie-Louise Fort"},
+{:id => "martial-saddier",:name => "Martial Saddier"},
+{:id => "philippe-goujon",:name => "Philippe Goujon"},
+{:id => "yves-vandewalle",:name => "Yves Vandewalle"},
+{:id => "eric-diard",:name => "Éric Diard"},
+{:id => "arnaud-robinet",:name => "Arnaud Robinet"},
+{:id => "isabelle-vasseur",:name => "Isabelle Vasseur"},
+{:id => "gael-yanno",:name => "Gaël Yanno"},
+{:id => "anne-grommerch",:name => "Anne Grommerch"},
+{:id => "nicolas-dhuicq",:name => "Nicolas Dhuicq"},
+{:id => "gerard-gaudron",:name => "Gérard Gaudron"},
+{:id => "franck-reynier",:name => "Franck Reynier"},
+{:id => "didier-robert",:name => "Didier Robert"},
+{:id => "jean-marie-morisset",:name => "Jean-Marie Morisset"},
+{:id => "sauveur-gandolfi-scheit",:name => "Sauveur Gandolfi-Scheit"},
+{:id => "dominique-tian",:name => "Dominique Tian"},
+{},
+{},
+{:id => "pascal-clement",:name => "Pascal Clément"},
+{:id => "yves-fromion",:name => "Yves Fromion"},
+{:id => "loic-bouvard",:name => "Loïc Bouvard"},
+{:id => "gerard-hamel",:name => "Gérard Hamel"},
+{},
+{:id => "bernard-deflesselles",:name => "Bernard Deflesselles"},
+{:id => "marc-laffineur",:name => "Marc Laffineur"},
+{:id => "francois-goulard",:name => "François Goulard"},
+{:id => "jean-bardet",:name => "Jean Bardet"},
+{:id => "jean-claude-lenoir",:name => "Jean-Claude Lenoir"},
+{:id => "francois-michel-gonnot",:name => "François-Michel Gonnot"},
+{:id => "michel-herbillon",:name => "Michel Herbillon"},
+{:id => "alain-gest",:name => "Alain Gest"},
+{:id => "claude-gatignol",:name => "Claude Gatignol"},
+{:id => "serge-poignant",:name => "Serge Poignant"},
+{:id => "claude-greff",:name => "Claude Greff"},
+{:id => "dominique-dord",:name => "Dominique Dord"},
+{:id => "yves-nicolin",:name => "Yves Nicolin"},
+{:id => "francoise-hostalier",:name => "Françoise Hostalier"},
+{:id => "didier-quentin",:name => "Didier Quentin"},
+{:id => "eric-raoult",:name => "Éric Raoult"},
+{:id => "pierre-lequiller",:name => "Pierre Lequiller"},
+{:id => "claude-birraux",:name => "Claude Birraux"},
+{:id => "philippe-cochet",:name => "Philippe Cochet"},
+{:id => "alfred-trassy-paillogues",:name => "Alfred Trassy-Paillogues"},
+{:id => "georges-tron",:name => "Georges Tron"},
+{:id => "joelle-ceccaldi-raynaud",:name => "Joëlle Ceccaldi-Raynaud"},
+{},
+{:id => "lionnel-luca",:name => "Lionnel Luca"},
+{:id => "pierre-frogier",:name => "Pierre Frogier"},
+{:id => "marc-bernier",:name => "Marc Bernier"},
+{:id => "jean-pierre-door",:name => "Jean-Pierre Door"},
+{:id => "arnaud-richard",:name => "Arnaud Richard"},
+{:id => "jean-pierre-nicolas",:name => "Jean-Pierre Nicolas"},
+{:id => "arlette-grosskost",:name => "Arlette Grosskost"},
+{},
+{:id => "dominique-caillaud",:name => "Dominique Caillaud"},
+{:id => "axel-poniatowski",:name => "Axel Poniatowski"},
+{:id => "louis-giscard-d-estaing",:name => "Louis Giscard d'Estaing"},
+{:id => "michel-piron",:name => "Michel Piron"},
+{:id => "jacques-alain-benisti",:name => "Jacques Alain Bénisti"},
+{},
+{:id => "francois-scellier",:name => "François Scellier"},
+{:id => "pierre-christophe-baguet",:name => "Pierre-Christophe Baguet"},
+{:id => "jacques-myard",:name => "Jacques Myard"},
+{:id => "jean-claude-flory",:name => "Jean-Claude Flory"},
+{:id => "alain-suguenot",:name => "Alain Suguenot"},
+{:id => "maryse-joissains-masini",:name => "Maryse Joissains-Masini"},
+{:id => "louis-cosyns",:name => "Louis Cosyns"},
+{:id => "alain-ferry",:name => "Alain Ferry"},
+{:id => "bruno-bourg-broc",:name => "Bruno Bourg-Broc"},
+{},
+{:id => "jean-marie-rolland",:name => "Jean-Marie Rolland"},
+{:id => "michel-sordi",:name => "Michel Sordi"},
+{:id => "jean-marc-roubaud",:name => "Jean-Marc Roubaud"},
+{:id => "georges-siffredi",:name => "Georges Siffredi"},
+{:id => "christophe-priou",:name => "Christophe Priou"},
+{:id => "yanick-paternotte",:name => "Yanick Paternotte"},
+{:id => "gilles-bourdouleix",:name => "Gilles Bourdouleix"},
+{:id => "sophie-delong",:name => "Sophie Delong"},
+{:id => "eric-straumann",:name => "Éric Straumann"},
+{:id => "jean-marie-sermier",:name => "Jean-Marie Sermier"},
+{},
+{:id => "jean-grenet",:name => "Jean Grenet"},
+{:id => "genevieve-levy",:name => "Geneviève Levy"},
+{:id => "georges-ginesta",:name => "Georges Ginesta"},
+{:id => "josette-pons",:name => "Josette Pons"},
+{:id => "jean-sebastien-vialatte",:name => "Jean-Sébastien Vialatte"},
+{},
+{:id => "alain-marty",:name => "Alain Marty"},
+{:id => "claude-bodin",:name => "Claude Bodin"},
+{:id => "philippe-boennec",:name => "Philippe Boënnec"},
+{:id => "paul-jeanneteau",:name => "Paul Jeanneteau"},
+{:id => "fabienne-labrette-menager",:name => "Fabienne Labrette-Ménager"},
+{:id => "laure-de-la-raudiere",:name => "Laure de La Raudière"},
+{:id => "bruno-sandras",:name => "Bruno Sandras"},
+{:id => "bernard-gerard",:name => "Bernard Gérard"},
+{:id => "patrice-verchere",:name => "Patrice Verchère"},
+{:id => "bertrand-pancher",:name => "Bertrand Pancher"},
+{:id => "philippe-vitel",:name => "Philippe Vitel"},
+{},
+{:id => "etienne-pinte",:name => "Étienne Pinte"},
+{:id => "jean-claude-thomas",:name => "Jean-Claude Thomas"},
+{:id => "jean-proriol",:name => "Jean Proriol"},
+{:id => "pierre-morange",:name => "Pierre Morange"},
+{:id => "pierre-lasbordes",:name => "Pierre Lasbordes"},
+{:id => "thierry-lazaro",:name => "Thierry Lazaro"},
+{:id => "jacques-le-nay",:name => "Jacques Le Nay"},
+{:id => "jean-marc-nesme",:name => "Jean-Marc Nesme"},
+{:id => "philippe-houillon",:name => "Philippe Houillon"},
+{:id => "henri-plagnol",:name => "Henri Plagnol"},
+{:id => "yannick-favennec",:name => "Yannick Favennec"},
+{:id => "jean-pierre-gorges",:name => "Jean-Pierre Gorges"},
+{:id => "francois-vannson",:name => "François Vannson"},
+{:id => "olivier-dassault",:name => "Olivier Dassault"},
+{:id => "jean-michel-fourgous",:name => "Jean-Michel Fourgous"},
+{:id => "nicolas-forissier",:name => "Nicolas Forissier"},
+{:id => "laurent-henart",:name => "Laurent Hénart"},
+{:id => "marc-philippe-daubresse",:name => "Marc-Philippe Daubresse"},
+{:id => "georges-colombier",:name => "Georges Colombier"},
+{:id => "bernard-carayon",:name => "Bernard Carayon"},
+{:id => "christophe-guilloteau",:name => "Christophe Guilloteau"},
+{:id => "jean-charles-taugourdeau",:name => "Jean-Charles Taugourdeau"},
+{:id => "francoise-briand",:name => "Françoise Briand"},
+{:id => "philippe-nauche",:name => "Philippe Nauche"},
+{:id => "michel-vergnier",:name => "Michel Vergnier"},
+{:id => "alain-vidalies",:name => "Alain Vidalies"},
+{},
+{:id => "jacques-remiller",:name => "Jacques Remiller"},
+{:id => "richard-dell-agnola",:name => "Richard Dell'Agnola"},
+{:id => "patrick-balkany",:name => "Patrick Balkany"},
+{:id => "patrice-debray",:name => "Patrice Debray"},
+{:id => "daniel-boisserie",:name => "Daniel Boisserie"},
+{:id => "martine-carrillon-couvreur",:name => "Martine Carrillon-Couvreur"},
+{:id => "jean-pierre-dufau",:name => "Jean-Pierre Dufau"},
+{},
+{:id => "francois-sauvadet",:name => "François Sauvadet"},
+{:id => "andre-santini",:name => "André Santini"},
+{:id => "rudy-salles",:name => "Rudy Salles"},
+{:id => "jean-christophe-lagarde",:name => "Jean-Christophe Lagarde"},
+{:id => "francois-rochebloine",:name => "François Rochebloine"},
+{},
+{:id => "francoise-de-salvador",:name => "Françoise De Salvador"},
+{:id => "frederic-cuvillier",:name => "Frédéric Cuvillier"},
+{:id => "jean-grellier",:name => "Jean Grellier"},
+{:id => "delphine-batho",:name => "Delphine Batho"},
+{:id => "herve-de-charette",:name => "Hervé de Charette"},
+{:id => "nicolas-perruchot",:name => "Nicolas Perruchot"},
+{:id => "charles-de-courson",:name => "Charles de Courson"},
+{:id => "maurice-leroy",:name => "Maurice Leroy"},
+{:id => "francis-vercamer",:name => "Francis Vercamer"},
+{},
+{:id => "marie-odile-bouille",:name => "Marie-Odile Bouillé"},
+{:id => "olivier-dussopt",:name => "Olivier Dussopt"},
+{:id => "pascale-got",:name => "Pascale Got"},
+{:id => "michele-delaunay",:name => "Michèle Delaunay"},
+{:id => "yvan-lachaud",:name => "Yvan Lachaud"},
+{:id => "jean-pierre-abelin",:name => "Jean-Pierre Abelin"},
+{:id => "michel-hunault",:name => "Michel Hunault"},
+{:id => "stephane-demilly",:name => "Stéphane Demilly"},
+{:id => "philippe-folliot",:name => "Philippe Folliot"},
+{:id => "philippe-vigier",:name => "Philippe Vigier"},
+{},
+{:id => "marc-vampa",:name => "Marc Vampa"},
+{:id => "raymond-durand",:name => "Raymond Durand"},
+{:id => "jean-louis-gagnaire",:name => "Jean-Louis Gagnaire"},
+{:id => "henri-jibrayel",:name => "Henri Jibrayel"},
+{:id => "jean-patrick-gille",:name => "Jean-Patrick Gille"},
+{},
+{:id => "jean-dionis-du-sejour",:name => "Jean Dionis du Séjour"},
+{:id => "jean-luc-preel",:name => "Jean-Luc Préel"},
+{:id => "francis-hillmeyer",:name => "Francis Hillmeyer"},
+{:id => "olivier-jarde",:name => "Olivier Jardé"},
+{:id => "claude-leteurtre",:name => "Claude Leteurtre"},
+{:id => "thierry-benoit",:name => "Thierry Benoit"},
+{:id => "colette-le-moal",:name => "Colette Le Moal"},
+{:id => "francois-deluga",:name => "François Deluga"},
+{:id => "christophe-sirugue",:name => "Christophe Sirugue"},
+{:id => "marc-goua",:name => "Marc Goua"},
+{:id => "daniel-goldberg",:name => "Daniel Goldberg"},
+{},
+{:id => "serge-letchimy",:name => "Serge Letchimy"},
+{:id => "martine-lignieres-cassou",:name => "Martine Lignières-Cassou"},
+{:id => "jean-paul-bacquet",:name => "Jean-Paul Bacquet"},
+{:id => "elisabeth-guigou",:name => "Élisabeth Guigou"},
+{:id => "marie-francoise-clergeau",:name => "Marie-Françoise Clergeau"},
+{:id => "pascal-terrasse",:name => "Pascal Terrasse"},
+{:id => "jean-louis-bianco",:name => "Jean-Louis Bianco"},
+{:id => "julien-dray",:name => "Julien Dray"},
+{:id => "michel-vauzelle",:name => "Michel Vauzelle"},
+{:id => "alain-rousset",:name => "Alain Rousset"},
+{:id => "jack-lang",:name => "Jack Lang"},
+{:id => "tony-dreyfus",:name => "Tony Dreyfus"},
+{:id => "bruno-le-roux",:name => "Bruno Le Roux"},
+{:id => "daniele-hoffman-rispal",:name => "Danièle Hoffman-Rispal"},
+{:id => "gaetan-gorce",:name => "Gaëtan Gorce"},
+{:id => "patricia-adam",:name => "Patricia Adam"},
+{:id => "manuel-valls",:name => "Manuel Valls"},
+{:id => "alain-claeys",:name => "Alain Claeys"},
+{:id => "daniel-vaillant",:name => "Daniel Vaillant"},
+{:id => "marie-francoise-perol-dumont",:name => "Marie-Françoise Pérol-Dumont"},
+{:id => "sandrine-mazetier",:name => "Sandrine Mazetier"},
+{:id => "pierre-moscovici",:name => "Pierre Moscovici"},
+{:id => "jean-christophe-cambadelis",:name => "Jean-Christophe Cambadélis"},
+{:id => "marisol-touraine",:name => "Marisol Touraine"},
+{:id => "jean-marie-le-guen",:name => "Jean-Marie Le Guen"},
+{:id => "christian-bataille",:name => "Christian Bataille"},
+{},
+{:id => "marie-renee-oget",:name => "Marie-Renée Oget"},
+{:id => "gerard-bapt",:name => "Gérard Bapt"},
+{:id => "jean-pierre-balligand",:name => "Jean-Pierre Balligand"},
+{:id => "philippe-duron",:name => "Philippe Duron"},
+{:id => "francois-pupponi",:name => "François Pupponi"},
+{:id => "danielle-bousquet",:name => "Danielle Bousquet"},
+{:id => "serge-janquin",:name => "Serge Janquin"},
+{},
+{:id => "germinal-peiro",:name => "Germinal Peiro"},
+{:id => "jean-michel",:name => "Jean Michel"},
+{:id => "david-habib",:name => "David Habib"},
+{:id => "jean-yves-le-deaut",:name => "Jean-Yves Le Déaut"},
+{:id => "christophe-caresche",:name => "Christophe Caresche"},
+{},
+{:id => "annick-lepetit",:name => "Annick Lepetit"},
+{:id => "george-pau-langevin",:name => "George Pau-Langevin"},
+{:id => "jean-yves-le-bouillonnec",:name => "Jean-Yves Le Bouillonnec"},
+{:id => "patrick-bloche",:name => "Patrick Bloche"},
+{:id => "jacques-bascou",:name => "Jacques Bascou"},
+{:id => "jean-paul-dupre",:name => "Jean-Paul Dupré"},
+{:id => "maxime-bono",:name => "Maxime Bono"},
+{:id => "michel-francaix",:name => "Michel Françaix"},
+{:id => "thierry-carcenac",:name => "Thierry Carcenac"},
+{},
+{:id => "claude-darciaux",:name => "Claude Darciaux"},
+{:id => "jean-paul-chanteguet",:name => "Jean-Paul Chanteguet"},
+{:id => "andre-vezinhet",:name => "André Vézinhet"},
+{:id => "monique-iborra",:name => "Monique Iborra"},
+{:id => "simon-renucci",:name => "Simon Renucci"},
+{:id => "william-dumas",:name => "William Dumas"},
+{:id => "louis-joseph-manscour",:name => "Louis-Joseph Manscour"},
+{:id => "rene-rouquet",:name => "René Rouquet"},
+{:id => "eric-jalton",:name => "Éric Jalton"},
+{:id => "jean-launay",:name => "Jean Launay"},
+{},
+{:id => "jean-gaubert",:name => "Jean Gaubert"},
+{:id => "armand-jung",:name => "Armand Jung"},
+{:id => "kleber-mesquida",:name => "Kléber Mesquida"},
+{:id => "pierre-forgues",:name => "Pierre Forgues"},
+{:id => "yves-durand",:name => "Yves Durand"},
+{},
+{},
+{:id => "gilbert-mathon",:name => "Gilbert Mathon"},
+{:id => "marcel-rogemont",:name => "Marcel Rogemont"},
+{:id => "dominique-raimbourg",:name => "Dominique Raimbourg"},
+{:id => "marie-line-reynaud",:name => "Marie-Line Reynaud"},
+{:id => "catherine-quere",:name => "Catherine Quéré"},
+{:id => "michel-issindou",:name => "Michel Issindou"},
+{:id => "jean-rene-marsac",:name => "Jean-René Marsac"},
+{:id => "annick-le-loch",:name => "Annick Le Loch"},
+{:id => "jean-jacques-urvoas",:name => "Jean-Jacques Urvoas"},
+{:id => "bernard-lesterlin",:name => "Bernard Lesterlin"},
+{:id => "jean-mallot",:name => "Jean Mallot"},
+{},
+{},
+{},
+{},
+{},
+{:id => "francoise-olivier-coupeau",:name => "Françoise Olivier-Coupeau"},
+{:id => "jean-glavany",:name => "Jean Glavany"},
+{:id => "catherine-genisson",:name => "Catherine Génisson"},
+{:id => "francois-lamy",:name => "François Lamy"},
+{:id => "andre-vallini",:name => "André Vallini"},
+{:id => "michel-pajon",:name => "Michel Pajon"},
+{:id => "marylise-lebranchu",:name => "Marylise Lebranchu"},
+{:id => "henri-emmanuelli",:name => "Henri Emmanuelli"},
+{:id => "christian-paul",:name => "Christian Paul"},
+{:id => "arnaud-montebourg",:name => "Arnaud Montebourg"},
+{:id => "jean-jack-queyranne",:name => "Jean-Jack Queyranne"},
+{:id => "victorin-lurel",:name => "Victorin Lurel"},
+{:id => "michel-sapin",:name => "Michel Sapin"},
+{:id => "jean-pierre-kucheida",:name => "Jean-Pierre Kucheida"},
+{:id => "jean-marc-ayrault",:name => "Jean-Marc Ayrault"},
+{:id => "francois-hollande",:name => "François Hollande"},
+{:id => "bernard-roman",:name => "Bernard Roman"},
+{:id => "odette-duriez",:name => "Odette Duriez"},
+{:id => "albert-facon",:name => "Albert Facon"},
+{:id => "michel-lefait",:name => "Michel Lefait"},
+{:id => "jerome-cahuzac",:name => "Jérôme Cahuzac"},
+{:id => "laurent-fabius",:name => "Laurent Fabius"},
+{:id => "jean-claude-perez",:name => "Jean-Claude Perez"},
+{:id => "philippe-martin",:name => "Philippe Martin"},
+{:id => "michel-sainte-marie",:name => "Michel Sainte-Marie"},
+{:id => "francois-brottes",:name => "François Brottes"},
+{:id => "pierre-bourguignon",:name => "Pierre Bourguignon"},
+{},
+{:id => "alain-neri",:name => "Alain Néri"},
+{:id => "sylvie-andrieux",:name => "Sylvie Andrieux"},
+{:id => "didier-mathus",:name => "Didier Mathus"},
+{:id => "claude-bartolone",:name => "Claude Bartolone"},
+{:id => "francois-loncle",:name => "François Loncle"},
+{:id => "jean-claude-leroy",:name => "Jean-Claude Leroy"},
+{:id => "bernard-derosier",:name => "Bernard Derosier"},
+{},
+{:id => "odile-saugues",:name => "Odile Saugues"},
+{:id => "conchita-lacuey",:name => "Conchita Lacuey"},
+{:id => "francoise-imbert",:name => "Françoise Imbert"},
+{:id => "michel-delebarre",:name => "Michel Delebarre"},
+{:id => "genevieve-gaillard",:name => "Geneviève Gaillard"},
+{},
+{:id => "pascale-crozon",:name => "Pascale Crozon"},
+{:id => "philippe-vuilque",:name => "Philippe Vuilque"},
+{:id => "laurent-cathala",:name => "Laurent Cathala"},
+{:id => "jean-michel-boucheron",:name => "Jean-Michel Boucheron"},
+{:id => "patrick-lemasle",:name => "Patrick Lemasle"},
+{:id => "jean-louis-idiart",:name => "Jean-Louis Idiart"},
+{:id => "pierre-cohen",:name => "Pierre Cohen"},
+{:id => "michel-destot",:name => "Michel Destot"},
+{:id => "henri-nayrou",:name => "Henri Nayrou"},
+{},
+{:id => "aurelie-filippetti",:name => "Aurélie Filippetti"},
+{:id => "serge-blisko",:name => "Serge Blisko"},
+{:id => "jerome-lambert",:name => "Jérôme Lambert"},
+{:id => "pierre-alain-muet",:name => "Pierre-Alain Muet"},
+{:id => "patrick-roy",:name => "Patrick Roy"},
+{:id => "michel-liebgott",:name => "Michel Liebgott"},
+{:id => "philippe-tourtelier",:name => "Philippe Tourtelier"},
+{:id => "jean-claude-viollet",:name => "Jean-Claude Viollet"},
+{:id => "rene-dosiere",:name => "René Dosière"},
+{:id => "bernard-cazeneuve",:name => "Bernard Cazeneuve"},
+{},
+{:id => "jean-louis-dumont",:name => "Jean-Louis Dumont"},
+{:id => "apeleto-albert-likuvalu",:name => "Apeleto Albert Likuvalu"},
+{:id => "marietta-karamanli",:name => "Marietta Karamanli"},
+{:id => "jean-louis-touraine",:name => "Jean-Louis Touraine"},
+{:id => "jean-claude-fruteau",:name => "Jean-Claude Fruteau"},
+{},
+{},
+{:id => "regis-juanico",:name => "Régis Juanico"},
+{:id => "corinne-erhel",:name => "Corinne Erhel"},
+{:id => "guillaume-garot",:name => "Guillaume Garot"},
+{:id => "jean-michel-villaume",:name => "Jean-Michel Villaumé"},
+{:id => "genevieve-fioraso",:name => "Geneviève Fioraso"},
+{:id => "frederique-massat",:name => "Frédérique Massat"},
+{:id => "marie-lou-marcel",:name => "Marie-Lou Marcel"},
+{:id => "martine-martinel",:name => "Martine Martinel"},
+{:id => "catherine-lemorton",:name => "Catherine Lemorton"},
+{:id => "jacques-valax",:name => "Jacques Valax"},
+{:id => "patrick-lebreton",:name => "Patrick Lebreton"},
+{},
+{:id => "andre-gerin",:name => "André Gerin"},
+{:id => "jean-paul-lecoq",:name => "Jean-Paul Lecoq"},
+{:id => "pierre-gosnat",:name => "Pierre Gosnat"},
+{},
+{:id => "marie-helene-amiable",:name => "Marie-Hélène Amiable"},
+{:id => "jacques-desallangre",:name => "Jacques Desallangre"},
+{:id => "jean-jacques-candelier",:name => "Jean-Jacques Candelier"},
+{:id => "jean-pierre-brard",:name => "Jean-Pierre Brard"},
+{:id => "roland-muzeau",:name => "Roland Muzeau"},
+{:id => "patrick-braouezec",:name => "Patrick Braouezec"},
+{:id => "francois-asensi",:name => "François Asensi"},
+{:id => "jean-claude-sandrier",:name => "Jean-Claude Sandrier"},
+{:id => "daniel-paul",:name => "Daniel Paul"},
+{:id => "michel-vaxes",:name => "Michel Vaxès"},
+{:id => "jacqueline-fraysse",:name => "Jacqueline Fraysse"},
+{:id => "alfred-marie-jeanne",:name => "Alfred Marie-Jeanne"},
+{:id => "alain-bocquet",:name => "Alain Bocquet"},
+{:id => "marie-george-buffet",:name => "Marie-George Buffet"},
+{:id => "andre-chassaigne",:name => "André Chassaigne"},
+{:id => "maxime-gremetz",:name => "Maxime Gremetz"},
+{:id => "noel-mamere",:name => "Noël Mamère"},
+{:id => "huguette-bello",:name => "Huguette Bello"},
+{},
+{:id => "martine-billard",:name => "Martine Billard"},
+{:id => "yves-cochet",:name => "Yves Cochet"},
+{:id => "francois-de-rugy",:name => "François de Rugy"},
+{:id => "marc-dolez",:name => "Marc Dolez"},
+{:id => "anny-poursinoff",:name => "Anny Poursinoff"},
+{:id => "michel-menard",:name => "Michel Ménard"},
+{},
+{:id => "christian-hutin",:name => "Christian Hutin"},
+{:id => "gilbert-le-bris",:name => "Gilbert Le Bris"},
+{},
+{:id => "alain-rodet",:name => "Alain Rodet"},
+{:id => "monique-boulestin",:name => "Monique Boulestin"},
+{:id => "catherine-coutelle",:name => "Catherine Coutelle"},
+{:id => "jean-michel-clement",:name => "Jean-Michel Clément"},
+{},
+{:id => "gerard-charasse",:name => "Gérard Charasse"},
+{:id => "christiane-taubira",:name => "Christiane Taubira"},
+{:id => "paul-giacobbi",:name => "Paul Giacobbi"},
+{},
+{:id => "chantal-robin-rodrigo",:name => "Chantal Robin-Rodrigo"},
+{:id => "jeanny-marc",:name => "Jeanny Marc"},
+{:id => "joel-giraud",:name => "Joël Giraud"},
+{:id => "annick-girardin",:name => "Annick Girardin"},
+{},
+{:id => "guy-delcourt",:name => "Guy Delcourt"},
+{:id => "jacqueline-maquet",:name => "Jacqueline Maquet"},
+{:id => "alain-cacheux",:name => "Alain Cacheux"},
+{:id => "dominique-baert",:name => "Dominique Baert"},
+{:id => "jean-luc-perat",:name => "Jean-Luc Pérat"},
+{:id => "sylvia-pinel",:name => "Sylvia Pinel"},
+{:id => "chantal-berthelot",:name => "Chantal Berthelot"},
+{:id => "dominique-orliac",:name => "Dominique Orliac"},
+{},
+{:id => "gilles-cocquempot",:name => "Gilles Cocquempot"},
+{:id => "sandrine-hurel",:name => "Sandrine Hurel"},
+{:id => "christophe-bouillon",:name => "Christophe Bouillon"},
+{},
+{:id => "valerie-fourneyron",:name => "Valérie Fourneyron"},
+{:id => "gisele-biemouret",:name => "Gisèle Biémouret"},
+{:id => "pascal-deguilhem",:name => "Pascal Deguilhem"},
+{:id => "colette-langlade",:name => "Colette Langlade"},
+{:id => "marie-noelle-battistel",:name => "Marie-Noëlle Battistel"},
+{},
+{:id => "martine-faure",:name => "Martine Faure"},
+{:id => "philippe-plisson",:name => "Philippe Plisson"},
+{:id => "laurence-dumont",:name => "Laurence Dumont"},
+{:id => "herve-feron",:name => "Hervé Féron"},
+{},
+{},
+{:id => "christian-eckert",:name => "Christian Eckert"},
+{:id => "martine-pinville",:name => "Martine Pinville"},
+{:id => "guy-chambefort",:name => "Guy Chambefort"},
]
View
7 json_server/public/css/style.css
@@ -195,3 +195,10 @@ a:hover { color: #036; }
position: relative;
top: 3px;
}
+ #heatmap_tooltip{
+ background: #009;
+ color: white;
+ padding: 3px 5px 5px 10px;
+ position: relative;
+ top: 3px;
+ }
View
2 json_server/public/js/heatmap.js
@@ -179,7 +179,7 @@
this.set("width", canvas.width);
canvas.height = acanvas.height = element.style.height.replace(/px/,"") || this.getHeight(element);
this.set("height", canvas.height);
- canvas.style.position = acanvas.style.position = "absolute";
+ canvas.style.position = acanvas.style.position = "absolute";
canvas.style.top = acanvas.style.top = "0";
canvas.style.left = acanvas.style.left = "0";
canvas.style.zIndex = 1000000;
View
652 json_server/public/js/libs/kinetic-v1.2.0.js
@@ -0,0 +1,652 @@
+/**
+ * Kinetic JS JavaScript Library v1.2.0
+ * http://www.kineticjs.com/
+ * Copyright 2011, Eric Rowell
+ * Licensed under the MIT or GPL Version 2 licenses.
+ * Date: July 02 2011
+ *
+ * Copyright (C) 2011 by Eric Rowell
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ *
+ * Kudos to Brandon Jones' sick glMatrix library, which makes vector operations
+ * stupid fast. If you're using the WebGL wrapper, make sure you include Brandon's library
+ * because the WebGL methods depend on it.
+ *
+ * http://code.google.com/p/glmatrix/
+ */
+var Kinetic = function(canvasId, contextType){
+ this.canvas = document.getElementById(canvasId);
+
+ // General
+ this.context = this.canvas.getContext(contextType);
+ this.is2dContext = contextType.indexOf("2d") != -1;
+ this.drawStage = undefined;
+ this.listening = false;
+
+ // Canvas Events
+ this.mousePos = null;
+ this.mouseDown = false;
+ this.mouseUp = false;
+
+ // Region Events
+ this.currentRegion = null;
+ this.regionCounter = 0;
+ this.lastRegionIndex = null;
+
+ // Animation
+ this.t = 0;
+ this.timeInterval = 0;
+ this.startTime = 0;
+ this.lastTime = 0;
+ this.frame = 0;
+ this.animating = false;
+
+ // WebGL
+ if (!this.is2dContext) {
+ // shader type constants
+ this.BLUE_COLOR = "BLUE_COLOR";
+ this.VARYING_COLOR = "VARYING_COLOR";
+ this.TEXTURE = "TEXTURE";
+ this.TEXTURE_DIRECTIONAL_LIGHTING = "TEXTURE_DIRECTIONAL_LIGHTING";
+
+ this.shaderProgram = null;
+ this.mvMatrix = mat4.create();
+ this.pMatrix = mat4.create();
+ this.mvMatrixStack = [];
+ this.context.viewportWidth = this.canvas.width;
+ this.context.viewportHeight = this.canvas.height;
+
+ // init depth test
+ this.context.enable(this.context.DEPTH_TEST);
+ }
+};
+
+// ======================================= GENERAL =======================================
+
+Kinetic.prototype.getContext = function(){
+ return this.context;
+};
+
+Kinetic.prototype.getCanvas = function(){
+ return this.canvas;
+};
+
+Kinetic.prototype.clear = function(){
+ if (this.is2dContext) {
+ this.context.clearRect(0, 0, this.canvas.width, this.canvas.height);
+ }
+ else { // webgl clear
+ this.context.viewport(0, 0, this.context.viewportWidth, this.context.viewportHeight);
+ this.context.clear(this.context.COLOR_BUFFER_BIT | this.context.DEPTH_BUFFER_BIT);
+ }
+};
+
+Kinetic.prototype.getPos = function(obj){
+ var top = 0;
+ var left = 0;
+ while (obj.tagName != "BODY") {
+ top += obj.offsetTop;
+ left += obj.offsetLeft;
+ obj = obj.offsetParent;
+ }
+ return {
+ top: top,
+ left: left
+ };
+};
+
+Kinetic.prototype.reset = function(evt){
+ this.setMousePosition(evt);
+ this.regionCounter = 0;
+
+ if (!this.animating && this.drawStage !== undefined) {
+ this.drawStage();
+ }
+
+ this.mouseDown = false;
+ this.mouseUp = false;
+};
+
+// ======================================= STAGE =======================================
+
+Kinetic.prototype.setDrawStage = function(func){
+ this.drawStage = func;
+ this.listen();
+};
+Kinetic.prototype.drawStage = function(){
+ if (this.drawStage !== undefined) {
+ this.drawStage();
+ }
+};
+
+// ======================================= CANVAS EVENTS =======================================
+
+Kinetic.prototype.isMousedown = function(){
+ return this.mouseDown;
+};
+Kinetic.prototype.isMouseup = function(){
+ return this.mouseUp;
+};
+
+Kinetic.prototype.listen = function(){
+ // store current listeners
+ var that = this;
+ var canvasOnmouseover = this.canvas.onmouseover;
+ var canvasOnmouseout = this.canvas.onmouseout;
+ var canvasOnmousemove = this.canvas.onmousemove;
+ var canvasOnmousedown = this.canvas.onmousedown;
+ var canvasOnmouseup = this.canvas.onmouseup;
+
+ if (this.drawStage !== undefined) {
+ this.drawStage();
+ }
+
+ this.canvas.onmouseover = function(e){
+ if (!e) {
+ e = window.event;
+ }
+
+ that.setMousePosition(e);
+ if (typeof(canvasOnmouseover) == typeof(Function)) {
+ canvasOnmouseover();
+ }
+ };
+ this.canvas.onmouseout = function(){
+ that.mousePos = null;
+ if (typeof(canvasOnmouseout) == typeof(Function)) {
+ canvasOnmouseout();
+ }
+ };
+ this.canvas.onmousemove = function(e){
+ if (!e) {
+ e = window.event;
+ }
+ that.reset(e);
+
+ if (typeof(canvasOnmousemove) == typeof(Function)) {
+ canvasOnmousemove();
+ }
+ };
+ this.canvas.onmousedown = function(e){
+ if (!e) {
+ e = window.event;
+ }
+ that.mouseDown = true;
+ that.reset(e);
+
+ if (typeof(canvasOnmousedown) == typeof(Function)) {
+ canvasOnmousedown();
+ }
+ };
+ this.canvas.onmouseup = function(e){
+ if (!e) {
+ e = window.event;
+ }
+ that.mouseUp = true;
+ that.reset(e);
+
+ if (typeof(canvasOnmouseup) == typeof(Function)) {
+ canvasOnmouseup();
+ }
+ };
+};
+
+Kinetic.prototype.getMousePos = function(evt){
+ return this.mousePos;
+};
+Kinetic.prototype.setMousePosition = function(evt){
+ var mouseX = evt.clientX - this.getPos(this.canvas).left + window.pageXOffset;
+ var mouseY = evt.clientY - this.getPos(this.canvas).top + window.pageYOffset;
+ this.mousePos = {
+ x: mouseX,
+ y: mouseY
+ };
+};
+
+// ======================================= REGION EVENTS =======================================
+
+Kinetic.prototype.beginRegion = function(){
+ this.currentRegion = {};
+ this.regionCounter++;
+};
+Kinetic.prototype.addRegionEventListener = function(type, func){
+ if (type == "onmouseover") {
+ this.currentRegion.onmouseover = func;
+ }
+ else if (type == "onmouseout") {
+ this.currentRegion.onmouseout = func;
+ }
+ else if (type == "onmousemove") {
+ this.currentRegion.onmousemove = func;
+ }
+ else if (type == "onmousedown") {
+ this.currentRegion.onmousedown = func;
+ }
+ else if (type == "onmouseup") {
+ this.currentRegion.onmouseup = func;
+ }
+};
+Kinetic.prototype.closeRegion = function(){
+ if (this.mousePos !== null && this.context.isPointInPath(this.mousePos.x, this.mousePos.y)) {
+
+ // handle onmousemove
+ // do this everytime
+ if (this.currentRegion.onmousemove !== undefined) {
+ this.currentRegion.onmousemove();
+ }
+
+ // handle onmouseover
+ if (this.lastRegionIndex != this.regionCounter) {
+ this.lastRegionIndex = this.regionCounter;
+
+ if (this.currentRegion.onmouseover !== undefined) {
+ this.currentRegion.onmouseover();
+ }
+ }
+
+ // handle onmousedown
+ if (this.mouseDown && this.currentRegion.onmousedown !== undefined) {
+ this.currentRegion.onmousedown();
+ this.mouseDown = false;
+ }
+
+ // handle onmouseup
+ if (this.mouseUp && this.currentRegion.onmouseup !== undefined) {
+ this.currentRegion.onmouseup();
+ this.mouseUp = false;
+ }
+
+ }
+ else if (this.regionCounter == this.lastRegionIndex) {
+ // handle mouseout condition
+ this.lastRegionIndex = null;
+
+ if (this.currentRegion.onmouseout !== undefined) {
+ this.currentRegion.onmouseout();
+ }
+ }
+
+ this.regionCounter++;
+};
+
+// ======================================= ANIMATION =======================================
+
+Kinetic.prototype.getFrame = function(){
+ return this.frame;
+};
+Kinetic.prototype.startAnimation = function(){
+ this.animating = true;
+ var date = new Date();
+ this.startTime = date.getTime();
+ this.lastTime = this.startTime;
+
+ if (this.drawStage !== undefined) {
+ this.drawStage();
+ }
+
+ this.animationLoop();
+};
+Kinetic.prototype.stopAnimation = function(){
+ this.animating = false;
+};
+Kinetic.prototype.getTimeInterval = function(){
+ return this.timeInterval;
+};
+Kinetic.prototype.getTime = function(){
+ return this.t;
+};
+Kinetic.prototype.getFps = function(){
+ return 1000 / this.timeInterval;
+};
+Kinetic.prototype.animationLoop = function(){
+ var that = this;
+
+ this.frame++;
+ var date = new Date();
+ var thisTime = date.getTime();
+ this.timeInterval = thisTime - this.lastTime;
+ this.t += this.timeInterval;
+ this.lastTime = thisTime;
+
+ if (this.drawStage !== undefined) {
+ this.drawStage();
+ }
+
+ if (this.animating) {
+ requestAnimFrame(function(){
+ that.animationLoop();
+ });
+ }
+};
+
+// ======================================= WEBGL WRAPPER =======================================
+
+Kinetic.prototype.save = function(){
+ var copy = mat4.create();
+ mat4.set(this.mvMatrix, copy);
+ this.mvMatrixStack.push(copy);
+};
+
+Kinetic.prototype.restore = function(){
+ if (this.mvMatrixStack.length == 0) {
+ throw "Invalid popMatrix!";
+ }
+ this.mvMatrix = this.mvMatrixStack.pop();
+};
+
+Kinetic.prototype.getFragmentShaderGLSL = function(shaderType){
+ switch (shaderType) {
+ case this.BLUE_COLOR:
+ return "#ifdef GL_ES\n" +
+ "precision highp float;\n" +
+ "#endif\n" +
+ "void main(void) {\n" +
+ "gl_FragColor = vec4(0.0, 0.0, 1.0, 1.0);\n" +
+ "}";
+ case this.VARYING_COLOR:
+ return "#ifdef GL_ES\n" +
+ "precision highp float;\n" +
+ "#endif\n" +
+ "varying vec4 vColor;\n" +
+ "void main(void) {\n" +
+ "gl_FragColor = vColor;\n" +
+ "}";
+ case this.TEXTURE:
+ return "#ifdef GL_ES\n" +
+ "precision highp float;\n" +
+ "#endif\n" +
+ "varying vec2 vTextureCoord;\n" +
+ "uniform sampler2D uSampler;\n" +
+ "void main(void) {\n" +
+ "gl_FragColor = texture2D(uSampler, vec2(vTextureCoord.s, vTextureCoord.t));\n" +
+ "}";
+ case this.TEXTURE_DIRECTIONAL_LIGHTING:
+ return "#ifdef GL_ES\n" +
+ "precision highp float;\n" +
+ "#endif\n" +
+ "varying vec2 vTextureCoord;\n" +
+ "varying vec3 vLightWeighting;\n" +
+ "uniform sampler2D uSampler;\n" +
+ "void main(void) {\n" +
+ "vec4 textureColor = texture2D(uSampler, vec2(vTextureCoord.s, vTextureCoord.t));\n" +
+ "gl_FragColor = vec4(textureColor.rgb * vLightWeighting, textureColor.a);\n" +
+ "}";
+ }
+};
+
+Kinetic.prototype.getVertexShaderGLSL = function(shaderType){
+ switch (shaderType) {
+ case this.BLUE_COLOR:
+ return "attribute vec3 aVertexPosition;\n" +
+ "uniform mat4 uMVMatrix;\n" +
+ "uniform mat4 uPMatrix;\n" +
+ "void main(void) {\n" +
+ "gl_Position = uPMatrix * uMVMatrix * vec4(aVertexPosition, 1.0);\n" +
+ "}";
+ case this.VARYING_COLOR:
+ return "attribute vec3 aVertexPosition;\n" +
+ "attribute vec4 aVertexColor;\n" +
+ "uniform mat4 uMVMatrix;\n" +
+ "uniform mat4 uPMatrix;\n" +
+ "varying vec4 vColor;\n" +
+ "void main(void) {\n" +
+ "gl_Position = uPMatrix * uMVMatrix * vec4(aVertexPosition, 1.0);\n" +
+ "vColor = aVertexColor;\n" +
+ "}";
+ case this.TEXTURE:
+ return "attribute vec3 aVertexPosition;\n" +
+ "attribute vec2 aTextureCoord;\n" +
+ "uniform mat4 uMVMatrix;\n" +
+ "uniform mat4 uPMatrix;\n" +
+ "varying vec2 vTextureCoord;\n" +
+ "void main(void) {\n" +
+ "gl_Position = uPMatrix * uMVMatrix * vec4(aVertexPosition, 1.0);\n" +
+ "vTextureCoord = aTextureCoord;\n" +
+ "}";
+ case this.TEXTURE_DIRECTIONAL_LIGHTING:
+ return "attribute vec3 aVertexPosition;\n" +
+ "attribute vec3 aVertexNormal;\n" +
+ "attribute vec2 aTextureCoord;\n" +
+ "uniform mat4 uMVMatrix;\n" +
+ "uniform mat4 uPMatrix;\n" +
+ "uniform mat3 uNMatrix;\n" +
+ "uniform vec3 uAmbientColor;\n" +
+ "uniform vec3 uLightingDirection;\n" +
+ "uniform vec3 uDirectionalColor;\n" +
+ "uniform bool uUseLighting;\n" +
+ "varying vec2 vTextureCoord;\n" +
+ "varying vec3 vLightWeighting;\n" +
+ "void main(void) {\n" +
+ "gl_Position = uPMatrix * uMVMatrix * vec4(aVertexPosition, 1.0);\n" +
+ "vTextureCoord = aTextureCoord;\n" +
+ "if (!uUseLighting) {\n" +
+ "vLightWeighting = vec3(1.0, 1.0, 1.0);\n" +
+ "} else {\n" +
+ "vec3 transformedNormal = uNMatrix * aVertexNormal;\n" +
+ "float directionalLightWeighting = max(dot(transformedNormal, uLightingDirection), 0.0);\n" +
+ "vLightWeighting = uAmbientColor + uDirectionalColor * directionalLightWeighting;\n" +
+ "}\n" +
+ "}";
+ }
+};
+
+Kinetic.prototype.initShaders = function(shaderType){
+ this.initPositionShader();
+
+ switch (shaderType) {
+ case this.VARYING_COLOR:
+ this.initColorShader();
+ break;