Utilisateur:Bayo/Formulaire.html


<head>
<title>Formulaire pour ébauche de jeu vidéo</title>


<style type="text/css">/*<![CDATA[*/

#destinationWiki {
        background-color: #E0E0FF;
        padding: 5px;
        border: 1px solid #9090FF;
        font-family: courier;
        height: 200px;
        overflow:auto;
        margin-top:5px;
        margin-bottom:5px;
}
#destinationDebug {
}

h4 {
        font-size:10px;
        margin:0px;
}

table {background-color:transparent;}

.formulaire {
        background-color: #E0FFE0;
        padding: 5px;
        border: 1px solid #90FF90;
        margin-top:5px;
        margin-bottom:5px;
}
.formulaire input, .formulaire select {
        background-color: #F0FFF0;
        border: 1px solid #90FF90;
}

.version {
        background-color: #FFF0F0;
        border: 1px solid #FFA0A0;
        margin-top:5px;
        margin-bottom:5px;
        padding:5px;
}

.warning {
        background-color: #FFF0F0;
        border: 5px solid #FFA0A0;
        margin-top:5px;
        margin-bottom:5px;
        padding:5px;
}

.unused {
        background-color: #FFF0F0;
        border: 1px solid #FFA0A0;
}
/*]]>*/</style>

<script type="text/javascript">/*<![CDATA[*/

function print(text) {
}

platforms = new Array();
/* [Nom] = (Constructeur, Type, Génération, Lien, Catégorie) */
platforms["32X"] = new Array("Sega", "CS", "0", "[[32X]]", "[[Catégorie:Jeu 32X]]")
platforms["3DO"] = new Array("", "CS", "0", "[[3DO]]", "[[Catégorie:Jeu 3DO]]")
platforms["Amiga"] = new Array("Commodore", "O", "0", "[[Amiga]]", "[[Catégorie:Jeu sous Amiga]]")
platforms["Amiga CD32"] = new Array("Commodore", "CS", "0", "[[Amiga CD32]]", "[[Catégorie:Jeu Amiga CD32]]")
platforms["Amiga CDTV"] = new Array("Commodore", "CS", "0", "[[Amiga CDTV]]", "[[Catégorie:Jeu Amiga CDTV]]")
platforms["Amstrad CPC"] = new Array("Amstrad", "O", "0", "[[Amstrad CPC]]", "[[Catégorie:Jeu Amstrad CPC]]")
platforms["Apple II"] = new Array("Apple", "O", "0", "[[Apple II]]", "[[Catégorie:Jeu Apple II]]")
platforms["Arcade"] = new Array("", "A", "0", "[[Borne d'arcade|arcade]]", "[[Catégorie:Jeu d'arcade]]")
platforms["Atari 2600"] = new Array("Atari", "CS", "0", "[[Atari 2600]]", "[[Catégorie:Jeu Atari 2600]]")
platforms["Atari 5200"] = new Array("Atari", "CS", "0", "[[Atari 5200]]", "[[Catégorie:Jeu Atari 5200]]")
platforms["Atari 7800"] = new Array("Atari", "CS", "0", "[[Atari 7800]]", "[[Catégorie:Jeu Atari 7800]]")
platforms["Atari 8-bit"] = new Array("Atari", "O", "0", "[[Atari 8-bit]]", "[[Catégorie:Jeu Atari 8-bit]]")
platforms["Atari ST"] = new Array("Atari", "O", "0", "[[Atari ST]]", "[[Catégorie:Jeu Atari ST]]")
platforms["Atomiswave"] = new Array("", "A", "0", "[[Atomiswave]]", "[[Catégorie:Jeu d'arcade]]")
platforms["CD-I"] = new Array("", "CS", "0", "[[CD-I]]", "[[Catégorie:Jeu CD-I]]")
platforms["Colecovision"] = new Array("Coleco", "CS", "0", "[[Colecovision]]", "[[Catégorie:Jeu Colecovision]]")
platforms["Commodore 64"] = new Array("Commodore", "O", "0", "[[Commodore 64]]", "[[Catégorie:Jeu Commodore 64]]")
platforms["Commodore VIC-20"] = new Array("Commodore", "O", "0", "[[Commodore VIC-20]]", "[[Catégorie:Jeu Commodore VIC-20]]")
platforms["CPS-1"] = new Array("Capcom", "A", "0", "[[CPS-1]]", "[[Catégorie:Jeu d'arcade]]")
platforms["CPS-2"] = new Array("Capcom", "A", "0", "[[CPS-2]]", "[[Catégorie:Jeu d'arcade]]")
platforms["CPS-3"] = new Array("Capcom", "A", "0", "[[CPS-3]]", "[[Catégorie:Jeu d'arcade]]")
platforms["DOS"] = new Array("Microsoft", "SE", "0", "[[DOS]]", "[[Catégorie:Jeu sous DOS]]")
platforms["Dreamcast"] = new Array("Sega", "CS", "9", "[[Dreamcast]]", "[[Catégorie:Jeu Dreamcast]]")
platforms["Famicom Disk System"] = new Array("Nintendo", "CS", "0", "[[Famicom Disk System]]", "[[Catégorie:Jeu Famicom Disk System]]")
platforms["FM Towns"] = new Array("Fujitsu", "O", "0", "[[FM Towns]]", "[[Catégorie:Jeu FM Towns]]")
platforms["FM Towns Marty"] = new Array("Fujitsu", "CS", "0", "[[FM Towns Marty]]", "[[Catégorie:Jeu FM Towns]]")
platforms["FM-7"] = new Array("Fujitsu", "O", "0", "[[FM-7]]", "[[Catégorie:Jeu FM-7]]")
platforms["Game & Watch"] = new Array("Nintendo", "CP", "0", "[[Game & Watch]]", "[[Catégorie:Jeu Game & Watch]]")
platforms["Game Boy"] = new Array("Nintendo", "CP", "0", "[[Game Boy]]", "[[Catégorie:Jeu Game Boy]]")
platforms["Game Boy Advance"] = new Array("Nintendo", "CP", "9", "[[Game Boy Advance]]", "[[Catégorie:Jeu Game Boy Advance]]")
platforms["Game Boy Color"] = new Array("Nintendo", "CP", "0", "[[Game Boy Color]]", "[[Catégorie:Jeu Game Boy Color]]")
platforms["Game Gear"] = new Array("Sega", "CP", "0", "[[Game Gear]]", "[[Catégorie:Jeu Game Gear]]")
platforms["GameCube"] = new Array("Nintendo", "CS", "9", "[[GameCube]]", "[[Catégorie:Jeu GameCube]]")
platforms["GamePark 32"] = new Array("GamePark", "CP", "9", "[[GP32]]", "")
platforms["GX-4000"] = new Array("Amstrad", "CS", "0", "[[GX-4000]]", "[[Catégorie:Jeu GX-4000]]")
platforms["Intellivision"] = new Array("Mattel", "CS", "0", "[[Intellivision]]", "[[Catégorie:Jeu Intellivision]]")
platforms["Jaguar"] = new Array("Atari", "CS", "0", "[[Jaguar (console)|]]", "[[Catégorie:Jeu Jaguar]]")
platforms["Konami GX400"] = new Array("Konami", "A", "0", "[[Konami GX400]]", "[[Catégorie:Jeu d'arcade]]")
platforms["Linux"] = new Array("", "SE", "9", "[[Linux]]", "[[Catégorie:Jeu sous Linux]]")
platforms["Lynx"] = new Array("Atari", "CP", "0", "[[Lynx]]", "[[Catégorie:Jeu Lynx]]")
platforms["Mac OS"] = new Array("Apple", "SE", "9", "[[Mac OS]]", "[[Catégorie:Jeu sous Mac OS]]")
platforms["Master System"] = new Array("Sega", "CS", "0", "[[Master System]]", "[[Catégorie:Jeu Master System]]")
platforms["Mega-CD"] = new Array("Sega", "CS", "0", "[[Mega-CD]]", "[[Catégorie:Jeu Mega-CD]]")
platforms["Megadrive"] = new Array("Sega", "CS", "0", "[[Megadrive]]", "[[Catégorie:Jeu Megadrive]]")
platforms["MSX"] = new Array("", "O", "0", "[[MSX]]", "[[Catégorie:Jeu MSX]]")
platforms["N-Gage"] = new Array("Nokia", "CP", "0", "[[N-Gage]]", "[[Catégorie:Jeu N-Gage]]")
platforms["Namco Libble Rabble"] = new Array("Namco", "A", "0", "[[Namco Libble Rabble]]", "[[Catégorie:Jeu d'arcade]]")
platforms["Namco NA-1"] = new Array("Namco", "A", "0", "[[Namco NA-1]]", "[[Catégorie:Jeu d'arcade]]")
platforms["Namco NB-1"] = new Array("Namco", "A", "0", "[[Namco NB-1]]", "[[Catégorie:Jeu d'arcade]]")
platforms["Namco ND-1"] = new Array("Namco", "A", "0", "[[Namco ND-1]]", "[[Catégorie:Jeu d'arcade]]")
platforms["Namco System 1"] = new Array("Namco", "A", "0", "[[Namco System 1]]", "[[Catégorie:Jeu d'arcade]]")
platforms["Namco System 11"] = new Array("Namco", "A", "0", "[[Namco System 11]]", "[[Catégorie:Jeu d'arcade]]")
platforms["Namco System 12"] = new Array("Namco", "A", "0", "[[Namco System 12]]", "[[Catégorie:Jeu d'arcade]]")
platforms["Namco System 2"] = new Array("Namco", "A", "0", "[[Namco System 2]]", "[[Catégorie:Jeu d'arcade]]")
platforms["Namco System 21"] = new Array("Namco", "A", "0", "[[Namco System 21]]", "[[Catégorie:Jeu d'arcade]]")
platforms["Namco System 22"] = new Array("Namco", "A", "0", "[[Namco System 22]]", "[[Catégorie:Jeu d'arcade]]")
platforms["Namco System 23"] = new Array("Namco", "A", "0", "[[Namco System 23]]", "[[Catégorie:Jeu d'arcade]]")
platforms["Namco System 86"] = new Array("Namco", "A", "0", "[[Namco System 86]]", "[[Catégorie:Jeu d'arcade]]")
platforms["Neo-Geo"] = new Array("SNK", "CS", "0", "[[Neo-Geo]]", "[[Catégorie:Jeu Neo-Geo]]")
platforms["Neo-Geo CD"] = new Array("SNK", "CS", "0", "[[Neo-Geo CD]]", "[[Catégorie:Jeu Neo-Geo CD]]")
platforms["Neo-Geo Pocket"] = new Array("SNK", "CP", "0", "[[Neo-Geo Pocket]]", "")
platforms["Neo-Geo Pocket Color"] = new Array("SNK", "CP", "0", "[[Neo-Geo Pocket Color]]", "[[Catégorie:Jeu Neo-Geo Pocket Color]]")
platforms["Nintendo 64"] = new Array("Nintendo", "CS", "0", "[[Nintendo 64]]", "[[Catégorie:Jeu Nintendo 64]]")
platforms["Nintendo DS"] = new Array("Nintendo", "CP", "9", "[[Nintendo DS]]", "[[Catégorie:Jeu Nintendo DS]]")
platforms["Nintendo Entertainment System"] = new Array("Nintendo", "CS", "0", "[[Nintendo Entertainment System]]", "[[Catégorie:Jeu Nintendo Entertainment System]]")
platforms["Nintendo Super System"] = new Array("Nintendo", "A", "0", "[[Nintendo Super System]]", "[[Catégorie:Jeu d'arcade]]")
platforms["OS/2"] = new Array("", "SE", "0", "", "[[Catégorie:Jeu sous OS/2]]")
platforms["PC Engine"] = new Array("NEC Corporation", "CS", "0", "[[PC Engine]]", "[[Catégorie:Jeu PC Engine]]")
platforms["PC Engine CD"] = new Array("NEC Corporation", "CS", "0", "[[PC-Engine]] CD", "[[Catégorie:Jeu PC Engine CD]]")
platforms["PC-88"] = new Array("NEC Corporation", "O", "0", "[[PC-88]]", "[[Catégorie:Jeu PC-88]]")
platforms["PC-98"] = new Array("NEC Corporation", "O", "0", "[[PC-98]]", "[[Catégorie:Jeu PC-98]]")
platforms["PlayChoice-10"] = new Array("", "", "0", "[[PlayChoice-10]]", "[[Catégorie:Jeu d'arcade]]")
platforms["PlayStation"] = new Array("Sony", "CS", "0", "[[PlayStation]]", "[[Catégorie:Jeu PlayStation]]")
platforms["PlayStation 2"] = new Array("Sony", "CS", "9", "[[PlayStation 2]]", "[[Catégorie:Jeu PlayStation 2]]")
platforms["PlayStation 3"] = new Array("Sony", "CS", "9", "[[PlayStation 3]]", "[[Catégorie:Jeu PlayStation 3]]")
platforms["PlayStation Portable"] = new Array("Sony", "CP", "9", "[[PlayStation Portable]]", "[[Catégorie:Jeu PlayStation Portable]]")
platforms["Polygame Master"] = new Array("", "A", "0", "[[Polygame Master]]", "[[Catégorie:Jeu d'arcade]]")
platforms["SAM Coupé"] = new Array("", "O", "0", "[[SAM Coupé]]", "")
platforms["Saturn"] = new Array("Sega", "CS", "0", "[[Saturn]]", "[[Catégorie:Jeu Saturn]]")
platforms["Sega Astro City"] = new Array("Sega", "A", "0", "[[Sega Astro City]]", "[[Catégorie:Jeu d'arcade]]")
platforms["Sega Aurora"] = new Array("Sega", "A", "0", "[[Sega Aurora]]", "[[Catégorie:Jeu d'arcade]]")
platforms["Sega Chihiro"] = new Array("Sega", "A", "0", "[[Sega Chihiro]]", "[[Catégorie:Jeu d'arcade]]")
platforms["Sega Lindbergh"] = new Array("Sega", "A", "0", "[[Sega Lindbergh]]", "[[Catégorie:Jeu d'arcade]]")
platforms["Sega Model 1"] = new Array("Sega", "A", "0", "[[Sega Model 1]]", "[[Catégorie:Jeu d'arcade]]")
platforms["Sega Model 2"] = new Array("Sega", "A", "0", "[[Sega Model 2]]", "[[Catégorie:Jeu d'arcade]]")
platforms["Sega Model 3"] = new Array("Sega", "A", "0", "[[Sega Model 3]]", "[[Catégorie:Jeu d'arcade]]")
platforms["Sega Naomi"] = new Array("Sega", "A", "0", "[[Sega Naomi]]", "[[Catégorie:Jeu d'arcade]]")
platforms["Sega Naomi 2"] = new Array("Sega", "A", "0", "[[Sega Naomi 2]]", "[[Catégorie:Jeu d'arcade]]")
platforms["Sega System 16"] = new Array("Sega", "A", "0", "[[Sega System 16]]", "[[Catégorie:Jeu d'arcade]]")
platforms["Sega System 24"] = new Array("Sega", "A", "0", "[[Sega System 24]]", "[[Catégorie:Jeu d'arcade]]")
platforms["Sega System 32"] = new Array("Sega", "A", "0", "[[Sega System 32]]", "[[Catégorie:Jeu d'arcade]]")
platforms["Sega System C-2"] = new Array("Sega", "A", "0", "[[Sega System C-2]]", "[[Catégorie:Jeu d'arcade]]")
platforms["Sega Titan Video"] = new Array("Sega", "A", "0", "[[Sega Titan Video]]", "[[Catégorie:Jeu d'arcade]]")
platforms["SG-1000"] = new Array("Sega", "CS", "2", "[[SG-1000]]", "[[Catégorie:Jeu SG-1000]]")
platforms["Super Nintendo"] = new Array("Nintendo", "CS", "0", "[[Super Nintendo]]", "[[Catégorie:Jeu Super Nintendo]]")
platforms["Taito Type X"] = new Array("", "A", "0", "[[Taito Type X]]", "[[Catégorie:Jeu d'arcade]]")
platforms["Thomson MO5"] = new Array("Thomson", "O", "0", "[[Thomson MO5]]", "[[Catégorie:Jeu Thomson MO5]]")
platforms["Thomson TO7"] = new Array("Thomson", "O", "0", "[[Thomson TO7]]", "[[Catégorie:Jeu Thomson TO7]]")
platforms["Thomson TO9"] = new Array("Thomson", "O", "0", "[[Thomson TO9]]", "[[Catégorie:Jeu Thomson TO9]]")
platforms["TI-99/4A"] = new Array("", "O", "0", "[[TI-99/4A]]", "[[Catégorie:Jeu TI-99/4A]]")
platforms["Triforce "] = new Array("", "A", "0", "[[Triforce ]]", "[[Catégorie:Jeu d'arcade]]")
platforms["Vectrex"] = new Array("", "CS", "0", "[[Vectrex]]", "")
platforms["Videopac"] = new Array("", "O", "0", "[[Videopac]]", "[[Catégorie:Jeu Videopac]]")
platforms["Virtual Boy"] = new Array("Nintendo", "CP", "0", "[[Virtual Boy]]", "[[Catégorie:Jeu Virtual Boy]]")
platforms["Wii"] = new Array("Nintendo", "CS", "9", "[[Wii]]", "[[Catégorie:Jeu Wii]]")
platforms["Windows"] = new Array("Microsoft", "SE", "9", "[[Microsoft Windows|Windows]]", "[[Catégorie:Jeu sous Windows]]")
platforms["WonderSwan"] = new Array("", "CP", "0", "[[WonderSwan]]", "[[Catégorie:Jeu WonderSwan]]")
platforms["WonderSwan Color"] = new Array("", "CP", "0", "[[WonderSwan Color]]", "[[Catégorie:Jeu WonderSwan Color]]")
platforms["X68000"] = new Array("", "O", "0", "[[X68000]]", "[[Catégorie:Jeu X68000]]")
platforms["Xbox"] = new Array("Microsoft", "CS", "9", "[[Xbox]]", "[[Catégorie:Jeu Xbox]]")
platforms["Xbox 360"] = new Array("Microsoft", "CS", "9", "[[Xbox 360]]", "[[Catégorie:Jeu Xbox 360]]")
platforms["ZX Spectrum"] = new Array("", "O", "0", "[[ZX Spectrum]]", "[[Catégorie:Jeu ZX Spectrum]]")

var templateMapping = new Array();

templateMapping['clavier']         = '[[clavier d\'ordinateur|clavier]]'
templateMapping['souris']          = '[[souris (informatique)|souris]]'
templateMapping['manette de jeu']  = '[[manette de jeu|manette]]'
templateMapping['écran tactile']   = '[[écran tactile]]'
templateMapping['joystick']        = '[[joystick (jeu vidéo)|joystick]]'
templateMapping['Nunchuk']         = '[[Nunchuk]]'
templateMapping['volant']          = '[[volant]]'
templateMapping['Wiimote']         = '[[Wiimote]]'

templateMapping['ESRB']   = '[[Entertainment Software Rating Board|ESRB]]'
templateMapping['BBFC']   = '[[British Board of Film Classification|BBFC]]'
templateMapping['PEGI']   = '[[Pan European Game Information|PEGI]]'
templateMapping['CERO']   = '[[Computer Entertainment Rating Organization|CERO]]'
templateMapping['SELL']   = '[[Syndicat des éditeurs de logiciels de loisirs|SELL]]'
templateMapping['ELSPA']  = '[[Entertainment and Leisure Software Publishers Association|ELSPA]]'
templateMapping['OFLCA']  = '[[Office of Film and Literature Classification (Australie)|OFLC]] (<small>Australie</small>)'
templateMapping['OFLCNZ'] = '[[Office of Film and Literature Classification (Nouvelle-Zélande)|OFLC]] (<small>Nouvelle-Zélande</small>)'



templateMapping['disquette'] = '[[disquette]]'
templateMapping['2 disquettes'] = '2 [[disquette]]s'
templateMapping['3 disquettes'] = '3 [[disquette]]s'
templateMapping['4 disquettes'] = '4 [[disquette]]s'
templateMapping['5 disquettes'] = '5 [[disquette]]s'
templateMapping['6 disquettes'] = '6 [[disquette]]s'
templateMapping['cartouche'] = '[[Cartouche (jeu vidéo)|cartouche]]'
templateMapping['2 cartouches'] = '2 [[Cartouche (jeu vidéo)|cartouches]]'
templateMapping['CD'] = '[[Disque compact|CD]]'
templateMapping['2 CD'] = '2 [[Disque compact|CD]]'
templateMapping['3 CD'] = '3 [[Disque compact|CD]]'
templateMapping['4 CD'] = '4 [[Disque compact|CD]]'
templateMapping['DVD'] = '[[Disque numérique polyvalent|DVD]]'
templateMapping['2 DVD'] = '2 [[Disque numérique polyvalent|DVD]]'
templateMapping['mini DVD'] = '[[mini DVD]]'
templateMapping['2 mini DVD'] = '2 [[mini DVD]]'
templateMapping['UMD'] = '[[Universal Media Disc|UMD]]'
templateMapping['disque Blu-ray'] = '[[disque Blu-ray]]'

templateMapping['France'] = '[[France]]'
templateMapping['Europe'] = '[[Europe]]'
templateMapping['États-Unis'] = "[[États-Unis d'Amérique|États-Unis]]"
templateMapping['Amérique du Nord'] = '[[Amérique du Nord]]'
templateMapping['Australie'] = '[[Australie]]'
templateMapping['Japon'] = '[[Japon]]'

templateMapping['action'] = "[[Jeu d'action|action]]"
templateMapping['action-aventure'] = "[[Jeu d'action-aventure|action-aventure]]"
templateMapping['arcade'] = "[[Jeu d'arcade|arcade]]"
templateMapping['aventure'] = "[[Jeu d'aventure|aventure]]"
templateMapping['beat them all'] = "''[[beat them all]]''"
templateMapping['casse-briques'] = "[[casse-briques]]"
templateMapping['combat'] = "[[Jeu de combat|combat]]"
templateMapping['course'] = "[[Jeu vidéo de course|course]]"
templateMapping['flipper'] = "flipper"
templateMapping['gestion'] = "[[Jeu de gestion|gestion]]"
templateMapping['infiltration'] = "[[Jeu d'infiltration|infiltration]]"
templateMapping['party game'] = "''[[party game]]''"
templateMapping['plates-formes'] = "[[Jeu de plates-formes|plates-formes]]"
templateMapping['puzzle'] = "[[Jeu de puzzle|puzzle]]"
templateMapping['porte-monstre-trésor'] = "[[porte-monstre-trésor]]"
templateMapping['rythme'] = "[[Jeu de rythme|rythme]]"
templateMapping['réflexion'] = "[[Jeu de réflexion|réflexion]]"
templateMapping['rôle'] = "[[Jeu de rôle (jeu vidéo)|rôle]]"
templateMapping['shoot them up'] = "''[[shoot them up]]''"
templateMapping['simulation'] = "[[Jeu de simulation|simulation]]"
templateMapping['simulation de vie'] = "[[simulation de vie]]"
templateMapping['simulation de vol'] = "[[simulateur de vol]]"
templateMapping['sport'] = "[[jeu vidéo de sport|sport]]"
	templateMapping['baseball'] = "[[baseball]]"
	templateMapping['basket-ball'] = "[[basket-ball]]"
	templateMapping['billard'] = "[[billard]]"
	templateMapping['bowling'] = "[[bowling]]"
	templateMapping['boxe'] = "[[boxe]]"
	templateMapping['catch'] = "[[catch]]"
	templateMapping['équitation'] = "[[équitation]]"
	templateMapping['football'] = "[[football]]"
	templateMapping['football américain'] = "[[football américain]]"
	templateMapping['sport de glisse'] = "[[sport glisse]]"
	templateMapping['golf'] = "[[golf]]"
	templateMapping['hockey sur glace'] = "[[hockey sur glace]]"
	templateMapping['rugby'] = "[[rugby]]"
	templateMapping['tennis'] = "[[tennis]]"
templateMapping['stratégie au tour par tour'] = "[[Jeu de stratégie au tour par tour|stratégie tour par tour]]"
templateMapping['stratégie en temps réel'] = "[[Jeu de stratégie en temps réel|stratégie temps réel]]"
templateMapping['stratégie'] = "[[Jeu de stratégie|stratégie]]"
templateMapping['survival horror'] = "''[[survival horror]]''"
templateMapping['tactical RPG'] = "''[[tactical RPG]]''"
templateMapping['tir objectif'] = "[[Jeu de tir objectif|tir objectif]]"
templateMapping['tir subjectif'] = "[[Jeu de tir subjectif|tir subjectif]]"

templateMapping['GPL'] = "[[Licence publique générale GNU|GPL]]"
templateMapping['LGPL'] = "[[Licence publique générale limitée GNU|LGPL]]"
templateMapping['MPL'] = "[[Mozilla Public License|MPL]]"
templateMapping['BSD'] = "[[Licence BSD|BSD]]"
templateMapping['CeCILL'] = "[[Licence CeCILL|CeCILL]]"
templateMapping['domaine public'] = "[[domaine public]]"
templateMapping['gratuiciel'] = "[[gratuiciel ]]"
templateMapping['partagiciel'] = "[[partagiciel]]"
templateMapping['MIT'] = "[[MIT License|MIT]]"
templateMapping['Apache'] = "[[Licence Apache|Apache]]"
templateMapping['APSL'] = "[[APSL]]"

templateMapping['Un joueur'] = "[[Solo (jeu vidéo)|un joueur]]"
templateMapping['2 joueurs'] = "2 joueurs"
templateMapping['Multijoueur'] = "[[multijoueur]]"
templateMapping['Massivement multijoueur'] = "[[Jeu en ligne massivement multi-joueur|massivement multijoueur]]"

introMapping = new Array()

introMapping['action'] = "d'[[Jeu d'action|action]]"
introMapping['action-aventure'] = "d'[[Jeu d'action-aventure|action-aventure]]"
introMapping['arcade'] = "d'[[Jeu d'arcade|arcade]]"
introMapping['aventure'] = "d'[[Jeu d'aventure|aventure]]"
introMapping['beat them all'] = "''[[beat them all]]''"
introMapping['casse-briques'] = "de [[casse-briques]]"
introMapping['combat'] = "de [[Jeu de combat|combat]]"
introMapping['course'] = "de [[Jeu vidéo de course|course]]"
introMapping['flipper'] = "de flipper"
introMapping['gestion'] = "de [[Jeu de gestion|gestion]]"
introMapping['infiltration'] = "d'[[Jeu d'infiltration|infiltration]]"
introMapping['party game'] = "''[[party game]]''"
introMapping['plates-formes'] = "de [[Jeu de plates-formes|plates-formes]]"
introMapping['puzzle'] = "de [[Jeu de puzzle|puzzle]]"
introMapping['porte-monstre-trésor'] = "[[porte-monstre-trésor]]"
introMapping['rythme'] = "de [[Jeu de rythme|rythme]]"
introMapping['réflexion'] = "de [[Jeu de réflexion|réflexion]]"
introMapping['rôle'] = "de [[Jeu vidéo de rôle|rôle]]"
introMapping['shoot them up'] = "''[[shoot them up]]''"
introMapping['simulation'] = "de [[Jeu de simulation|simulation]]"
introMapping['simulation de vie'] = "de [[simulation de vie]]"
introMapping['simulation de vol'] = "de [[simulateur de vol]]"
introMapping['sport'] = "de [[jeu vidéo de sport|sport]]"
	introMapping['baseball'] = "de [[baseball]]"
	introMapping['basket-ball'] = "de [[basket-ball]]"
	introMapping['billard'] = "de [[billard]]"
	introMapping['bowling'] = "de [[bowling]]"
	introMapping['boxe'] = "de [[boxe]]"
	introMapping['catch'] = "de [[catch]]"
	introMapping['équitation'] = "d'[[équitation]]"
	introMapping['football'] = "de [[football]]"
	introMapping['football américain'] = "de [[football américain]]"
	introMapping['sport de glisse'] = "de [[sport de glisse]]"
	introMapping['golf'] = "de [[golf]]"
	introMapping['hockey sur glace'] = "de [[hockey sur glace]]"
	introMapping['rugby'] = "de [[rugby]]"
	introMapping['tennis'] = "de [[tennis]]"
introMapping['stratégie au tour par tour'] = "de [[Jeu de stratégie au tour par tour|stratégie au tour par tour]]"
introMapping['stratégie en temps réel'] = "de [[Jeu de stratégie en temps réel|stratégie en temps réel]]"
introMapping['stratégie'] = "de [[Jeu de stratégie|stratégie]]"
introMapping['survival horror'] = "''[[survival horror]]''"
introMapping['tactical RPG'] = "''[[tactical RPG]]''"
introMapping['tir objectif'] = "de [[Jeu de tir objectif|tir objectif]]"
introMapping['tir subjectif'] = "de [[Jeu de tir subjectif|tir subjectif]]"

categoryMapping = new Array()

categoryMapping['action'] = "[[Catégorie:Jeu d'action]]"
categoryMapping['action-aventure'] = "[[Catégorie:Jeu d'action-aventure]]"
categoryMapping['arcade'] = "[[Catégorie:Jeu d'arcade]]"
categoryMapping['aventure'] = "[[Catégorie:Jeu d'aventure]]"
categoryMapping['beat them all'] = "[[Catégorie:Beat them all]]"
categoryMapping['casse-briques'] = "[[Catégorie:Casse-briques]]"
categoryMapping['combat'] = "[[Catégorie:Jeu de combat]]"
categoryMapping['course'] = "[[Catégorie:Jeu vidéo de course]]"
categoryMapping['flipper'] = "[[Catégorie:Jeu vidéo de flipper]]"
categoryMapping['gestion'] = "[[Catégorie:Jeu vidéo de gestion]]"
categoryMapping['inclassable'] = "[[Catégorie:Jeu vidéo inclassable]]"
categoryMapping['infiltration'] = "[[Catégorie:Jeu d'infiltration]]"
categoryMapping['massivement multijoueur'] = "[[Catégorie:Jeu en ligne massivement multijoueur]]"
categoryMapping['party game'] = "[[Catégorie:Party game]]"
categoryMapping['plates-formes'] = "[[Catégorie:Jeu de plates-formes]]"
categoryMapping['puzzle'] = "[[Catégorie:Jeu de puzzle]]"
categoryMapping['porte-monstre-trésor'] = "[[Catégorie:Rogue-like]]"
categoryMapping['rythme'] = "[[Catégorie:Jeu de rythme]]"
categoryMapping['réflexion'] = "[[Catégorie:Jeu vidéo de réflexion]]"
categoryMapping['rôle'] = "[[Catégorie:Jeu vidéo de rôle]]"
categoryMapping['shoot them up'] = "[[Catégorie:Shoot them up]]"
categoryMapping['simulation'] = "[[Catégorie:Jeu vidéo de simulation]]"
categoryMapping['simulation de vol'] = "[[Catégorie:simulateur de vol]]"
categoryMapping['simulation de vie'] = "[[Catégorie:Simulation de vie]]"
categoryMapping['sport'] = "[[Catégorie:Jeu vidéo de sport]]"
	categoryMapping['baseball'] = "[[Catégorie:Jeu vidéo de baseball]]"
	categoryMapping['basket-ball'] = "[[Catégorie:Jeu vidéo de basket-ball]]"
	categoryMapping['billard'] = "[[Catégorie:Jeu vidéo de billard]]"
	categoryMapping['bowling'] = "[[Catégorie:Jeu vidéo de bowling]]"
	categoryMapping['boxe'] = "[[Catégorie:Jeu vidéo de boxe]]"
	categoryMapping['catch'] = "[[Catégorie:Jeu vidéo de catch]]"
	categoryMapping['équitation'] = "[[Catégorie:Jeu vidéo d'équitation]]"
	categoryMapping['football'] = "[[Catégorie:Jeu vidéo de football]]"
	categoryMapping['football américain'] = "[[Catégorie:Jeu vidéo de football américain]]"
	categoryMapping['sport de glisse'] = "[[Catégorie:Jeu vidéo de sport de glisse]]"
	categoryMapping['golf'] = "[[Catégorie:Jeu vidéo de golf]]"
	categoryMapping['hockey sur glace'] = "[[Catégorie:Jeu vidéo de hockey sur glace]]"
	categoryMapping['rugby'] = "[[Catégorie:Jeu vidéo de rugby]]"
	categoryMapping['tennis'] = "[[Catégorie:Jeu vidéo de tennis]]"
categoryMapping['stratégie au tour par tour'] = "[[Catégorie:Jeu vidéo de stratégie au tour par tour]]"
categoryMapping['stratégie en temps réel'] = "[[Catégorie:Jeu vidéo de stratégie en temps réel]]"
categoryMapping['stratégie'] = "[[Catégorie:Jeu de stratégie]]"
categoryMapping['survival horror'] = "[[Catégorie:Survival horror]]"
categoryMapping['tactical RPG'] = "[[Catégorie:Tactical RPG]]"
categoryMapping['tir objectif'] = "[[Catégorie:Jeu de tir objectif]]"
categoryMapping['tir subjectif'] = "[[Catégorie:Jeu de tir subjectif]]"

categoryMapping['GPL'] = "[[Catégorie:Jeu vidéo libre]]"
categoryMapping['LGPL'] = "[[Catégorie:Jeu vidéo libre]]"
categoryMapping['MPL'] = "[[Catégorie:Jeu vidéo libre]]"
categoryMapping['BSD'] = "[[Catégorie:Jeu vidéo libre]]"
categoryMapping['CeCILL'] = "[[Catégorie:Jeu vidéo libre]]"
categoryMapping['domaine public'] = "[[Catégorie:Jeu vidéo libre]]"
categoryMapping['gratuiciel'] = "[[Catégorie:Jeu en gratuiciel]]"
categoryMapping['MIT'] = "[[Catégorie:Jeu vidéo libre]]"
categoryMapping['Apache'] = "[[Catégorie:Jeu vidéo libre]]"
categoryMapping['APSL'] = "[[Catégorie:Jeu vidéo libre]]"

sectionMapping = new Array()

sectionMapping['Synopsis'] = "== Synopsis =="
sectionMapping['Scénario'] = "== Scénario =="
sectionMapping['Gameplay'] = "== Système de jeu =="
sectionMapping['Histoire du développement'] = "== Développement =="
sectionMapping['Équipe de développement'] = "== Équipe de développement =="
sectionMapping['À noter'] = "== À noter =="
sectionMapping['Anecdote'] = "== Anecdote =="
sectionMapping['Notes et références'] = "== Notes et références =="
sectionMapping['Liens externes'] = "== Liens externes =="
sectionMapping['Voir aussi'] = "== Voir aussi ==<br/>=== Liens internes ===<br/>=== Liens externes ==="


/** Pour des problèmes de portabilité avec certaine implémentation de
 * JavaScript : indexOf pour un Array n'est pas toujour présent
 */
function indexOf(array, value) {
        for (i=0; i < array.length; i++) {
                if (array[i] == value) return i;
        }
        return -1;
}

function ClassCompute() {

        this.init = function() {
                this.titre = "";
                this.image = "";
                this.editeur = new Array();
                this.developpeur = new Array();
                this.concepteur = new Array();
                this.date = new Array();
                this.debutProjet = null;
                this.licence = Array();
                this.version = "";
                this.genre = new Array();
                this.mode = new Array();
                this.plateforme = new Array();
                this.media = new Array();
                this.langue = ""
                this.controle = new Array();
                this.evaluation = new Array();
                this.moteur = "";
                this.section = new Array();
        }
        
        /* setteur */
        
        this.setTitre = function(name, triCategorie) {
                this.titre = name;
                this.triCategorie = triCategorie
                if (name == triCategorie) this.triCategorie = ''
        }
        
        this.setImage = function(name) {
                this.image = name;
        }

        this.setLangue = function(name) {
                this.langue = name;
        }

        this.addEditeur = function(name) {
                if (name != '') this.editeur.push(name);
        }

        this.addMedia = function(name) {
                if (name != '') this.media.push(name);
        }

        this.addControle = function(name) {
                if (name != '') this.controle.push(name);
        }

        this.addDeveloppeur = function(name) {
                if (name != '') this.developpeur.push(name);
        }
        
        this.addConcepteur = function(name) {
                if (name != '') this.concepteur.push(name);
        }

        this.addLicence = function(licence) {
                if (licence != '') this.licence.push(licence);
        }

        this.setVersion = function(name) {
                this.version = name;
        }

        this.addGenre = function(name) {
                if (name != '') this.genre.push(name);
        }

        this.addMode = function(name) {
                if (name != '') this.mode.push(name);
        }

        this.addPlateforme = function(name) {
                if (name != '') this.plateforme.push(name);
        }

        this.addEvaluation = function(evaluation, age, modification) {
                if (age != '') this.evaluation.push(new Array(evaluation, age, modification));
        }

        this.addDate = function(jour, mois, annee, lieu, version) {
                this.date.push(new Array(jour, mois, annee, lieu, version));
        }

        this.addDebutProjet = function(jour, mois, annee) {
                this.debutProjet = new Array(jour, mois, annee);
        }

        this.addSection = function(section) {
                if (section == 'Voir aussi') {
                        i = indexOf(this.section, 'Liens externes')
                        if (i == -1) this.section.push(section)
                        else this.section[i] = section
                } else {
                        this.section.push(section)
                }
        }

        /* function */

        this.generateWikiInIntro = function(text) {
                var result = introMapping[text];
                if (result == undefined) result = templateMapping[text];
                if (result == undefined) result = text
                return result
        }

        this.generateWikiInCategory = function(text) {
                result = categoryMapping[text];
                if (result == undefined) result = ''
                return result
        }

        this.generateWikiInTemplate = function(text) {
                result = templateMapping[text];
                if (result == undefined) result = text
                return result
        }

        this.wikiUpperCaseFirstChar = function(text) {
				index = 0
				if (text.charAt(0) != '[') {
					index = 0
				} else {
					pipe = text.indexOf('|')
					bracket = text.indexOf(']')
					if (pipe == -1 || bracket < pipe) {
						index = 2
					} else {
						index = pipe + 1
					}
				}
				text = text.substr(0, index) + text.charAt(index).toUpperCase() + text.substr(index + 1)
				return text
	        
	    }
        
        this.generateWikiInTemplateByArray = function(array) {
                if (array.length == 0) return ""

                // concatenation of elements
	        	text = ""
                for (i in array) {
                        if (text != "") {
                                text += ", "
                        }
                        text += this.generateWikiInTemplate(array[i]);
                }
                
                text = this.wikiUpperCaseFirstChar(text)
				return text
        }

        this.getMappingSection = function(text) {
                result = sectionMapping[text];
                if (result == undefined) result = ''
                return result
        }
        
        this.generateHRef = function(name, text) {
                return name;
        }

        this.generateImage = function(name, size, description) {
                return '« ' + name + ' »';
        }

        this.generateWikiIntro = function() {
                var result = '';
                result += "'''''" + this.titre + "''''' est un [[jeu vidéo]] "

                subresult = ""
                for (i=0; i < this.genre.length; i++) {
                        if (subresult != "") {
                                if (this.genre[i+1] == undefined) subresult += " et "
                                else subresult += ", "
                        }
                        subresult += this.generateWikiInIntro(this.genre[i]);
                }
                result += subresult
                if (this.date.length != 0) {
                        d = '9999'
                        for (i=0; i < this.date.length; i++) {
                                if (this.date[i][2] < d) d = this.date[i][2];
                        }
                        result += " sorti en [[" + d + " en jeu vidéo|" + d + "]]";
                }
                trace('intro : plate-forme')
                if (this.plateforme.length != 0) {
                        subresult = ""
                        for (i=0; i < this.plateforme.length; i++) {
                                if (subresult != "") {
                                        if (this.plateforme[i+1] == undefined) subresult += " et "
                                        else subresult += ", "
                                }
                                subresult += this.generateWikiInIntro(this.plateforme[i]);
                        }
                        result += " et fonctionne sur " + subresult;
                }
                result += '. '

                trace('intro : développeur')
                d = ''
                if (this.developpeur.length != 0) {
                        subresult = ""
                        for (i=0; i < this.developpeur.length; i++) {
                                if (subresult != "") {
                                        if (this.developpeur[i+1] == undefined) subresult += " et "
                                        else subresult += ", "
                                }
                                subresult += '[[' + this.developpeur[i] + ']]';
                        }
                        d = subresult;
                }
                e = ''
                if (this.editeur.length != 0) {
                        subresult = ""
                        for (i=0; i < this.editeur.length; i++) {
                                if (subresult != "") {
                                        if (this.editeur[i+1] == undefined) subresult += " et "
                                        else subresult += ", "
                                }
                                subresult += '[[' + this.editeur[i] + ']]';
                        }
                        e = subresult;
                }
                c = ''
                if (this.concepteur.length != 0) {
                        subresult = ""
                        for (i=0; i < this.concepteur.length; i++) {
                                if (subresult != "") {
                                        if (this.concepteur[i+1] == undefined) subresult += " et "
                                        else subresult += ", "
                                }
                                subresult += '[[' + this.concepteur[i] + ']]';
                        }
                        c = subresult;
                }
                if (d && e && c) result += 'Développé par ' + d + ' et édité par ' + e + ', le jeu a été conçu par ' + c + '. '
                else if (e && c) result += 'Édité par ' + e + ', le jeu a été conçu par ' + c + '. '
                else if (d && c) result += 'Développé par ' + d + ', le jeu a été conçu par ' + c + '. '
                else if (d && e) result += 'Le jeu a été développé par ' + d + ' puis édité par ' + e + '. '
                else if (d) result += 'Le jeu a été développé par ' + d + '. '
                else if (e) result += 'Le jeu a été édité par ' + e + '. '
                else if (c) result += 'Le jeu a été conçu par ' + c + '. '

                return result;
        }

        this.generateWikiCategory = function() {
                var cat = new Array()

                trace('gen category : genre')
                for (i in this.genre) {
                    c = this.generateWikiInCategory(this.genre[i]);
                    if (indexOf(cat, c) != -1) continue;
                    cat.push(c)
                }

                trace('gen category : date')
                if (this.date.length != 0) {
                    d = '9999'
                    for (i in this.date) {
                        if (this.date[i][2] < d) d = this.date[i][2];
                    }
                    cat.push('[[Catégorie:Jeu vidéo sorti en ' + d + ']]');
                }

                trace('gen category : plate-forme')
                subcat = new Array();
                for (i in this.plateforme) {
                    c = this.generateWikiInCategory(this.plateforme[i]);
                    if (indexOf(cat, c) != -1) continue;
                    subcat.push(c)
                }
                subcat = subcat.sort(categorySort);
                for (i in subcat) {
                    cat.push(subcat[i]);
	            }
                

                trace('gen category : licence')
                for (i in this.licence) {
                    c = this.generateWikiInCategory(this.licence[i]);
                    if (indexOf(cat, c) != -1) continue;
                    cat.push(c)
                }

                var result = ''
                for (i in cat) {
                    if (cat[i] != '') {
                        result += cat[i] + '<br/>'
                    }
                }

                if (this.triCategorie != '' && result != '') {
                    result = '{{DEFAULTSORT:' + this.triCategorie + '}}<br/>' + result
                }
                if (result != '') {
	                result = '<br/><br/>' + result
	            }
                return result
        }

        this.generateWikiTemplate = function() {
                values = new Array();
                NEWLINE = '<br/>'
                
                /* titre, image */
                values['titre'] = this.titre
                
                text = ''
                if (this.image != '') text = '[[' + this.image + '|250px]]'
                values['image'] = text
                
                /* éditeur, développeur, concepteur */
                var text = ""
                for (i in this.editeur) {
                        if (text != "") {
                                text += ", "
                        }
                        text += '[[' + this.editeur[i] + ']]';
                }
                values['éditeur'] = text

                var text = ""
                for (i in this.developpeur) {
                        if (text != "") {
                                text += ", "
                        }
                        text += '[[' + this.developpeur[i] + ']]';
                }
                values['développeur'] = text

                var text = ""
                for (i in this.concepteur) {
                        if (text != "") {
                                text += ", "
                        }
                        text += '[[' + this.concepteur[i] + ']]';
                }
                values['concepteur'] = text

                /* début du projet */
                text = ''
                j = this.debutProjet[0]
                m = this.debutProjet[1]
                a = this.debutProjet[2]
                if (m != '' && j != '' && a != '') text += ' ' + j
                if (m != '' && a != '') text += ' ' + m
                if (a != '') text += ' ' + a

                values['début du projet'] = text

                /* date */
                text = ''
                if (this.date.length == 0) {
                } else if (this.date.length == 1) {
                        j = this.date[0][0]
                        m = this.date[0][1]
                        a = this.date[0][2]
                        l = this.date[0][3]
                        v = this.date[0][4]
                        t = ''
                        if (v != '') t += v + ' :'
                        if (m != '' && j != '') t += ' ' + j
                        if (m != '') t += ' ' + m
                        t += ' [[' + a + ' en jeu vidéo|' + a + ']]'
                        if (l != '') t += ' (' + l + ')'
                        text += t
                        
                } else {
                        for (i in this.date) {
                                j = this.date[i][0]
                                m = this.date[i][1]
                                a = this.date[i][2]
                                l = this.date[i][3]
                                v = this.date[i][4]
                                t = NEWLINE + '*'
                                if (v != '') t += v + ' :'
                                if (m != '' && j != '') t += ' ' + j
                                if (m != '') t += ' ' + m
                                t += ' [[' + a + ' en jeu vidéo|' + a + ']]'
                                if (l != '') t += ' (' + l + ')'
                                text += t
                        }
                }
                values['date'] = text

                values['licence']     = this.generateWikiInTemplateByArray(this.licence)
                values['version']     = this.version
                values['genre']       = this.generateWikiInTemplateByArray(this.genre)
                values['mode']        = this.generateWikiInTemplateByArray(this.mode)
                values['plate-forme'] = this.generateWikiInTemplateByArray(this.plateforme)
                values['média']       = this.generateWikiInTemplateByArray(this.media)
                values['langue']      = this.langue
                values['contrôle']    = this.generateWikiInTemplateByArray(this.controle)
                
                /* évaluation */
                text = ''
                if (this.evaluation.length == 0) {
	                // nothing
                } else if (this.evaluation.length == 1) {
                        text = this.generateWikiInTemplate(this.evaluation[0][0]) + ' : ' + this.evaluation[0][1]
                        if (this.evaluation[0][2] != '') {
                                text += ', ' + this.evaluation[0][2]
                        }
                } else {
                        for (i in this.evaluation) {
                                text += NEWLINE + '*'
                                text += this.generateWikiInTemplate(this.evaluation[i][0]) + ' : ' + this.evaluation[i][1]
                                if (this.evaluation[i][2] != '') {
                                        text += ', ' + this.evaluation[i][2]
                                }
                        }
                }
                values['évaluation'] = text
                
                values['moteur de jeu'] = ''

                /* génère le modèle */
                template = '{{Infobox Jeu vidéo' + NEWLINE
                champs = new Array('titre', 'image', 'éditeur', 'développeur', 'concepteur', 'début du projet', 'date', 'licence', 'version', 'genre', 'mode', 'plate-forme', 'média', 'langue', 'contrôle', 'évaluation', 'moteur de jeu');
                for (i in champs) {
                        template += '|' + champs[i] + '=' + values[champs[i]] + NEWLINE
                }
                template += '}}'
                return template;
        }

        this.generateSection = function() {
                var wiki = ''
                for (i in this.section) {
                        w = this.getMappingSection(this.section[i])
                        if (w != '') {
                                wiki += '<br/><br/>' + w;
                        }
                }
                return wiki;
        }

        this.generateHTMLTemplate = function() {
                var template = new String(document.getElementById("sourceHTML").innerHTML)
                template = template.replace("{{{titre}}}", this.titre)
                template = template.replace("{{{image}}}", this.generateImage(this.image, 250, ''))

                var text = ""
                for (i in this.editeur) {
                        if (text != "") {
                                text += ", "
                        }
                        text += this.generateHRef(this.editeur[i]);
                }
                template = template.replace("{{{éditeur}}}", text)

                var text = ""
                for (i in this.developpeur) {
                        if (text != "") {
                                text += ", "
                        }
                        text += this.generateHRef(this.developpeur[i]);
                }
                template = template.replace("{{{développeur}}}", text)

                var text = ""
                for (i in this.concepteur) {
                        if (text != "") {
                                text += ", "
                        }
                        text += this.generateHRef(this.concepteur[i]);
                }
                template = template.replace("{{{concepteur}}}", text)

                var text = ""
                for (i in this.plateforme) {
                        if (text != "") {
                                text += ", "
                        }
                        text += this.generateHRef(this.plateforme[i]);
                }
                template = template.replace("{{{plate-forme}}}", text)

                return template;
        } 
        
        
}

function initData() {
        c = new ClassCompute();
        c.init();
        
        trace('init : titre, image, éditeur, développeur, concepteur, licence, début du projet')
        c.setTitre(document.getElementById("formTitre").value, document.getElementById("formTriCategorie").value)

        c.setImage(document.getElementById("formImage").value)

        c.addEditeur(document.getElementById("formEditeur1").value)
        c.addEditeur(document.getElementById("formEditeur2").value)
        c.addEditeur(document.getElementById("formEditeur3").value)

        c.addDeveloppeur(document.getElementById("formDeveloppeur1").value)
        c.addDeveloppeur(document.getElementById("formDeveloppeur2").value)
        c.addDeveloppeur(document.getElementById("formDeveloppeur3").value)

        c.addConcepteur(document.getElementById("formConcepteur1").value)
        c.addConcepteur(document.getElementById("formConcepteur2").value)
        c.addConcepteur(document.getElementById("formConcepteur3").value)

        c.addLicence(document.getElementById("formLicence").value)

        jour = document.getElementById("formDebutProjetJour").value
        mois = document.getElementById("formDebutProjetMois").value
        annee = document.getElementById("formDebutProjetAnnee").value
        c.addDebutProjet(jour, mois, annee)

        trace('init : date de sortie, dernière version, genre')
        for (var i = 1; i <= 3; i++) {
                jour = document.getElementById("formDateSortieJour" + i).value
                mois = document.getElementById("formDateSortieMois" + i).value
                annee = document.getElementById("formDateSortieAnnee" + i).value
                lieu = document.getElementById("formDateSortieLieu" + i).value
                ver = document.getElementById("formDateSortieVersion" + i).value
                if (annee != '') {
                        c.addDate(jour, mois, annee, lieu, ver)
                }
        }

        c.setVersion(document.getElementById("formDerniereVersion").value)

        c.addGenre(document.getElementById("formGenre1").value)
        c.addGenre(document.getElementById("formGenre2").value)

        trace('init : mode')
        var currentObject = document.getElementById("formMode")
        for (var i=0; i < currentObject.options.length; i++ ) {
                if (currentObject.options[i].selected) {
                        c.addMode(currentObject.options[i].text)
                }
        }

        trace('init : plate-forme')
		form = document.getElementById("formPlatformSelection")
		for (var i=0; i < form.options.length; i++ ) {
			if (form.options[i] != null) {
                trace('init : addPlateforme ' + form.options[i].text)
                c.addPlateforme(form.options[i].text)
				
			}
		}

        trace('init : média, contrôle')
        c.addMedia(document.getElementById("formMedia1").value)
        c.addMedia(document.getElementById("formMedia2").value)

        c.setLangue(document.getElementById("formLangue").value)

        c.addControle(document.getElementById("formControle1").value)
        c.addControle(document.getElementById("formControle2").value)
        c.addControle(document.getElementById("formControle3").value)

        trace('init : évaluation du public')
        c.addEvaluation('PEGI',   document.getElementById("formPEGI").value, '')
        c.addEvaluation('CERO',   document.getElementById("formCERO").value, '')
        c.addEvaluation('ESRB',   document.getElementById("formESRB").value, '')
        c.addEvaluation('BBFC',   document.getElementById("formBBFC").value, '')
        c.addEvaluation('SELL',   document.getElementById("formSELL").value, '')
        c.addEvaluation('ELSPA',  document.getElementById("formELSPA").value, '')
        c.addEvaluation('OFLCA',  document.getElementById("formOFLCA").value, '')
        c.addEvaluation('OFLCNZ', document.getElementById("formOFLCNZ").value, '')

        trace('init : section')
        var currentObject = document.getElementById("formSection")
        for (var i=0; i < currentObject.options.length; i++ ) {
                if (currentObject.options[i].selected) {
                        c.addSection(currentObject.options[i].text)
                }
        }

        return c;
}

var debugEnabled = false;
var debugDestination = null;

function trace(text) {
	if (debugEnabled) {
		debugDestination.innerHTML = debugDestination.innerHTML + '<br/>' + text
	}
}

function debug(text) {
		// nettoyage du champ de débugage
        debugDestination = document.getElementById("destinationDebug")
        debugDestination.innerHTML = ''
		// lancement de la l'opération
		debugEnabled = true;
		compute();
		debugEnabled = false;
}

function categorySort(a, b) {
	a = a.replace('Catégorie:Jeu vidéo sous ', '')
	a = a.replace('Catégorie:Jeu sous ', '')
	a = a.replace('Catégorie:Jeu d\'', '')
	a = a.replace('Catégorie:Jeu ', '')
	a = a.replace('Catégorie:', '')
	a = a.replace('-', '')
	a = a.replace(/ /g, '')

	b = b.replace('Catégorie:Jeu vidéo sous ', '')
	b = b.replace('Catégorie:Jeu sous ', '')
	b = b.replace('Catégorie:Jeu d\'', '')
	b = b.replace('Catégorie:Jeu ', '')
	b = b.replace('Catégorie:', '')
	b = b.replace('-', '')
	b = b.replace(/ /g, '')
	
	result = a.toLowerCase() < b.toLowerCase()
	// trace(result + ' : ' + a + ' < ' + b)
	return !result?1:-1;
}

function autoSort() {
        titre = document.getElementById("formTitre").value

        // vire les accents
        sort = titre
        sort = sort.replace('À', 'A')
        sort = sort.replace('Â', 'A')
        sort = sort.replace('Ä', 'A')
        sort = sort.replace('É', 'E')
        sort = sort.replace('È', 'E')
        sort = sort.replace('Ê', 'E')
        sort = sort.replace('Ë', 'E')
        sort = sort.replace('Ï', 'I')
        sort = sort.replace('Î', 'I')
        sort = sort.replace('Ô', 'O')
        sort = sort.replace('Ö', 'O')
        sort = sort.replace('Ù', 'U')
        sort = sort.replace('Û', 'U')
        sort = sort.replace('Ü', 'U')
        sort = sort.replace('Ç', 'C')
        sort = sort.replace('à', 'a')
        sort = sort.replace('â', 'a')
        sort = sort.replace('ä', 'a')
        sort = sort.replace('é', 'e')
        sort = sort.replace('è', 'e')
        sort = sort.replace('ê', 'e')
        sort = sort.replace('ë', 'e')
        sort = sort.replace('ï', 'i')
        sort = sort.replace('î', 'i')
        sort = sort.replace('ô', 'o')
        sort = sort.replace('ö', 'o')
        sort = sort.replace('ù', 'u')
        sort = sort.replace('û', 'u')
        sort = sort.replace('ü', 'u')
        sort = sort.replace('ç', 'c')

        // supprime les  "the, le, la, les, l'" initial
        if (sort.toUpperCase().indexOf('THE ') == 0) {
                sort = sort.substr(4)
        } else if (sort.toUpperCase().indexOf('LES ') == 0) {
                sort = sort.substr(4)
        } else if (sort.toUpperCase().indexOf('LA ') == 0) {
                sort = sort.substr(3)
        } else if (sort.toUpperCase().indexOf('LE ') == 0) {
                sort = sort.substr(3)
        } else if (sort.toUpperCase().indexOf('L\'') == 0) {
                sort = sort.substr(2)
        }

        // force une majuscule initiale
        sort = sort.substr(0,1).toUpperCase() + sort.substr(1)
        
        // met à jour le champ
        if (titre.toUpperCase() != sort.toUpperCase()) {
                document.getElementById("formTriCategorie").value = sort
        } else {
                document.getElementById("formTriCategorie").value = ''
        }
}

/* update the platform view using platform the database */
function initPlatform() {
	map = new Array()
	map[""] = ""
	for (p in platforms) {
		meta = platforms[p]
		map[meta[0]] = ""
		templateMapping[p] = meta[3]
		categoryMapping[p] = meta[4]
	}
	manufacturers = new Array()
	for (m in map) {manufacturers.push(m)}
	manufacturers.sort()
	manufacturers.shift()
	
	form = document.getElementById("formPlatformManufacturer")
	form.options[form.options.length] = new Option("tout", "*", true);
	form.options[form.options.length] = new Option("divers", "");
	form.options[form.options.length] = new Option("----------------", "-");
	
	for (i in manufacturers) {
		form.options[form.options.length] = new Option(manufacturers[i], manufacturers[i]);
	}
	updatePlatforms()
}

/* update the platform list using the selection */
function updatePlatforms() {
	manufacturers = new Array()
	form = document.getElementById("formPlatformManufacturer")
	for (var i=0; i < form.options.length; i++ ) {
		if (form.options[i].selected) {
			if (form.options[i].value == "*") {
				manufacturers.length = 0
				break
			}
			manufacturers[form.options[i].value] = ""
			manufacturers[0] = "" // hack : without length = 0
		}
	}
	types = new Array()
	form = document.getElementById("formPlatformType")
	for (var i=0; i < form.options.length; i++ ) {
		if (form.options[i].selected) {
			if (form.options[i].value == "*") {
				types.length = 0
				break
			}
			types[form.options[i].value] = ""
			types[0] = "" // hack : without length = 0
		}
	}
	showOld = false
	showNew = false
	form = document.getElementById("formPlatformOld")
	for (var i=0; i < form.options.length; i++ ) {
		if (form.options[i].selected) {
			if (form.options[i].value == "A") {
				showOld = true
			}
			if (form.options[i].value == "R") {
				showNew = true
			}
		}
	}

	list = new Array()
	for (p in platforms) {
		meta = platforms[p]
		if (manufacturers.length != 0 && !(meta[0] in manufacturers)) continue
		if (types.length != 0 && !(meta[1] in types)) continue
		if (!showOld && meta[2] <= '5') continue
		if (!showNew && meta[2] > '5') continue
		list.push(p)
	}
	list.sort()

	form = document.getElementById("formPlatformResult")
	form.options.length = 0
	for (i in list) {
		form.options[form.options.length] = new Option(list[i], list[i]);
	}
}

/* add selected platform of result into the selection */
function addPlatform() {
	list = new Array()
	form = document.getElementById("formPlatformResult")
	for (var i=0; i < form.options.length; i++ ) {
		if (form.options[i].selected) {
			if (form.options[i].value == "*") {
				types.length = 0
				break
			}
			list.push(form.options[i].text)
		}
	}
	map = new Array()
	form = document.getElementById("formPlatformSelection")
	for (var i=0; i < form.options.length; i++ ) {
		if (form.options[i] != null) {
			map[form.options[i].text] = ""
		}
	}
	for (i in list) {
		if (list[i] in map) continue
		form.options[form.options.length] = new Option(list[i], list[i])
	}
}

/* remove selected platform of the selection */
function removePlatform() {
	list = new Array()
	form = document.getElementById("formPlatformSelection")
	for (var i=0; i < form.options.length; i++ ) {
		if (form.options[i].selected) {
			form.options[i] = null
		}
	}
}

function init() {
	initPlatform()
}

function compute() {
        data = initData()
        var destination = document.getElementById("destinationWiki")

        wiki = ''
        if (document.getElementById("formEbauche").checked) wiki += "{{ébauche|jeu vidéo}}<br/>"
        if (document.getElementById("formFuturJeu").checked) wiki += "{{jeu vidéo futur}}<br/>"
        wiki += data.generateWikiTemplate() + '<br/>'
        wiki += data.generateWikiIntro()
        wiki += data.generateSection()
        wiki += '<br/><br/>{{Portail jeu vidéo}}'
        wiki += data.generateWikiCategory()
        destination.innerHTML = wiki
}

/*]]>*/</script>
</head>


<body>
<h1 class="firstHeading">Création d'ébauches de jeu vidéo</h1>
<i>Cette page est un formulaire qui permet de générer le code wiki d'une ébauche de jeu vidéo. Il faut premièrement compléter le formulaire puis valider le bouton « générer le modèle » en bas. Ce bouton peut être utilisé plusieurs fois consécutivement lorsque par exemple un champ a été modifié. Le code wiki généré n'a ensuite plus qu'à être copié-collé sur Wikipédia dans la zone d'édition de l'article à créer.
</i>
<div class="version">Version 1.3 ; le code reste en perpétuelle évolution pour refléter les changements des articles et des catégories présentes sur Wikipédia. N'hésitez pas à passer sur la page de discussion pour demander des corrections, des modifications ou simplement des explications.</div>
<noscript>
<div class="warning">Merci d'activer JavaScript pour pouvoir utiliser le formulaire.</div>
</noscript>

<h2>Formulaire</h2>
<i>Note : Les champs en rouge ne sont pas utilisés.<br/>
Note : Les selections multiples se font à l'aide de CTRL+clic
</i>
<div class="formulaire">
<table>
<tbody><tr><td>Titre : </td><td><input id="formTitre" type="text" /> <input id="formEbauche" type="checkbox" />ébauche ? <input id="formFuturJeu" type="checkbox" />futur jeu ?</td></tr>
<tr><td>Image : </td><td><input id="formImage" type="text" /></td></tr>
<tr><td>Dernière version :</td><td><input id="formDerniereVersion" type="text" /></td></tr>
<tr><td>Éditeur : </td><td><input id="formEditeur1" type="text" />, <input id="formEditeur2" type="text" />, <input id="formEditeur3" type="text" /></td></tr>
<tr><td>Développeur : </td><td><input id="formDeveloppeur1" type="text" />, <input id="formDeveloppeur2" type="text" />, <input id="formDeveloppeur3" type="text" /></td></tr>
<tr><td>Concepteur : </td><td><input id="formConcepteur1" type="text" />, <input id="formConcepteur2" type="text" />, <input id="formConcepteur3" type="text" /></td></tr>
<tr><td>Début du projet : </td><td>
<select id="formDebutProjetJour"><option value="">—</option>
<option>1</option><option>2</option><option>3</option><option>4</option><option>5</option>
<option>6</option><option>7</option><option>8</option><option>9</option><option>10</option>
<option>11</option><option>12</option><option>13</option><option>14</option><option>15</option>
<option>16</option><option>17</option><option>18</option><option>19</option><option>20</option>
<option>21</option><option>22</option><option>23</option><option>24</option><option>25</option>
<option>26</option><option>27</option><option>28</option><option>29</option><option>30</option><option>31</option>
</select>
<select id="formDebutProjetMois"><option value="">—</option>
<option>janvier</option><option>février</option><option>mars</option><option>avril</option><option>mai</option><option>juin</option>
<option>juillet</option><option>août</option><option>septembre</option><option>octobre</option><option>novembre</option><option>décembre</option>
</select>
<select id="formDebutProjetAnnee"><option value="">—</option>
<option>2009</option><option>2008</option><option>2007</option><option>2006</option><option>2005</option><option>2004</option><option>2003</option><option>2002</option><option>2001</option><option>2000</option>
<option>1999</option><option>1998</option><option>1997</option><option>1996</option><option>1995</option><option>1994</option><option>1993</option><option>1992</option><option>1991</option><option>1990</option>
<option>1989</option><option>1988</option><option>1987</option><option>1986</option><option>1985</option><option>1984</option><option>1983</option><option>1982</option><option>1981</option><option>1980</option>
<option>1979</option><option>1978</option><option>1977</option><option>1976</option><option>1975</option><option>1974</option><option>1973</option><option>1972</option><option>1971</option><option>1970</option>
<option>1969</option><option>1968</option><option>1967</option><option>1966</option><option>1965</option><option>1964</option><option>1963</option><option>1962</option><option>1961</option><option>1960</option>
</select>
</td></tr>
<tr><td valign="top">Date de sortie</td><td>
<table><tbody><tr>
<td>
<h4>version</h4>
<input id="formDateSortieVersion1" type="text" /> : <br/>
<input id="formDateSortieVersion2" type="text" /> : <br/>
<input id="formDateSortieVersion3" type="text" /> : 
</td>
<td>
<h4>jour</h4>
<select id="formDateSortieJour1"><option value="">—</option>
<option>1</option><option>2</option><option>3</option><option>4</option><option>5</option><option>6</option><option>7</option><option>8</option><option>9</option><option>10</option><option>11</option><option>12</option><option>13</option><option>14</option><option>15</option><option>16</option><option>17</option><option>18</option><option>19</option><option>20</option><option>21</option><option>22</option><option>23</option><option>24</option><option>25</option><option>26</option><option>27</option><option>28</option><option>29</option><option>30</option><option>31</option>
</select><br/>
<select id="formDateSortieJour2"><option value="">—</option>
<option>1</option><option>2</option><option>3</option><option>4</option><option>5</option><option>6</option><option>7</option><option>8</option><option>9</option><option>10</option><option>11</option><option>12</option><option>13</option><option>14</option><option>15</option><option>16</option><option>17</option><option>18</option><option>19</option><option>20</option><option>21</option><option>22</option><option>23</option><option>24</option><option>25</option><option>26</option><option>27</option><option>28</option><option>29</option><option>30</option><option>31</option>
</select><br/>
<select id="formDateSortieJour3"><option value="">—</option>
<option>1</option><option>2</option><option>3</option><option>4</option><option>5</option><option>6</option><option>7</option><option>8</option><option>9</option><option>10</option><option>11</option><option>12</option><option>13</option><option>14</option><option>15</option><option>16</option><option>17</option><option>18</option><option>19</option><option>20</option><option>21</option><option>22</option><option>23</option><option>24</option><option>25</option><option>26</option><option>27</option><option>28</option><option>29</option><option>30</option><option>31</option>
</select>
</td>
<td>
<h4>mois</h4>
<select id="formDateSortieMois1"><option value="">—</option>
<option>janvier</option><option>février</option><option>mars</option><option>avril</option><option>mai</option><option>juin</option><option>juillet</option><option>août</option><option>septembre</option><option>octobre</option><option>novembre</option><option>décembre</option>
</select><br/>
<select id="formDateSortieMois2"><option value="">—</option>
<option>janvier</option><option>février</option><option>mars</option><option>avril</option><option>mai</option><option>juin</option><option>juillet</option><option>août</option><option>septembre</option><option>octobre</option><option>novembre</option><option>décembre</option>
</select><br/>
<select id="formDateSortieMois3"><option value="">—</option>
<option>janvier</option><option>février</option><option>mars</option><option>avril</option><option>mai</option><option>juin</option><option>juillet</option><option>août</option><option>septembre</option><option>octobre</option><option>novembre</option><option>décembre</option>
</select>

</td>
<td>
<h4>année</h4>
<select id="formDateSortieAnnee1"><option value="">—</option>
<option>2009</option><option>2008</option><option>2007</option><option>2006</option><option>2005</option><option>2004</option><option>2003</option><option>2002</option><option>2001</option><option>2000</option>
<option>1999</option><option>1998</option><option>1997</option><option>1996</option><option>1995</option><option>1994</option><option>1993</option><option>1992</option><option>1991</option><option>1990</option>
<option>1989</option><option>1988</option><option>1987</option><option>1986</option><option>1985</option><option>1984</option><option>1983</option><option>1982</option><option>1981</option><option>1980</option>
<option>1979</option><option>1978</option><option>1977</option><option>1976</option><option>1975</option><option>1974</option><option>1973</option><option>1972</option><option>1971</option><option>1970</option>
<option>1969</option><option>1968</option><option>1967</option><option>1966</option><option>1965</option><option>1964</option><option>1963</option><option>1962</option><option>1961</option><option>1960</option>
</select><br/>
<select id="formDateSortieAnnee2"><option value="">—</option>
<option>2009</option><option>2008</option><option>2007</option><option>2006</option><option>2005</option><option>2004</option><option>2003</option><option>2002</option><option>2001</option><option>2000</option>
<option>1999</option><option>1998</option><option>1997</option><option>1996</option><option>1995</option><option>1994</option><option>1993</option><option>1992</option><option>1991</option><option>1990</option>
<option>1989</option><option>1988</option><option>1987</option><option>1986</option><option>1985</option><option>1984</option><option>1983</option><option>1982</option><option>1981</option><option>1980</option>
<option>1979</option><option>1978</option><option>1977</option><option>1976</option><option>1975</option><option>1974</option><option>1973</option><option>1972</option><option>1971</option><option>1970</option>
<option>1969</option><option>1968</option><option>1967</option><option>1966</option><option>1965</option><option>1964</option><option>1963</option><option>1962</option><option>1961</option><option>1960</option>
</select><br/>
<select id="formDateSortieAnnee3"><option value="">—</option>
<option>2009</option><option>2008</option><option>2007</option><option>2006</option><option>2005</option><option>2004</option><option>2003</option><option>2002</option><option>2001</option><option>2000</option>
<option>1999</option><option>1998</option><option>1997</option><option>1996</option><option>1995</option><option>1994</option><option>1993</option><option>1992</option><option>1991</option><option>1990</option>
<option>1989</option><option>1988</option><option>1987</option><option>1986</option><option>1985</option><option>1984</option><option>1983</option><option>1982</option><option>1981</option><option>1980</option>
<option>1979</option><option>1978</option><option>1977</option><option>1976</option><option>1975</option><option>1974</option><option>1973</option><option>1972</option><option>1971</option><option>1970</option>
<option>1969</option><option>1968</option><option>1967</option><option>1966</option><option>1965</option><option>1964</option><option>1963</option><option>1962</option><option>1961</option><option>1960</option>
</select>
</td>
<td>
<h4>lieu</h4>
<select id="formDateSortieLieu1"><option value="">—</option>
<option>France</option><option>Europe</option><option>États-Unis</option><option>Amérique du Nord</option><option>Australie</option><option>Japon</option>
</select><br/>
<select id="formDateSortieLieu2"><option value="">—</option>
<option>France</option><option>Europe</option><option>États-Unis</option><option>Amérique du Nord</option><option>Australie</option><option>Japon</option>
</select><br/>
<select id="formDateSortieLieu3"><option value="">—</option>
<option>France</option><option>Europe</option><option>États-Unis</option><option>Amérique du Nord</option><option>Australie</option><option>Japon</option>
</select>
</td>

</tr></tbody></table>

</td></tr>

<tr><td>Licence : </td><td>
<select id="formLicence"><option value="">—</option>
<option>Apache</option>
<option>APSL</option>
<option>BSD</option>
<option>CeCILL</option>
<option>domaine public</option>
<option>GPL</option>
<option>gratuiciel</option>
<option>LGPL</option>
<option>MIT</option>
<option>MPL</option>
<option>partagiciel</option>
</select>
</td></tr>

<tr><td>Genre : </td><td>
<select id="formGenre1"><option value="">—</option>
<option>action</option><option>action-aventure</option><option>arcade</option><option>aventure</option><option>beat them all</option><option>casse-briques</option><option>combat</option><option>course</option><option>flipper</option><option>gestion</option><option>infiltration</option><option>party game</option><option>plates-formes</option><option>puzzle</option><option>porte-monstre-trésor</option><option>rythme</option><option>réflexion</option><option>rôle</option><option>shoot them up</option><option>simulation</option><option>simulation de vie</option><option>simulation de vol</option>
<optgroup label="sport">
	<option>sport</option>
	<option>baseball</option>
	<option>basket-ball</option>
	<option>billard</option>
	<option>bowling</option>
	<option>boxe</option>
	<option>catch</option>
	<option>équitation</option>
	<option>football</option>
	<option>football américain</option>
	<option>sport de glisse</option>
	<option>golf</option>
	<option>hockey sur glace</option>
	<option>rugby</option>
	<option>tennis</option>
</optgroup>
<option>stratégie au tour par tour</option><option>stratégie en temps réel</option><option>stratégie</option><option>survival horror</option><option>tactical RPG</option><option>tir objectif</option><option>tir subjectif</option>
</select>
<select id="formGenre2"><option value="">—</option>
<option>action</option><option>action-aventure</option><option>arcade</option><option>aventure</option><option>beat them all</option><option>casse-briques</option><option>combat</option><option>course</option><option>flipper</option><option>gestion</option><option>infiltration</option><option>party game</option><option>plates-formes</option><option>puzzle</option><option>porte-monstre-trésor</option><option>rythme</option><option>réflexion</option><option>rôle</option><option>shoot them up</option><option>simulation</option><option>simulation de vie</option><option>simulation de vol</option>
<optgroup label="sport">
	<option>sport</option>
	<option>baseball</option>
	<option>basket-ball</option>
	<option>billard</option>
	<option>bowling</option>
	<option>boxe</option>
	<option>catch</option>
	<option>équitation</option>
	<option>football</option>
	<option>football américain</option>
	<option>sport de glisse</option>
	<option>golf</option>
	<option>hockey sur glace</option>
	<option>rugby</option>
	<option>tennis</option>
</optgroup>
<option>stratégie au tour par tour</option><option>stratégie en temps réel</option><option>stratégie</option><option>survival horror</option><option>tactical RPG</option><option>tir objectif</option><option>tir subjectif</option>
</select>
</td></tr>

<tr><td valign="top">Mode : </td><td>
<select multiple="multiple" size="4" id="formMode">
<option>Un joueur</option><option>2 joueurs</option><option>Multijoueur</option><option>Massivement multijoueur</option>
</select>
</td></tr>

<tr><td valign="top">Plates-formes : </td><td>
<table><tbody><tr><td>
<h4>Constructeurs</h4>
	<select multiple="multiple" size="10" id="formPlatformManufacturer" onchange="updatePlatforms()" />
</td><td valign="top">
<h4>Types</h4>
	<select multiple="multiple" size="5" id="formPlatformType" onchange="updatePlatforms()">
	<option value="A" selected="selected">Borne d'arcade</option>
	<option value="CS" selected="selected">Console de salon</option>
	<option value="CP" selected="selected">Console portable</option>
	<option value="O" selected="selected">Ordinateur</option>
	<option value="SE" selected="selected">Système d'exploitation</option>
	</select>
<h4>Âge</h4>
	<select multiple="multiple" size="2" id="formPlatformOld" onchange="updatePlatforms()">
	<option value="A" selected="selected">Ancien</option>
	<option value="R" selected="selected">Récent</option>
	</select>
</td><td>
<h4>Résultats</h4>
	<select multiple="multiple" size="10" id="formPlatformResult" ondblclick="addPlatform()" />
</td><td>
→<br />←
</td><td>
<h4>Sélection</h4>
	<select multiple="multiple" size="10" id="formPlatformSelection" ondblclick="removePlatform()" />
</td></tr></tbody></table>
</td></tr>

<tr><td>Média : </td><td>
<select id="formMedia1"><option value="">—</option>
<option>disquette</option>
<option>2 disquettes</option>
<option>3 disquettes</option>
<option>4 disquettes</option>
<option>5 disquettes</option>
<option>6 disquettes</option>
<option>cartouche</option>
<option>2 cartouches</option>
<option>CD</option>
<option>2 CD</option>
<option>3 CD</option>
<option>4 CD</option>
<option>DVD</option>
<option>2 DVD</option>
<option>mini DVD</option>
<option>2 mini DVD</option>
<option>UMD</option>
<option>disque Blu-ray</option>
</select>
<select id="formMedia2"><option value="">—</option>
<option>disquette</option>
<option>2 disquettes</option>
<option>3 disquettes</option>
<option>4 disquettes</option>
<option>5 disquettes</option>
<option>6 disquettes</option>
<option>cartouche</option>
<option>2 cartouches</option>
<option>CD</option>
<option>2 CD</option>
<option>3 CD</option>
<option>4 CD</option>
<option>DVD</option>
<option>2 DVD</option>
<option>mini DVD</option>
<option>2 mini DVD</option>
<option>UMD</option>
<option>disque Blu-ray</option>
</select>
</td></tr>

<tr><td>Langue : </td><td>
<select id="formLangue"><option value="">—</option>
<option>Anglais</option>
<option>Anglais sous titré</option>
<option>Japonais</option>
<option>Japonais sous titré anglais</option>
<option>Japonais sous titré français</option>
<option>Français</option>
<option>Multilangue</option>
</select>
</td></tr>

<tr><td>Contrôle : </td><td>
<select id="formControle1"><option value="">—</option>
<option>clavier</option>
<option>écran tactile</option>
<option>joystick</option>
<option>manette de jeu</option>
<option>Nunchuk</option>
<option>souris</option>
<option>volant</option>
<option>Wiimote</option>
</select>
<select id="formControle2"><option value="">—</option>
<option>clavier</option>
<option>écran tactile</option>
<option>joystick</option>
<option>manette de jeu</option>
<option>Nunchuk</option>
<option>souris</option>
<option>volant</option>
<option>Wiimote</option>
</select>
<select id="formControle3"><option value="">—</option>
<option>clavier</option>
<option>écran tactile</option>
<option>joystick</option>
<option>manette de jeu</option>
<option>Nunchuk</option>
<option>souris</option>
<option>volant</option>
<option>Wiimote</option>
</select>
</td></tr>

<tr><td valign="top">Évaluation : </td><td>
<table class="evaluation"><tbody><tr>

<td valign="top">

<table>

<tr>
<td>
<h4>ESRB</h4>
</td>
<td>
<select id="formESRB"><option value="">—</option>
<option>Early Childhood (eC)</option>
<option>Everyone (E)</option>
<option>Kids to Adults (K-A)</option>
<option>Everyone 10+ (E10+)</option>
<option>Teen (T)</option>
<option>Mature (M)</option>
<option>Adults Only (AO)</option>
<option>Rating Pending (RP)</option>
</select>
</td>
</tr>

<tr>
<td>
<h4>CERO</h4>
</td>
<td>
<select id="formCERO"><option value="">—</option>
<option>Tout âge</option>
<option>12 ans et plus</option>
<option>15 ans et plus</option>
<option>18 ans et plus</option>
</select>
</td>
</tr>

<tr>
<td>
<h4>PEGI</h4>
</td>
<td>
<select id="formPEGI"><option value="">—</option>
<option>3 ans et plus</option>
<option>7 ans et plus</option>
<option>12 ans et plus</option>
<option>16 ans et plus</option>
<option>18 ans et plus</option>
</select>
</td>
</tr>

<tr>
<td>
<h4>BBFC</h4>
</td>
<td>
<select id="formBBFC"><option value="">—</option>
<option>15 ans et plus</option>
<option>18 ans et plus</option>
<option>Restricted 18 (R18)</option>
</select>
</td>
</tr>

</table>


</td>
<td valign="top">
<table>


<tr>
<td>
<h4>SELL</h4>
</td>
<td>
<select id="formSELL"><option value="">—</option>
<option>Tout public</option>
<option>12 ans et plus</option>
<option>16 ans et plus</option>
<option>18 ans et plus</option>
</select>
</td>
</tr>

<tr>
<td>
<h4>ELSPA</h4>
</td>
<td>
<select id="formELSPA"><option value="">—</option>
<option>3 ans et plus</option>
<option>11 ans et plus</option>
<option>15 ans et plus</option>
<option>18 ans et plus</option>
</select>
</td>
</tr>

<tr>
<td>
<h4>OFLC (Australie)</h4>
</td>
<td>
<select id="formOFLCA"><option value="">—</option>
<option>General (G)</option>
<option>General for children (G8+)</option>
<option>Parental Guidance (PG)</option>
<option>Mature (M)</option>
<option>Mature Accompanied (MA 15+)</option>
<option>Prohibé</option>
</select>
</td>
</tr>

<tr>
<td>
<h4>OFLC (Nouvelle-Zélande)</h4>
</td>
<td>
<select id="formOFLCNZ"><option value="">—</option>
<option>General (G)</option>
<option>Parental Guidance (PG)</option>
<option>Mature (M)</option>
<option>Restricted 13 (R13)</option>
<option>Restricted 15 (R15)</option>
<option>Restricted 16 (R16)</option>
<option>Restricted 18 (R18)</option>
<option>Restricted (R)</option>
</select>
</td>
</tr>

</table>
</td>
</tr></tbody></table>

<div style="display:none">
<h4>modificateurs PEGI</h4>
<select multiple="multiple" size="6" id="formPEGImodificateur" class="unused">
<option>discrimination</option>
<option>drogue</option>
<option>langage grossier</option>
<option>peur</option>
<option>sexe</option>
<option>violence</option>
</select>
</div>

</td>
</tr></tbody></table>
</div>

<div class="formulaire">
<table>

<tr><td valign="top">Classement :</td>
<td valign="top"><input id="formTriCategorie" type="text" /><br/><input type="button" value="Générer ce champ" onclick="autoSort()" /></td>
<td><i>Permet de personnaliser le classement de l'article dans les catégories. Voir l'<a href="http://fr.wikipedia.org/wiki/Aide:Cat%C3%A9gorie#Comment_.C3.A9chapper_au_classement_.C2.AB_par_d.C3.A9faut_.C2.BB">aide complète concernant les catégories</a>. Le bouton « générer ce champ » permet de réaliser les traitements classiques, comme retirer les caractères accentués ou supprimer un article défini placé en début de titre.</i></td>
</tr>

<tr><td valign="top">
Section :
</td><td valign="top">
<select multiple="multiple" size="6" id="formSection">
<option>Synopsis</option>
<option>Scénario</option>
<option>Histoire du développement</option>
<option>Gameplay</option>
<option>Équipe de développement</option>
<option>À noter</option>
<option>Anecdote</option>
<option>Liens externes</option>
<option>Voir aussi</option>
</select>
</td><td>
<i>Permet de rajouter dans le code wiki des sections vides.
Ces titres sont là pour créer un découpage de l'article homogénéisé. Aucun ne devrait être généré si du texte n'y est pas ajouté lors de la création de l'ébauche. Pour de plus amples informations voir l'<a href="http://fr.wikipedia.org/wiki/Projet:Jeu_vid%C3%A9o/Aide_%C3%A0_la_r%C3%A9daction#Plan_pour_la_r.C3.A9daction_d.27un_article_sur_un_jeu_vid.C3.A9o">aide de rédaction</a>.
</i>
</td></tr>
</table>
</div>

<div class="formulaire">
<input type="button" value="Générer l'ébauche" onclick="compute()" />
<input type="reset" value="Blanchir le formulaire" />
<input type="button" value="Debug" onclick="debug()" />
</div>

<h2>Code wiki</h2>

<div id="destinationDebug"></div>

<div id="destinationWiki">vide pour le moment</div>

<script type="text/javascript">init()</script>

</body>