<!-- start
// Pokemon Maker v4.21 11/16/2005 12:15 PM CST
// All Function by kpdavatar@programmer.net

function Thanks(){
var tlog=" ";
tlog="Remerciements à:\r\n";
tlog+="Nintendo pour avoir fait le Game Boy Advance.\r\n";
tlog+=" Sans GBA, pas de Jeux!\r\n";
tlog+="Game freak pour avoir créé pokemon Rubis/Saphir/Emeraude/Rouge feu/Vert feuille .\r\n";
tlog+=" Pas de Jeux, pas de raison de faire les programmes\r\n";
tlog+="Nintendo pour avoir fait l'Adaptateur de jeux GBA sur la Game Cube.\r\n";
tlog+=" Besoin de faire des captures d'images\r\n";
tlog+="Datel pour l'Action Replay v3 pour la GBA.\r\n";
tlog+=" Besoin de mettre les pokemon sur GBA!\r\n";
tlog+=" Besoin de faire des sauvegardes, même si elles sont en 64kb.\r\n";
tlog+=" Besoin des Sauvegardes pour trouver  les 80b d'un pokemon.\r\n";
tlog+="Raihan Kibria.\r\n";
tlog+=" Créateur de l'éditeur hexadécimal utilisé pour voir les sauvegardes depuis l'AR.\r\n";
tlog+=" Besoin de trouver le 80b pour faire un pokemon.\r\n";
tlog+="http://www.Codejunkies.com\r\n";
tlog+=" Pour les codes pokemon.\r\n";
tlog+="Parasyte\r\n";
tlog+=" Pour les informations sur les codes de l'Action Replay 3\r\n";
tlog+="http://pokefor.tk meowth346 pour toutes les images et les informations des pokemon.\r\n";
tlog+=" Enormément d'informations sur les capacitées, les stats...\r\n";
tlog+="xyzman pour la structure ABCD et l'ordre des rubans spéciaux.\r\n";
tlog+=" Pour le 2b d'informations, non trouvé avant.\r\n";
tlog+="BurleyEd pour les infos sur rouge feu/vert feuille, Mew/Deoxys obéissant...\r\n";
tlog+="http://steve_js.tripod.com/spc/index.html for\r\n";
tlog+=" Pour son programme (Utilisé pour faire des sauvegardes des codes de l'action replay 3)\r\n";
tlog+="mastersord pour les types de codes de la CB\r\n";
tlog+="Pikachu 025 pour les informations d'images\r\n";
tlog+="LoadingNOW pour avoir trouvé le code DMA/Mem encrypt pour pokemon rouge feu/vert feuille USA\r\n";
tlog+="kenobi pour son code DMA/Mem pour pokemon emeraude et les infos de la CB de type 5\r\n";
tlog+="gscentral.com pour pokemon rouge feu/vert feuille US codes CB (m) \r\n";
document.PokemonForm.LogC.value=tlog;
}

function MaxContest(){
var f=document.PokemonForm;
f.Luster.value=255;
f.Cool.value=255;
f.Beauty.value=255;
f.Cute.value=255;
f.Smart.value=255;
f.Tough.value=255;
}

function MaxDV(){
var f=document.PokemonForm;
f.HPDV.options[31].selected=true;
f.AtkDV.options[31].selected=true;
f.DefDV.options[31].selected=true;
f.SpeDV.options[31].selected=true;
f.SpADV.options[31].selected=true;
f.SpDDV.options[31].selected=true;
dv=HPower();
}

function MaxEff(){
var f=document.PokemonForm;
f.HPEff.value=255;
f.AtkEff.value=255;
f.DefEff.value=255;
f.SpeEff.value=255;
f.SpAEff.value=255;
f.SpDEff.value=255;
dv=HPower();
}

function RandomEf(){
var f=document.PokemonForm;
var dv=0;
dv=Math.floor(Math.random() * 256);
f.HPEff.value=dv;
dv=Math.floor(Math.random() * 256);
f.AtkEff.value=dv;
dv=Math.floor(Math.random() * 256);
f.DefEff.value=dv;
dv=Math.floor(Math.random() * 256);
f.SpeEff.value=dv;
dv=Math.floor(Math.random() * 256);
f.SpAEff.value=dv;
dv=Math.floor(Math.random() * 256);
f.SpDEff.value=dv;
dv=HPower();
}

function MSGReset(){
var f=document.PokemonForm;
f.S0M.options[0].selected=true;
f.S1M.options[0].selected=true;
f.S2M.options[0].selected=true;
f.S3M.options[0].selected=true;
f.S4M.options[0].selected=true;
f.S5M.options[0].selected=true;
f.S6M.options[0].selected=true;
}

function OnRibbons(which){
var f=document.PokemonForm;
var d=document;
if(which=="20" || which=="32"){
f.RCool.selectedIndex=4;
f.RBeauty.selectedIndex=4;
f.RCute.selectedIndex=4;
f.RSmart.selectedIndex=4;
f.RTough.selectedIndex=4;
}
if(which=="5" || which=="32"){
f.RChampion.checked=true;
f.RB50.checked=true;
f.RB100.checked=true;
f.RSketch.checked=true;
f.RHardWorker.checked=true;
}
if(which=="7" || which=="32"){
f.RS0.checked=true;
f.RS1.checked=true;
f.RS2.checked=true;
f.RS3.checked=true;
f.RS4.checked=true;
f.RS5.checked=true;
f.RS6.checked=true;
}
}

function NoRibbons(which){
var f=document.PokemonForm;
var d=document;
if(which=="20" || which=="32"){
f.RCool.selectedIndex=0;
f.RBeauty.selectedIndex=0;
f.RCute.selectedIndex=0;
f.RSmart.selectedIndex=0;
f.RTough.selectedIndex=0;
}
if(which=="5" || which=="32"){
f.RChampion.checked=false;
f.RB50.checked=false;
f.RB100.checked=false;
f.RSketch.checked=false;
f.RHardWorker.checked=false;
}
if(which=="7" || which=="32"){
f.RS0.checked=false;
f.RS1.checked=false;
f.RS2.checked=false;
f.RS3.checked=false;
f.RS4.checked=false;
f.RS5.checked=false;
f.RS6.checked=false;
}
}

function MaxUPP(){
var d=0;
document.PokemonForm.M1UPP.options[3].selected=true;
document.PokemonForm.M2UPP.options[3].selected=true;
document.PokemonForm.M3UPP.options[3].selected=true;
document.PokemonForm.M4UPP.options[3].selected=true;
d=NMove('5');
}

function SetAb(){
var f=document.PokemonForm;
var A=f.Ability;
var pdex=" ";
var pgn=0;
var p=0;
var o=" ";
var at0=" ";
var an0=0;
var at1=" ";
var an1=0;
var t=" ";
var u=" ";
pgn=f.Species.options[f.Species.selectedIndex].value;
pdex=PokeDex(pgn);
t=FI(pdex,"~",19);
if(t.length>2){
 u=FI(t,"/",1);
 an1=parseInt(u,10);
 t=t.substring(0,(t.length-u.length-1));
 an0=parseInt(t,10);
}else{
 an0=parseInt(t,10);
 an1=77;
}
at0=Ab(an0,0);
at1=Ab(an1,0);
p=A.selectedIndex;
A.options.length=0;
A.options[0] = new Option(at0,"0",true);
A.options[1] = new Option(at1,"1");
A.options.length=2;
A.selectedIndex=p;
if(f.Ability.selectedIndex==0){
f.ADesc.value=Ab(an0,1);
p=an0;
}else{
f.ADesc.value=Ab(an1,1);
p=an1;
}
return p;
}

function Ab(x,y){
var n=0;
var m=0;
var o=" ";
o="None";
m=y;
if(m<0){m=0;}
if(m>1){m=1;}
n=x;
if(n<0){n=77;}
if(n>77){n=77;}
if(n==0){
if(m==0){o="Air Lock";}
if(m==1){o="N est pas affecté par le temps.";}
}
if(n==1){
if(m==0){o="Piège";}
if(m==1){
o="L adversaire ne peut pas changer ou fuir. Les Pokemon Volants";
o+="ou avec Levitation ne sont pas affectés.";}
}
if(n==2){
if(m==0){o="Armurbaston";}
if(m==1){o="Les attaques adverses ne peuvent pas faire de coup critiques.";}
}
if(n==3){
if(m==0){o="Brasier";}
if(m==1){o="Quand les PV sont au 1/3, Les attaques Feu augmentent.";}
}

if(n==4){
if(m==0){o="Cacophony";}
if(m==1){o="Ne peut être affecté par les attaques sonores.";}
}

if(n==5){
if(m==0){o="Chlorophyle";}
if(m==1){o="Lorsqu'il y a du soleil, La Vitesse double.";}
}
if(n==6){
if(m==0){o="Corps Sain";}
if(m==1){o="Les attaques qui baissent les Stats n'ont aucun effets.";}
}
if(n==7){
if(m==0){o="Ciel Gris";}
if(m==1){o="N'est pas affecté par le temps.";}
}

if(n==8){
if(m==0){o="Déguisement";}
if(m==1){o="S'adapte au type de l'ennemi.";}
}

if(n==9){
if(m==0){o="Oeil Composé";}
if(m==1){o="La précision augmente de 30%.";}
}
if(n==10){
if(m==0){o="Joli Sourire";}
if(m==1){
o="L adversaire à 30% de chance d être sous l effet d Attraction";
o+=" lors d une attaque direct.";}
}
if(n==11){
if(m==0){o="Moiteur";}
if(m==1){o="N est pas affecté par Desctruction ou Autodesctruction.";}
}
if(n==12){
if(m==0){o="Crachin";}
if(m==1){o="Lors de l arrivée du Pokemon, il pleut.";}
}
if(n==13){
if(m==0){o="Sécheresse";}
if(m==1){o="Lors de l arrivée du Pokemon, le soleil brille très fort.";}
}
if(n==14){
if(m==0){o="Matinal";}
if(m==1){o="Le Statut Endormi dure moins longtemps.";}
}
if(n==15){
if(m==0){o="Pose Spore";}
if(m==1){
o="L'adversaire à 10% d être paralysé, empoisonné ou endormi ";
o+=" lors de l utilisation d une attaque direct.";}
}
if(n==16){
if(m==0){o="Armumagma";}
if(m==1){
o="L adversaire à 30% de chance d être sous brûlé ";
o+=" lors d une attaque direct.";}
}
if(n==17){
if(m==0){o="Torche";}
if(m==1){
o="Activé lorsque le Pokemon est touché par une attaque Feu. Dès lors, ";
o+="L utilisateur des attaques Feu voit ses attaques Feu à 1.5 et il est immunisé ";
o+=" des attaques Feu.";}
}
if(n==18){
if(m==0){o="Météo";}
if(m==1){o="Change selon le temps.";}
}
if(n==19){
if(m==0){o="Cran";}
if(m==1){o="L Attaque augmente de 1.5 lors d un changement de stat.";}
}
if(n==20){
if(m==0){o="Coloforce";}
if(m==1){o="Les pouvoirs d attaque sont augmentés de 2. ";}
}
if(n==21){
if(m==0){o="Agitation";}
if(m==1){
o="Augmente l attaque de 50% mais baisse la precision de 20%";}
}
if(n==22){
if(m==0){o="Hyper Cutter";}
if(m==1){o="L adversaire ne peut pas baisser l Attaque.";}
}
if(n==23){
if(m==0){o="Lumiattirance";}
if(m==1){
o="Les chances de rencontrer des pokemon sauvages  ";
o+="augmentent lorsque le pokemon est en Première position.";}
}
if(n==24){
if(m==0){o="Vaccin";}
if(m==1){o="Ne peute pas être Empoisonné.";}
}
if(n==25){
if(m==0){o="Attention";}
if(m==1){o="Empêche la peur.";}
}
if(n==26){
if(m==0){o="Insomnia";}
if(m==1){o="Ne peut être endormi.";}
}
if(n==27){
if(m==0){o="Intimidation";}
if(m==1){o="Lors de l arrivée au combat, l Attaque de l adversaire baisse.";}
}
if(n==28){
if(m==0){o="Regard Vif";}
if(m==1){o="L adversaire ne peut pas baisser la précision";}
}
if(n==29){
if(m==0){o="Levitation";}
if(m==1){o="Les attaques Sol n ont pas d effet.";}
}
if(n==30){
if(m==0){o="Paratonnere";}
if(m==1){o="Les attaques electriques sont attirés par le pokemon";}
}
if(n==31){
if(m==0){o="Echauffement";}
if(m==1){o="Ne peut pas être paralysé.";}
}
if(n==32){
if(m==0){o="Suintement";}
if(m==1){
o="Quand l adversaire absorbe la vie, il perd des PV ";}
}
if(n==33){
if(m==0){o="Corps Ardent";}
if(m==1){o="Ne peut pas être gelé.";}
}
if(n==34){
if(m==0){o="Magnépîège";}
if(m==1){o="Les Pokemon Acier ne peuvent fuir ou changer.";}
}
if(n==35){
if(m==0){o="Ecaille Spéciale";}
if(m==1){o="La Défense augment lors d un changment de stat.";}
}
if(n==36){
if(m==0){o="Minus";}
if(m==1){o="En combat avec Plus, l Attaque Spéciale augmente de 50%.";}
}
if(n==37){
if(m==0){o="Medic Nature";}
if(m==1){o="Le Statut du Pokemon redevient normal lors d un échange.";}
}
if(n==77){
if(m==0){o="Pas d'abilité";}
if(m==1){o="- Pas d abilité -";}
}
if(n==38){
if(m==0){o="Benêt";}
if(m==1){o="Attraction n a pas d effet.";}
}
if(n==39){
if(m==0){o="Engrais";}
if(m==1){o="Quand les PV sont au 1/3, Les attaques Plantes augmentents de 1.5.";}
}
if(n==40){
if(m==0){o="Tempo Perso";}
if(m==1){o="Ne peut pas être confus.";}
}
if(n==41){
if(m==0){o="Ramassage";}
if(m==1){o="Peut trouver des objets après le combat.";}
}
if(n==42){
if(m==0){o="Plus";}
if(m==1){o="En combat avec Minus, l Attaque Spéciale augmente de 50%.";}
}
if(n==43){
if(m==0){o="Point Poison";}
if(m==1){
o="L adversaire à 30% de chance d être Empoisonné";
o+=" lors d une attaque direct.";}
}
if(n==44){
if(m==0){o="Pression";}
if(m==1){o="L adversaire utilise deux PP pour un seul.";}
}
if(n==45){
if(m==0){o="Force Pure";}
if(m==1){o="L attaque est doublé en combat.";}
}
if(n==46){
if(m==0){o="Cuvette";}
if(m==1){o="La vie augmente a chaque tour lorsqu il pleut.";}
}
if(n==47){
if(m==0){o="Tête de Roc";}
if(m==1){
o="Ne reçoit pas de dégàts lorsqu il fait des attaques comme electacle";
o+="Tackle.";}
}
if(n==48){
if(m==0){o="Peau Dure";}
if(m==1){
o="L adversare perd l équivalent de 1/16ème des dégàts envoyés ";
o+="attack against this Pokemon.";}
}
if(n==49){
if(m==0){o="Fuite";}
if(m==1){o="Peut Fuir à coup sûr excepté en combat de dresseur.";}
}
if(n==50){
if(m==0){o="Sable Volant";}
if(m==1){o="Une tempête de sable commence lors de l arrivée du Pokemon.";}
}
if(n==51){
if(m==0){o="Voile Sable";}
if(m==1){o="Pendant une tempête de sable les chances d évasion augmente.";}
}
if(n==52){
if(m==0){o="Sérénité";}
if(m==1){o="Les chances que l attaque est un effet augementent.";}
}
if(n==53){
if(m==0){o="Marque Ombre";}
if(m==1){o="L adversaire ne peut pas fuir ou changé.";}
}
if(n==54){
if(m==0){o="Mue";}
if(m==1){o="A chaque tour, le Pokemon a 1/3 chance d enlever son statut..";}
}
if(n==55){
if(m==0){o="Coque Armure";}
if(m==1){o="L adversaire ne peut pas faire de coup crititque.";}
}
if(n==56){
if(m==0){o="Ecran Poudre";}
if(m==1){o="Les attaques adversaires ne peuvent avoir d effets additionels.";}
}
if(n==57){
if(m==0){o="Antibruit";}
if(m==1){o="N est pas affecté par les ataques Sonores.";}
}
if(n==58){
if(m==0){o="Turbo";}
if(m==1){o="La Vitesse augmente à chaque tour.";}
}
if(n==59){
if(m==0){o="Statik";}
if(m==1){
o="L adversaire à 30% de chance d être paralysé";
o+=" lors d une attaque direct.";}
}
if(n==60){
if(m==0){o="Puanteur";}
if(m==1){
o="Si le Pokemon est en première position, les chances de rencontrer ";
o+="des pokemon sauvages baissent.";}
}
if(n==61){
if(m==0){o="Glue";}
if(m==1){o="Les objets ne peuvent être volés.";}
}
if(n==62){
if(m==0){o="Fermeté";}
if(m==1){o="Les attaques One Hit KO n ont pas d effet.";}
}
if(n==63){
if(m==0){o="Ventouse";}
if(m==1){o="Ne peut pas être revoyé par des attaques adversaires.";}
}
if(n==64){
if(m==0){o="Essaim";}
if(m==1){o="Quand les PV sont au 1/3, les attaques Insectes augmentent de 50%.";}
}
if(n==65){
if(m==0){o="Glissade";}
if(m==1){o="Lorsqu'il pleut, la vitesse double.";}
}
if(n==66){
if(m==0){o="Synchro";}
if(m==1){o="Si le Pokemon a son statut qui change, l adversaire aussi.";}
}
if(n==67){
if(m==0){o="Isograisse";}
if(m==1){o="Les attaques Feu et Glace ne font que 50% de leur puissance.";}
}
if(n==68){
if(m==0){o="Torrent";}
if(m==1){o="Quand les PV sont au 1/3, les attaques Eau augmentent de 50%.";}
}
if(n==69){
if(m==0){o="Calque";}
if(m==1){o="La capacité spéciale devient la même que l adversaire.";}
}
if(n==70){
if(m==0){o="Absentéisme";}
if(m==1){o="Ne peut pas attaquer deux fois de suite.";}
}
if(n==71){
if(m==0){o="Esprit Vital";}
if(m==1){o="Ne peut pas être endormi.";}
}
if(n==72){
if(m==0){o="Absorb'Volt";}
if(m==1){o="Si le Pokemon reçoit une attaque Electrique, sa vie est restoré de 1/4 des PV max.";}
}
if(n==73){
if(m==0){o="Absorb'Eau";}
if(m==1){o="Si le Pokemon reçoit une attaque Eau, sa vie est restoré de 1/4 des PV max.";}
}
if(n==74){
if(m==0){o="Ignifu Voile";}
if(m==1){o="Ne peut pas être brûlé.";}
}
if(n==75){
if(m==0){o="Ecran de Fumée";}
if(m==1){o="Les attaques baissant les stats n ont pas d effets.";}
}
if(n==76){
if(m==0){o="Garde Mystique";}
if(m==1){o="Ne peut être touché que par des attaques super efficaces.";}
}
return o;
}

function RandomDV(){
var f=document.PokemonForm;
var dv=0;
dv=Math.round(Math.random() * 31);
f.HPDV.options[dv].selected=true;
dv=Math.round(Math.random() * 31);
f.AtkDV.options[dv].selected=true;
dv=Math.round(Math.random() * 31);
f.DefDV.options[dv].selected=true;
dv=Math.round(Math.random() * 31);
f.SpeDV.options[dv].selected=true;
dv=Math.round(Math.random() * 31);
f.SpADV.options[dv].selected=true;
dv=Math.round(Math.random() * 31);
f.SpDDV.options[dv].selected=true;
dv=HPower();
}

function XE(n){
var d=0;
var o=0;
if(n==0){o=1000000;}
if(n==1){o=600000;}
if(n==2){o=1640000;}
if(n==3){o=1059860;}
if(n==4){o=800000;}
if(n==5){o=1250000;}
if(n==6){o=1000000;}
if(n==7){o=1000000;}
return o;
}

function XL(n){
var ex=0;
var px=document.PokemonForm.Exp.value;
var o=0;
var x1="00000000";
var x2="00000000";
var xe="00";
var i=0;
x1="00000000010000000f000000340000007a000000ed000000960100007d020000ae030000";
x1+="2e0500000807000041090000e10b0000ee0e00006f12000069160000e11a0000";
x1+="db1f00005c250000672b00000032000028390000e24000003149000014520000";
x1+="8d5b00009c650000417000007a7b000048870000a893000097a0000014ae0000";
x1+="1bbc0000a9ca0000b9d9000047e900004ef90000c9090100b11a0100002c0100";
x1+="ae3d0100b64f01000d620100ae7401008d870100a29a0100e4ad010047c10100";
x1+="c1d4010048e80100fc000200431a02001a3402007d4e020068690200d7840200";
x1+="c5a002002fbd02000eda020060f702001d15030040330300c4510300a3700300";
x1+="d78f030058af030021cf03002aef03008e140400ea370400785e0400a6850400";
x1+="67aa0400aad2040083fb04007f210500554b0500b4750500bf9c050000c80500";
x1+="bdf30500a51b06002648060016750600a49d060037cb060029f9060021220700";
x1+="92500700527f070076a807008ed70700e1060800ed2f0800705f08001a8f0800";
x1+="c5b7080073e708000a080900c0270900c1270900";
x2="0000000001000000040000000d000000200000004100000070000000b200000014010000";
x2+="890100001c020000e9020000c7030000ce04000037060000a507000099090000";
x2+="e60b0000940e0000ae1100004015000052190000f21d00002b2300000a290000";
x2+="9b2f0000ec3600000c3f000007480000ee510000d05c0000bb680000c2750000";
x2+="f48300006393000021a4000040b60000ddc50000a1da000059ec000000040100";
x2+="fd170100c5320100354901005e6701006f8001003da201001dbe0100d7e30100";
x2+="b6020200a42c0200b64e0200217d020099a20200cfd50200e2fe020033370300";
x2+="17640300d4a10300c2d2030040160400704b040005950400b3ce0400b81e0500";
x2+="205d0500f0b305004ff705004a550600df9d06006403070070510700e1be0700";
x2+="a7120800698808002be20800a6600900aac0090047480a00d3ae0a0000400b00";
x2+="5bad0b0085480c00f9bc0c0091620d0069de0d00e48e0e006a120f003dce0f00";
x2+="c05910006421110033b51100218912008c251300420614009cab140099991500";
x2+="34481600fb4317002cfc17004006190041061900";
o=0;
ex=0;
for(i=0;i<=101;i++){
if(n==0){ex=i*i*i;}
if(n==1){
xe="0x";
xe+=x1.substr((i*8)+6,2);
xe+=x1.substr((i*8)+4,2);
xe+=x1.substr((i*8)+2,2);
xe+=x1.substr((i*8),2);
ex=1*xe;
}
if(n==2){
xe="0x";
xe+=x2.substr((i*8)+6,2);
xe+=x2.substr((i*8)+4,2);
xe+=x2.substr((i*8)+2,2);
xe+=x2.substr((i*8),2);
ex=1*xe;
}
if(n==3){ex=Math.floor((1.2*i*i*i)-(15*i*i)+(100*i)-140);}
if(n==4){ex=Math.floor(0.8*i*i*i);}
if(n==5){ex=Math.floor(1.25*i*i*i);}
if(n==6){ex=i*i*i;}
if(n==7){ex=i*i*i;}
if(i==0){ex=1; i=1;}
if(px<ex){
o=i-1;
if((i-1)==100){
document.PokemonForm.NExp.value=0;
}else{
document.PokemonForm.NExp.value=ex-px;
}
i=102;
}
}
document.PokemonForm.XLvl.value=o;
return o;
}

function XQ(what){
var ex=0;
var f=document.PokemonForm;
var px=f.Exp;
var pl=f.XLvl;
var x1="00000000";
var x2="00000000";
var xe="00";
var o=" ";
var s=0;
var i=0;
x1="00000000010000000f000000340000007a000000ed000000960100007d020000ae030000";
x1+="2e0500000807000041090000e10b0000ee0e00006f12000069160000e11a0000";
x1+="db1f00005c250000672b00000032000028390000e24000003149000014520000";
x1+="8d5b00009c650000417000007a7b000048870000a893000097a0000014ae0000";
x1+="1bbc0000a9ca0000b9d9000047e900004ef90000c9090100b11a0100002c0100";
x1+="ae3d0100b64f01000d620100ae7401008d870100a29a0100e4ad010047c10100";
x1+="c1d4010048e80100fc000200431a02001a3402007d4e020068690200d7840200";
x1+="c5a002002fbd02000eda020060f702001d15030040330300c4510300a3700300";
x1+="d78f030058af030021cf03002aef03008e140400ea370400785e0400a6850400";
x1+="67aa0400aad2040083fb04007f210500554b0500b4750500bf9c050000c80500";
x1+="bdf30500a51b06002648060016750600a49d060037cb060029f9060021220700";
x1+="92500700527f070076a807008ed70700e1060800ed2f0800705f08001a8f0800";
x1+="c5b7080073e708000a080900c0270900c1270900";
x2="0000000001000000040000000d000000200000004100000070000000b200000014010000";
x2+="890100001c020000e9020000c7030000ce04000037060000a507000099090000";
x2+="e60b0000940e0000ae1100004015000052190000f21d00002b2300000a290000";
x2+="9b2f0000ec3600000c3f000007480000ee510000d05c0000bb680000c2750000";
x2+="f48300006393000021a4000040b60000ddc50000a1da000059ec000000040100";
x2+="fd170100c5320100354901005e6701006f8001003da201001dbe0100d7e30100";
x2+="b6020200a42c0200b64e0200217d020099a20200cfd50200e2fe020033370300";
x2+="17640300d4a10300c2d2030040160400704b040005950400b3ce0400b81e0500";
x2+="205d0500f0b305004ff705004a550600df9d06006403070070510700e1be0700";
x2+="a7120800698808002be20800a6600900aac0090047480a00d3ae0a0000400b00";
x2+="5bad0b0085480c00f9bc0c0091620d0069de0d00e48e0e006a120f003dce0f00";
x2+="c05910006421110033b51100218912008c251300420614009cab140099991500";
x2+="34481600fb4317002cfc17004006190040161900";
if(what=="X"){i=f.XLvl.value;}
if(i<0){i=0;}
if(i>100){i=100;}
pl.value=i;
s=f.Species.options[f.Species.selectedIndex].value;
o=PokeDex(s);
n=FI(o,"~",21);
if(n==0){ex=i*i*i;}
if(n==1){
xe="0x";
xe+=x1.substr((i*8)+6,2);
xe+=x1.substr((i*8)+4,2);
xe+=x1.substr((i*8)+2,2);
xe+=x1.substr((i*8),2);
ex=1*xe;
}
if(n==2){
xe="0x";
xe+=x2.substr((i*8)+6,2);
xe+=x2.substr((i*8)+4,2);
xe+=x2.substr((i*8)+2,2);
xe+=x2.substr((i*8),2);
ex=1*xe;
}
if(n==3){ex=Math.floor((1.2*i*i*i)-(15*i*i)+(100*i)-140);}
if(n==4){ex=Math.floor(0.8*i*i*i);}
if(n==5){ex=Math.floor(1.25*i*i*i);}
if(n==6){ex=i*i*i;}
if(n==7){ex=i*i*i;}
if(i==1){ex=1;}
if(i==0){ex=0;}
px.value=ex;
n=HPower()
}

function HPower(){
f=document.PokemonForm;
var o=" ";
var pd=" ";
var a0=0;
var a1=0;
var a2=0;
var a3=0;
var a4=0;
var a5=0;
var p=0;
var pg=0;
var q=0;
var s=0;
pg=f.Species.options[f.Species.selectedIndex].value;
pd=PokeDex(pg);
o=FI(pd,"~",21);
p=parseInt(o,10);
q=XE(p);
if(f.Exp.value<0){f.Exp.value=0;}
if(f.Exp.value>q){f.Exp.value=q;}
q=XL(p);
p=f.HPEff.value;
if(p<0){f.HPEff.value=0;}
if(p>255){f.HPEff.value=255;}
s=(1*f.HPEff.value);
p=f.AtkEff.value;
if(p<0){f.AtkEff.value=0;}
if(p>255){f.AtkEff.value=255;}
s+=(1*f.AtkEff.value);
p=f.DefEff.value;
if(p<0){f.DefEff.value=0;}
if(p>255){f.DefEff.value=255;}
s+=(1*f.DefEff.value);
p=f.SpeEff.value;
if(p<0){f.SpeEff.value=0;}
if(p>255){f.SpeEff.value=255;}
s+=(1*f.SpeEff.value);
p=f.SpAEff.value;
if(p<0){f.SpAEff.value=0;}
if(p>255){f.SpAEff.value=255;}
s+=(1*f.SpAEff.value);
p=f.SpDEff.value;
if(p<0){f.SpDEff.value=0;}
if(p>255){f.SpDEff.value=255;}
s+=(1*f.SpDEff.value);
f.EffSum.value=s;
a0=(Math.floor((((2*FI(pd,"~",4))-(-1*f.HPDV.selectedIndex)-Math.ceil(f.HPEff.value/-4))*f.XLvl.value)/100)-(-10)-(-1*f.XLvl.value));
a1=Math.floor((Math.floor((((2*FI(pd,"~",5))-(-1*f.AtkDV.selectedIndex)-Math.ceil(f.AtkEff.value/-4))*f.XLvl.value)/100)-(-5))*PerMod("Atk"));
a2=Math.floor((Math.floor((((2*FI(pd,"~",6))-(-1*f.DefDV.selectedIndex)-Math.ceil(f.DefEff.value/-4))*f.XLvl.value)/100)-(-5))*PerMod("Def"));
a3=Math.floor((Math.floor((((2*FI(pd,"~",7))-(-1*f.SpeDV.selectedIndex)-Math.ceil(f.SpeEff.value/-4))*f.XLvl.value)/100)-(-5))*PerMod("Spe"));
a4=Math.floor((Math.floor((((2*FI(pd,"~",8))-(-1*f.SpADV.selectedIndex)-Math.ceil(f.SpAEff.value/-4))*f.XLvl.value)/100)-(-5))*PerMod("SpA"));
a5=Math.floor((Math.floor((((2*FI(pd,"~",9))-(-1*f.SpDDV.selectedIndex)-Math.ceil(f.SpDEff.value/-4))*f.XLvl.value)/100)-(-5))*PerMod("SpD"));
f.HPDex.value=a0;
f.AtkDex.value=a1;
f.DefDex.value=a2;
f.SpeDex.value=a3;
f.SpADex.value=a4;
f.SpDDex.value=a5;
p=0;
q=(1*f.HPDV.selectedIndex)%4;
if(q==2||q==3){p+=1;}
q=(1*f.AtkDV.selectedIndex)%4;
if(q==2||q==3){p+=2;}
q=(1*f.DefDV.selectedIndex)%4;
if(q==2||q==3){p+=4;}
q=(1*f.SpeDV.selectedIndex)%4;
if(q==2||q==3){p+=8;}
q=(1*f.SpADV.selectedIndex)%4;
if(q==2||q==3){p+=16;}
q=(1*f.SpDDV.selectedIndex)%4;
if(q==2||q==3){p+=32;}
p=Math.floor((p*40)/63)+30;
f.HidePower.value=p;
p=0;
q=(1*f.HPDV.selectedIndex)%2;
if(q==1){p+=1;}
q=(1*f.AtkDV.selectedIndex)%2;
if(q==1){p+=2;}
q=(1*f.DefDV.selectedIndex)%2;
if(q==1){p+=4;}
q=(1*f.SpeDV.selectedIndex)%2;
if(q==1){p+=8;}
q=(1*f.SpADV.selectedIndex)%2;
if(q==1){p+=16;}
q=(1*f.SpDDV.selectedIndex)%2;
if(q==1){p+=32;}
p=Math.floor((p*15)/63);
f.HiddenPower.selectedIndex=p;
return p;
}

function PerMod(w){
var f=document.PokemonForm;
var o= 1.0;
var n=0;
n=f.Nature.selectedIndex;
o=1.0;
if(w=="Atk"){
if(n==1){o=1.1;}
if(n==2){o=1.1;}
if(n==3){o=1.1;}
if(n==4){o=1.1;}
if(n==5){o=0.9;}
if(n==10){o=0.9;}
if(n==15){o=0.9;}
if(n==20){o=0.9;}
}
if(w=="Def"){
if(n==1){o=0.9;}
if(n==5){o=1.1;}
if(n==7){o=1.1;}
if(n==8){o=1.1;}
if(n==9){o=1.1;}
if(n==11){o=0.9;}
if(n==16){o=0.9;}
if(n==21){o=0.9;}
}
if(w=="Spe"){
if(n==2){o=0.9;}
if(n==7){o=0.9;}
if(n==10){o=1.1;}
if(n==11){o=1.1;}
if(n==13){o=1.1;}
if(n==14){o=1.1;}
if(n==17){o=0.9;}
if(n==22){o=0.9;}
}
if(w=="SpA"){
if(n==3){o=0.9;}
if(n==8){o=0.9;}
if(n==13){o=0.9;}
if(n==15){o=1.1;}
if(n==16){o=1.1;}
if(n==17){o=1.1;}
if(n==19){o=1.1;}
if(n==23){o=0.9;}
}
if(w=="SpD"){
if(n==4){o=0.9;}
if(n==9){o=0.9;}
if(n==14){o=0.9;}
if(n==19){o=0.9;}
if(n==20){o=1.1;}
if(n==21){o=1.1;}
if(n==22){o=1.1;}
if(n==23){o=1.1;}
}
return o;
}

function MT(n,W,T2){
var x=0;
var c=" ";
var o=" ";
o="Unknown";
x=n;
if(x<0){o="P=================/Aucun";}
if(x>16){o="P=================/Aucun";}
if(x==0){o="P=--=+-0+====-+=++/Combat";}
if(x==1){o="P+===-+=-==+-=====/Vol";}
if(x==2){o="P==---=-0==+======/Poison";}
if(x==3){o="P=0+=+-=++=-+=====/Sol";}
if(x==4){o="P-+=-=+=-+====+===/Roche";}
if(x==5){o="P---===---=+=+==+=/Insecte";}
if(x==6){o="P======+-====+==-0/Spectre";}
if(x==7){o="P====+==---=-=+===/Acier";}
if(x==8){o="S====-+=+--+==+-==/Feu";}
if(x==9){o="S===++===+--===-==/Eau";}
if(x==10){o="S=--++-=--+-===-==/Plante";}
if(x==11){o="S=+=0=====+--==-==/Electrique";}
if(x==12){o="S+=+====-====-==0=/Psy";}
if(x==13){o="S=+=+===---+==-+==/Glace";}
if(x==14){o="S=======-======+==/Dragon";}
if(x==15){o="S-=====+-====+==-=/Tenebre";}
if(x==16){o="P====-=0-=========/Normal";}
x=W;
if(x<0){x=1;}
if(x>3){x=1;}
if(x==0){o=o.substring(0,1);}
if(x==1){o=o.substring(19,o.length);}
if(x==2){o=o.substring(1,18);}
if(x==3){
x=T2;
if(x<0){x=16;}
if(x>16){x=16;}
c=o.substring((1+x),1);
if(c=="+"){o=2.0;}
if(c=="-"){o=-2.0;}
if(c=="="){o=1.0;}
if(c=="0"){o=0.0;}
}
return o;
}

function Gtest(){
var f=document.PokemonForm;
var pg=0;
var pd=" ";
var p=" ";
var gt=0;
gt=256;
pg=f.Species.options[f.Species.selectedIndex].value;
pd=PokeDex(pg);
p=FI(pd,"~",20);
if(p=="-1"){gt=128;}
if(p=="0"){gt=128;}
if(p=="12"){gt=30;}
if(p=="25"){gt=62;}
if(p=="50"){gt=126;}
if(p=="75"){gt=190;}
if(p=="100"){gt=128;}
return gt;
}

function FI(S,C,N){
var i=0;
var j=0;
var f=0;
var t=" ";
var o=" ";
j=0;
f=0;
o="";
for(i=0;i<(S.length);i++){
 t=S.substring(i,i+1);
 if(f==0){
  if(t==C){
   j+=1;
   if(j==N){
    f=1;
   }
  }
 }else{
  if(t==C){
   j=i;
   i=(S.length)+1;
  }else{
   o+=t;
  }
 }
}
return o;
}

function PokeDex(n){
var f=document.PokemonForm;
// info from http://pokefor.tk/
// 1   2   3    4  5  6  7  8   9   10 11 12 13 14  15  16  17   18
// ~Na#~Hn#~Name~HP~AT~DF~SP~SpA~SpD~HP~AT~DF~SP~SpA~SpD~Bex~Rare~
//     19      20     21      22        23
// Type~Ability~Gender~Max EXP~Egg Group~Held Item~
var O=" ";
O="~1~203~Bulbizarre~45~49~49~45~65~65~0~0~0~0~1~0~64~45~10/2~39~12~3~9/11~0/0~";
if(n==1){O="~1~203~Bulbizarre~45~49~49~45~65~65~0~0~0~0~1~0~64~45~10/2~39~12~3~9/11~0/0~";}
if(n==2){O="~2~204~Herbizarre~60~62~63~60~80~80~0~0~0~0~1~1~141~45~10/2~39~12~3~9/11~0/0~";}
if(n==3){O="~3~205~Florizarre~80~82~83~80~100~100~0~0~0~0~2~1~208~45~10/2~39~12~3~9/11~0/0~";}
if(n==4){O="~4~206~Salaméche~39~52~43~65~60~50~0~0~0~1~0~0~65~45~8~3~12~3~9/2~0/0~";}
if(n==5){O="~5~207~Reptincel~58~64~58~80~80~65~0~0~0~1~1~0~142~45~8~3~12~3~9/2~0/0~";}
if(n==6){O="~6~208~Dracaufeu~78~84~78~100~109~85~0~0~0~0~3~0~209~45~8/1~3~12~3~9/2~0/0~";}
if(n==7){O="~7~209~Carapuce~44~48~65~43~50~64~0~0~1~0~0~0~66~45~9~68~12~3~9/12~0/0~";}
if(n==8){O="~8~210~Carabaffe~59~63~80~58~65~80~0~0~1~0~0~1~143~45~9~68~12~3~9/12~0/0~";}
if(n==9){O="~9~211~Tortank~79~83~100~78~85~105~0~0~0~0~0~3~210~45~9~68~12~3~9/12~0/0~";}
if(n==10){O="~10~212~Chenipan~45~30~35~45~20~20~1~0~0~0~0~0~53~255~5~56~50~0~0~0/0~";}
if(n==11){O="~11~213~Chrysacier~50~20~55~30~25~25~0~0~2~0~0~0~72~120~5~54~50~0~0~0/0~";}
if(n==12){O="~12~214~Papilusion~60~45~50~70~80~80~0~0~0~0~2~1~160~45~5/1~9~50~0~0~0/0BC~";}
if(n==13){O="~13~215~Aspicot~40~35~30~50~20~20~0~0~0~1~0~0~52~255~5/2~56~50~0~0~0/0~";}
if(n==14){O="~14~216~Coconfort~45~25~50~35~25~25~0~0~2~0~0~0~71~120~5/2~54~50~0~0~0/0~";}
if(n==15){O="~15~217~Dardagnan~65~80~40~75~45~80~0~2~0~0~0~1~159~45~5/2~64~50~0~0~0/0D3~";}
if(n==16){O="~16~218~Roucoul~40~45~40~56~35~35~0~0~0~1~0~0~55~255~16/1~28~50~3~4~0/0~";}
if(n==17){O="~17~219~Roucoups~63~60~55~71~50~50~0~0~0~2~0~0~113~120~16/1~28~50~3~4~0/0~";}
if(n==18){O="~18~220~Roucarnage~83~80~75~91~70~70~0~0~0~3~0~0~172~45~16/1~28~50~3~4~0/0~";}
if(n==19){O="~19~221~Rattata~30~56~35~72~25~35~0~0~0~1~0~0~57~255~16~49/19~50~0~5~0/0~";}
if(n==20){O="~20~222~Rattatac~55~81~60~97~50~70~0~0~0~2~0~0~116~127~16~49/19~50~0~5~0/0~";}
if(n==21){O="~21~223~Piafabec~40~60~30~70~31~31~0~0~0~1~0~0~58~255~16/1~28~50~0~4~0/0~";}
if(n==22){O="~22~224~Rapasdepic~65~90~65~100~61~61~0~0~0~2~0~0~162~90~16/1~28~50~0~4~0/0D2~";}
if(n==23){O="~23~225~Abo~35~60~44~55~40~54~0~1~0~0~0~0~62~255~2~27/54~50~0~5/2~0/0~";}
if(n==24){O="~24~226~Arbok~60~85~69~80~65~79~0~2~0~0~0~0~147~90~2~27/54~50~0~5/2~0/0~";}
if(n==25){O="~25~156~Pikachu~35~55~30~90~50~40~0~0~0~2~0~0~82~190~11~59~50~0~5/3~08B/0CA~";}
if(n==26){O="~26~157~Raichu~60~90~55~100~90~80~0~0~0~3~0~0~122~75~11~59~50~0~5/3~0/08B~";}
if(n==27){O="~27~112~Sabelette~50~75~85~40~20~30~0~0~1~0~0~0~93~255~3~51~50~0~5~0/0B7~";}
if(n==28){O="~28~113~Sablaireau~75~100~110~65~45~55~0~0~2~0~0~0~163~90~3~51~50~0~5~0/0B7~";}
if(n==29){O="~29~227~Nidoran F~55~47~52~41~40~40~1~0~0~0~0~0~59~235~2~43~100~3~9/5~0/0~";}
if(n==30){O="~30~228~Nidorina~70~62~67~56~55~55~2~0~0~0~0~0~117~120~2~43~100~3~10~0/0~";}
if(n==31){O="~31~229~Nidoqueen~90~82~87~76~75~85~3~0~0~0~0~0~194~45~2/3~43~100~3~10~0/0~";}
if(n==32){O="~32~230~Nidoran M~46~57~40~50~40~40~0~1~0~0~0~0~60~235~2~43~0~3~9/5~0/0~";}
if(n==33){O="~33~231~Nidorino~61~72~57~65~55~55~0~2~0~0~0~0~118~120~2~43~0~3~9/5~0/0~";}
if(n==34){O="~34~232~Nidoking~81~92~77~85~85~75~0~3~0~0~0~0~195~45~2/3~43~0~3~9/5~0/0~";}
if(n==35){O="~35~233~Melofee~70~45~48~35~60~65~2~0~0~0~0~0~68~150~16~10~75~4~3~08A/05E~";}
if(n==36){O="~36~234~Melodelfe~95~70~73~60~85~90~3~0~0~0~0~0~129~25~16~10~75~4~3~08A/05E~";}
if(n==37){O="~37~153~Goupix~38~41~40~65~50~65~0~0~0~1~0~0~63~190~8~17~75~0~5~088/088~";}
if(n==38){O="~38~154~Feunard~73~76~75~100~81~100~0~0~0~1~0~1~178~75~8~17~75~0~5~088/088~";}
if(n==39){O="~39~138~Rondoudou~115~45~20~20~45~25~2~0~0~0~0~0~76~170~16~10~75~4~3~0/0~";}
if(n==40){O="~40~139~Grodoudou~140~70~45~45~75~50~3~0~0~0~0~0~109~50~16~10~75~4~3~0/0~";}
if(n==41){O="~41~63~Nosferapti~40~45~35~55~30~40~0~0~0~1~0~0~54~255~2/1~25~50~0~4~0/0~";}
if(n==42){O="~42~64~Nosferalto~75~80~70~90~65~75~0~0~0~2~0~0~171~90~2/1~25~50~0~4~0/0~";}
if(n==43){O="~43~88~Mystherbe~45~50~55~30~75~65~0~0~0~0~1~0~78~255~10/2~5~50~3~11~0/0~";}
if(n==44){O="~44~89~Ortide~60~65~70~40~85~75~0~0~0~0~2~0~132~120~10/2~5~50~3~11~0/0~";}
if(n==45){O="~45~90~Raflesia~75~80~85~50~100~90~0~0~0~0~3~0~184~45~10/2~5~50~3~11~0/0~";}
if(n==46){O="~46~235~Paras~35~70~55~25~45~55~0~1~0~0~0~0~70~190~5/10~15~50~0~0/11~067/068~";}
if(n==47){O="~47~236~Parasect~60~95~80~30~60~80~0~2~1~0~0~0~128~75~5/10~15~50~0~0/11~067/068~";}
if(n==48){O="~48~237~Mimitoss~60~55~50~45~40~55~0~0~0~0~0~1~75~190~5/2~9~50~0~0~0/0~";}
if(n==49){O="~49~238~Aéromite~70~65~60~90~90~75~0~0~0~1~1~0~138~75~5/2~56~50~0~0~0/0~";}
if(n==50){O="~50~239~Taupiqueur~10~55~25~95~35~45~0~0~0~1~0~0~81~255~3~51/1~50~0~5~0/0~";}
if(n==51){O="~51~240~Triopiqueur~35~80~50~120~50~70~0~0~0~2~0~0~153~50~3~51/1~50~0~5~0/0~";}
if(n==52){O="~52~241~Miaouss~40~45~35~90~40~40~0~0~0~1~0~0~69~255~16~41~50~0~5~0/0~";}
if(n==53){O="~53~242~Persian~65~70~60~115~65~65~0~0~0~2~0~0~148~90~16~31~50~0~5~0/0~";}
if(n==54){O="~54~158~Psykokwak~50~52~48~55~65~50~0~0~0~0~1~0~80~190~9~11/7~50~0~12/5~0/0~";}
if(n==55){O="~55~159~Akwakwak~80~82~78~85~95~80~0~0~0~0~2~0~174~75~9~11/7~50~0~12/5~0/0~";}
if(n==56){O="~56~243~Ferosinge~40~80~35~70~35~45~0~1~0~0~0~0~74~190~0~71~50~0~5~0/0~";}
if(n==57){O="~57~244~Colosinge~65~105~60~95~60~70~0~2~0~0~0~0~149~75~0~71~50~0~5~0/0~";}
if(n==58){O="~58~245~Caninos~55~70~45~60~70~50~0~1~0~0~0~0~91~190~8~27/17~25~5~5~088/088~";}
if(n==59){O="~59~246~Arcanin~90~110~80~95~100~80~0~2~0~0~0~0~213~75~8~27/17~25~5~5~088/088~";}
if(n==60){O="~60~247~Ptitard~40~50~40~90~40~40~0~0~0~1~0~0~77~255~9~73/11~50~3~12~0/0~";}
if(n==61){O="~61~248~Tetarte~65~65~65~90~50~50~0~0~0~2~0~0~131~120~9~73/11~50~3~12~0/0BB~";}
if(n==62){O="~62~249~Tartard~90~85~95~70~70~90~0~0~3~0~0~0~185~45~9/0~73/11~50~3~12~0/0BB~";}
if(n==63){O="~63~39~Abra~25~20~15~90~105~55~0~0~0~0~1~0~73~200~12~66/25~25~3~6~0/0D6~";}
if(n==64){O="~64~40~Kadabra~40~35~30~105~120~70~0~0~0~0~2~0~145~100~12~66/25~25~3~6~0/0D6~";}
if(n==65){O="~65~41~Alakazam~55~50~45~120~135~85~0~0~0~0~3~0~186~50~12~66/25~25~3~6~0/0D6~";}
if(n==66){O="~66~73~Machoc~70~80~50~35~35~35~0~1~0~0~0~0~88~180~0~19~25~3~6~0/0~";}
if(n==67){O="~67~74~Machopeur~80~100~70~45~50~60~0~2~0~0~0~0~146~90~0~19~25~3~6~0/0~";}
if(n==68){O="~68~75~Mackogneur~90~130~80~55~65~85~0~3~0~0~0~0~193~45~0~19~25~3~6~0/0~";}
if(n==69){O="~69~250~Chetiflor~50~75~35~40~70~30~0~1~0~0~0~0~84~255~10/2~5~50~3~11~0/0~";}
if(n==70){O="~70~251~Boustiflor~65~90~50~55~85~45~0~2~0~0~0~0~151~120~10/2~5~50~3~11~0/0~";}
if(n==71){O="~71~252~Empiflor~80~105~65~70~100~60~0~3~0~0~0~0~191~45~10/2~5~50~3~11~0/0~";}
if(n==72){O="~72~66~Tentacool~40~40~35~70~50~100~0~0~0~0~0~1~105~190~9/2~6/32~50~5~14~0/0~";}
if(n==73){O="~73~67~Tentacruel~80~70~65~100~80~120~0~0~0~0~0~2~205~60~9/2~6/32~50~5~14~0/0~";}
if(n==74){O="~74~57~Racaillou~40~80~100~20~30~30~0~0~1~0~0~0~86~255~4/3~47/62~50~3~8~0/0C3~";}
if(n==75){O="~75~58~Gravalanch~55~95~115~35~45~45~0~0~2~0~0~0~134~120~4/3~47/62~50~3~8~0/0C3~";}
if(n==76){O="~76~59~Grolem~80~110~130~45~55~65~0~0~3~0~0~0~177~45~4/3~47/62~50~3~8~0/0C3~";}
if(n==77){O="~77~253~Ponyta~50~85~55~90~65~65~0~0~0~1~0~0~152~190~8~49/17~50~0~5~0/0~";}
if(n==78){O="~78~254~Galopa~65~100~70~105~80~80~0~0~0~2~0~0~192~60~8~49/17~50~0~5~0/0~";}
if(n==79){O="~79~255~Ramoloss~90~65~65~15~40~40~1~0~0~0~0~0~99~190~9/12~38/40~50~0~9/12~0/0BB~";}
if(n==80){O="~80~256~Flagadoss~95~75~110~30~100~80~0~0~2~0~0~0~164~75~9/12~38/40~50~0~9/12~0/0BB~";}
if(n==81){O="~81~82~Magneti~25~35~70~45~95~55~0~0~0~0~1~0~89~190~11/7~34/62~-1~0~8~0/0C7~";}
if(n==82){O="~82~83~Magneton~50~60~95~70~120~70~0~0~0~0~2~0~161~60~11/7~34/62~-1~0~8~0/0C7~";}
if(n==83){O="~83~257~Canarticho~52~65~55~60~58~62~0~1~0~0~0~0~94~45~16/1~28/25~50~0~4/5~0/0E1~";}
if(n==84){O="~84~92~Doduo~35~85~45~75~35~35~0~1~0~0~0~0~96~190~16/1~49/14~50~0~4~0/0D2~";}
if(n==85){O="~85~93~Dodrio~60~110~70~100~60~60~0~2~0~0~0~0~158~45~16/1~49/14~50~0~4~0/0D2~";}
if(n==86){O="~86~258~Otaria~65~45~55~45~45~70~0~0~0~0~0~1~100~190~9~67~50~0~12/5~0/0~";}
if(n==87){O="~87~259~Lamantine~90~70~80~70~70~95~0~0~0~0~0~2~176~75~9/13~67~50~0~12/5~0/0~";}
if(n==88){O="~88~106~Tadmorv~80~80~50~25~40~50~1~0~0~0~0~0~90~190~2~60/61~50~0~7~0/06E~";}
if(n==89){O="~89~107~Grotadmorv~105~105~75~50~65~100~1~1~0~0~0~0~157~75~2~60/61~50~0~7~0/06E~";}
if(n==90){O="~90~260~Kokyas~30~65~100~40~45~25~0~0~1~0~0~0~97~190~9~55~50~5~14~06A/06B~";}
if(n==91){O="~91~261~Crustabri~50~95~180~70~85~45~0~0~2~0~0~0~203~60~9/13~55~50~5~14~06A/06B~";}
if(n==92){O="~92~262~Fantominus~30~35~30~80~100~35~0~0~0~0~1~0~95~190~6/2~29~50~3~7~0/0~";}
if(n==93){O="~93~263~Spectrum~45~50~45~95~115~55~0~0~0~0~2~0~126~90~6/2~29~50~3~7~0/0~";}
if(n==94){O="~94~264~Ectoplasma~60~65~60~110~130~75~0~0~0~0~3~0~190~45~6/2~29~50~3~7~0/0~";}
if(n==95){O="~95~265~Onix~35~45~160~70~30~45~0~0~1~0~0~0~108~45~4/3~47/62~50~0~8~0/0~";}
if(n==96){O="~96~266~Spoporifik~60~48~45~42~43~90~0~0~0~0~0~1~102~190~12~26~50~0~6~0/0~";}
if(n==97){O="~97~267~Hypnomade~85~73~70~67~73~115~0~0~0~0~0~2~165~75~12~26~50~0~6~0/0~";}
if(n==98){O="~98~268~Krabby~30~105~90~50~25~25~0~1~0~0~0~0~115~225~9~22/55~50~0~14~0/0~";}
if(n==99){O="~99~269~Krabboss~55~130~115~75~50~50~0~2~0~0~0~0~206~60~9~22/55~50~0~14~0/0~";}
if(n==100){O="~100~84~Voltorbe~40~30~50~100~55~55~0~0~0~1~0~0~103~190~11~57/59~-1~0~8~0/0~";}
if(n==101){O="~101~85~Electrode~60~50~70~140~80~80~0~0~0~2~0~0~150~60~11~57/59~-1~0~8~0/0~";}
if(n==102){O="~102~270~Noeunoeuf~60~40~80~40~60~45~0~0~1~0~0~0~98~90~10/12~5~50~5~11~0/0~";}
if(n==103){O="~103~271~Noadkoko~95~95~85~55~125~65~0~0~0~0~2~0~212~45~10/12~5~50~5~11~0/0~";}
if(n==104){O="~104~272~Osselait~50~50~95~35~40~50~0~0~1~0~0~0~87~190~3~47/30~50~0~9~0/0E0~";}
if(n==105){O="~105~273~Ossateur~60~80~110~45~50~80~0~0~2~0~0~0~124~75~3~47/30~50~0~9~0/0E0~";}
if(n==106){O="~106~274~Kicklee~50~120~53~87~35~110~0~2~0~0~0~0~139~45~0~31~0~0~6~0/0~";}
if(n==107){O="~107~275~tygnon~50~105~79~76~35~110~0~0~0~0~0~2~140~45~0~28~0~0~6~0/0~";}
if(n==108){O="~108~276~Excelangue~90~55~75~30~60~75~2~0~0~0~0~0~127~45~16~40/38~50~0~9~0/0~";}
if(n==109){O="~109~108~Smogo~40~65~95~35~60~45~0~0~1~0~0~0~114~190~2~29~50~0~7~0/0C2~";}
if(n==110){O="~110~109~Smogogo~65~90~120~60~85~70~0~0~2~0~0~0~173~60~2~29~50~0~7~0/0C2~";}
if(n==111){O="~111~169~Rhynocorne~80~85~95~25~30~30~0~0~1~0~0~0~135~120~3/4~30/47~50~5~9/5~0/0~";}
if(n==112){O="~112~170~Rhynoferos~105~130~120~40~45~45~0~2~0~0~0~0~204~60~3/4~30/47~50~5~9/5~0/0~";}
if(n==113){O="~113~277~Leveinard~250~5~5~50~35~105~2~0~0~0~0~0~255~30~16~37/52~100~4~3~0/0C5~";}
if(n==114){O="~114~278~Saquedeneu~65~55~115~60~100~40~0~0~1~0~0~0~166~45~10~5~50~0~11~0/0~";}
if(n==115){O="~115~279~Kangourex~105~95~80~90~40~80~2~0~0~0~0~0~175~45~16~14~100~0~9~0/0~";}
if(n==116){O="~116~184~Hypotrempe~30~40~70~60~70~25~0~0~0~0~1~0~83~225~9~65~50~0~12/2~0/0C9~";}
if(n==117){O="~117~185~Hypocéan~55~65~95~85~95~45~0~0~1~0~1~0~155~75~9~43~50~0~12/2~0/0C9~";}
if(n==118){O="~118~50~Poissirène~45~67~60~63~35~50~0~1~0~0~0~0~111~225~9~65/74~50~0~13~0/0~";}
if(n==119){O="~119~51~Poissoroy~80~92~65~68~65~80~0~2~0~0~0~0~170~60~9~65/74~50~0~13~0/0~";}
if(n==120){O="~120~143~Stari~30~45~55~85~70~55~0~0~0~1~0~0~106~225~9~23/37~-1~5~14~06C/06D~";}
if(n==121){O="~121~144~Staross~60~75~85~115~100~85~0~0~0~2~0~0~207~70~9/12~23/37~-1~5~14~06C/06D~";}
if(n==122){O="~122~280~Mr. Mime~40~45~65~90~100~120~0~0~0~0~0~2~136~45~12~57~50~0~6~0/08A~";}
if(n==123){O="~123~281~Insecateur~70~110~80~105~55~80~0~1~0~0~0~0~187~45~5/1~64~50~0~0~0/0~";}
if(n==124){O="~124~282~Lippoutou~65~50~35~95~115~95~0~0~0~0~2~0~137~45~13/12~38~100~0~6~089/089~";}
if(n==125){O="~125~283~Electek~65~83~57~105~95~85~0~0~0~2~0~0~156~45~11~59~25~0~6~0/0~";}
if(n==126){O="~126~284~Magmar~65~95~57~93~100~85~0~0~0~0~2~0~167~45~8~16~25~0~6~088/088~";}
if(n==127){O="~127~167~Scarabrute~65~125~100~85~55~70~0~2~0~0~0~0~200~45~5~22~50~5~0~0/0~";}
if(n==128){O="~128~285~Tauros~75~100~95~110~40~70~0~1~0~1~0~0~211~45~16~27~0~5~5~0/0~";}
if(n==129){O="~129~52~Magicarpe~20~10~55~80~15~20~0~0~0~1~0~0~20~255~9~65~50~5~13/2~0/0~";}
if(n==130){O="~130~53~Leviator~95~125~79~81~60~100~0~2~0~0~0~0~214~45~9/1~27~50~5~13/2~0/0~";}
if(n==131){O="~131~286~Lokhlass~130~85~80~60~85~95~2~0~0~0~0~0~219~45~9/13~73/55~50~5~9/12~0/0~";}
if(n==132){O="~132~287~Metamorph~48~48~48~48~48~48~1~0~0~0~0~0~61~35~16~31~-1~0~1~0/0DF~";}
if(n==133){O="~133~288~Evoli~55~55~50~55~45~65~0~0~0~0~0~1~92~45~16~49~12~0~5~0/0~";}
if(n==134){O="~134~289~Aquali~130~65~60~65~110~95~2~0~0~0~0~0~196~45~9~73~12~0~5~0/0~";}
if(n==135){O="~135~290~Voltali~65~65~60~130~110~95~0~0~0~2~0~0~197~45~11~72~12~0~5~0/0~";}
if(n==136){O="~136~291~Pyroli~65~130~60~65~95~110~0~2~0~0~0~0~198~45~8~17~12~0~5~0/0~";}
if(n==137){O="~137~292~Porygon~65~60~70~40~85~75~0~0~0~0~1~0~130~45~16~69~-1~0~8~0/0~";}
if(n==138){O="~138~293~Amonita~35~40~100~35~90~55~0~0~1~0~0~0~120~45~4/9~65/55~12~0~12/14~0/0~";}
if(n==139){O="~139~294~Amonistar~70~60~125~55~115~70~0~0~2~0~0~0~199~45~4/9~65/55~12~0~12/14~0/0~";}
if(n==140){O="~140~295~Kabuto~30~80~90~55~55~45~0~0~1~0~0~0~119~45~4/9~65/2~12~0~12/14~0/0~";}
if(n==141){O="~141~296~Kabutops~60~115~105~80~65~70~0~2~0~0~0~0~201~45~4/9~65/2~12~0~12/14~0/0~";}
if(n==142){O="~142~297~Ptera~80~105~65~130~60~75~0~0~0~2~0~0~202~45~4/1~47/44~12~5~4~0/0~";}
if(n==143){O="~143~298~Ronflex~160~110~65~30~65~110~2~0~0~0~0~0~154~25~16~24/67~12~5~9~0C8/0C8~";}
if(n==144){O="~144~299~Articodin~90~85~100~85~95~125~0~0~0~0~0~3~215~3~13/1~44~-1~5~10~0/0~";}
if(n==145){O="~145~300~Electhor~90~90~85~100~125~90~0~0~0~0~3~0~216~3~11/1~44~-1~5~10~0/0~";}
if(n==146){O="~146~301~Sulfura~90~100~90~90~125~85~0~0~0~0~3~0~217~3~8/1~44~-1~5~10~0/0~";}
if(n==147){O="~147~302~Minidraco~41~64~45~50~50~50~0~1~0~0~0~0~67~45~14~54~50~5~12/2~0/0C9~";}
if(n==148){O="~148~303~Draco~61~84~65~70~70~70~0~2~0~0~0~0~144~45~14~54~50~5~12/2~0/0C9~";}
if(n==149){O="~149~304~Dracolosse~91~134~95~80~100~100~0~3~0~0~0~0~218~45~14/1~25~50~5~12/2~0/0C9~";}
if(n==150){O="~150~305~Mewtwo~106~110~90~130~154~90~0~0~0~0~3~0~220~3~12~44~-1~5~10~0/0~";}
if(n==151){O="~151~306~Mew~100~100~100~100~100~100~3~0~0~0~0~0~64~45~12~66~-1~3~10~08D/08D~";}
if(n==152){O="~152~307~Germignon~45~49~65~45~49~65~0~0~0~0~0~1~64~45~10~39~12~3~9/11~0/0~";}
if(n==153){O="~153~308~Macronium~60~62~80~60~63~80~0~0~1~0~0~1~141~45~10~39~12~3~9/11~0/0~";}
if(n==154){O="~154~309~Meganium~80~82~100~80~83~100~0~0~1~0~0~2~208~45~10~39~12~3~9/11~0/0~";}
if(n==155){O="~155~310~Hericendre~39~52~43~65~60~50~0~0~0~1~0~0~65~45~8~3~12~3~5~0/0~";}
if(n==156){O="~156~311~Feurisson~58~64~58~80~80~65~0~0~0~1~1~0~142~45~8~3~12~3~5~0/0~";}
if(n==157){O="~157~312~Typhlosion~78~84~78~100~109~85~0~0~0~0~3~0~209~45~8~3~12~3~5~0/0~";}
if(n==158){O="~158~313~Kaiminus~50~65~64~43~44~48~0~1~0~0~0~0~66~45~9~68~12~3~9/12~0/0~";}
if(n==159){O="~159~314~Crocrodil~65~80~80~58~59~63~0~1~1~0~0~0~143~45~9~68~12~3~9/12~0/0~";}
if(n==160){O="~160~315~Aligatueur~85~105~100~78~79~83~0~2~1~0~0~0~210~45~9~68~12~3~9/12~0/0~";}
if(n==161){O="~161~316~Fouinette~35~46~34~20~35~45~0~1~0~0~0~0~57~255~16~49/28~50~0~5~0/08B~";}
if(n==162){O="~162~317~Fouinar~85~76~64~90~45~55~0~0~0~2~0~0~116~90~16~49/28~50~0~5~08B/08E~";}
if(n==163){O="~163~318~Hoothoot~60~30~30~50~36~56~1~0~0~0~0~0~58~255~16/1~26/28~50~0~4~0/0~";}
if(n==164){O="~164~319~Noarfang~100~50~50~70~76~96~2~0~0~0~0~0~162~90~16/1~26/28~50~0~4~0/0~";}
if(n==165){O="~165~320~Coxy~40~20~30~55~40~80~0~0~0~0~0~1~54~255~5/1~64/14~50~4~0~0/0~";}
if(n==166){O="~166~321~Coxyclaque~55~35~50~85~55~110~0~0~0~0~0~2~134~90~5/1~64/14~50~4~0~0/0~";}
if(n==167){O="~167~322~Mimigal~40~60~40~30~40~40~0~1~0~0~0~0~54~255~5/2~64/26~50~4~0~0/0~";}
if(n==168){O="~168~323~Migalos~70~90~70~40~60~60~0~2~0~0~0~0~134~90~5/2~64/26~50~4~0~0/0~";}
if(n==169){O="~169~65~Nostenfer~85~90~80~130~70~80~0~0~0~3~0~0~204~90~2/1~25~50~0~4~0/0~";}
if(n==170){O="~170~181~Loupio~75~38~38~67~56~56~1~0~0~0~0~0~90~190~9/11~72/23~50~5~13~0/032~";}
if(n==171){O="~171~182~Lanturn~125~58~58~67~76~76~2~0~0~0~0~0~156~75~9/11~72/23~50~5~13~0/032~";}
if(n==172){O="~172~155~Pichu~20~40~15~60~35~35~0~0~0~1~0~0~42~190~11~59~50~0~10~0/08B~";}
if(n==173){O="~173~324~Melo~50~25~28~15~45~55~0~0~0~0~0~1~37~150~16~10~75~4~10~08A 05E~";}
if(n==174){O="~174~137~Toudoudou~90~30~15~15~40~20~1~0~0~0~0~0~39~170~16~10~75~4~10~0/0~";}
if(n==175){O="~175~325~Togepi~35~20~65~20~40~65~0~0~0~0~0~1~74~190~16~21/52~12~4~10~0/0~";}
if(n==176){O="~176~326~Togetic~55~40~85~40~80~105~0~0~0~0~0~2~114~75~16/1~21/52~12~4~4/3~0/0~";}
if(n==177){O="~177~162~Natu~40~50~45~70~70~45~0~0~0~0~1~0~73~190~12/1~66/14~50~0~4~0/0~";}
if(n==178){O="~178~163~Xatu~65~75~70~95~95~70~0~0~0~1~1~0~171~75~12/1~66/14~50~0~4~0/0~";}
if(n==179){O="~179~327~Wattouat~55~40~40~35~65~45~0~0~0~0~1~0~59~235~11~59~50~3~9/5~0/0~";}
if(n==180){O="~180~328~Lainergie~70~55~55~45~80~60~0~0~0~0~2~0~117~120~11~59~50~3~9/5~0/0~";}
if(n==181){O="~181~329~Pharamp~90~75~75~55~115~90~0~0~0~0~3~0~194~45~11~59~50~3~9/5~0/0~";}
if(n==182){O="~182~91~Joliflor~75~80~85~50~90~100~0~0~0~0~0~3~184~45~10~5~50~3~11~0/0~";}
if(n==183){O="~183~55~Marill~70~20~50~40~20~50~2~0~0~0~0~0~58~190~9~67/20~50~4~12/3~0/0~";}
if(n==184){O="~184~56~Azumarill~100~50~80~50~50~80~3~0~0~0~0~0~153~75~9~67/20~50~4~12/3~0/0~";}
if(n==185){O="~185~330~Simularbre~70~100~115~30~30~65~0~0~2~0~0~0~135~65~4~62/47~50~0~8~0/0~";}
if(n==186){O="~186~331~Tarpaud~90~75~75~70~90~100~0~0~0~0~0~3~185~45~9~73/11~50~3~12~0/0BB~";}
if(n==187){O="~187~332~Granivol~35~35~40~50~35~55~0~0~0~0~0~1~74~255~10/1~5~50~3~3/11~0/0~";}
if(n==188){O="~188~333~Floravol~55~45~50~80~45~65~0~0~0~2~0~0~136~120~10/1~5~50~3~3/11~0/0~";}
if(n==189){O="~189~334~Cotovol~75~55~70~110~55~85~0~0~0~3~0~0~176~45~10/1~5~50~3~3/11~0/0~";}
if(n==190){O="~190~335~Capumain~55~70~55~85~40~55~0~0~0~1~0~0~94~45~16~49/41~50~4~5~0/0~";}
if(n==191){O="~191~336~Tournegrin~30~30~30~30~30~30~0~0~0~0~1~0~52~235~10~5~50~3~11~0/0~";}
if(n==192){O="~192~337~Heliatronc~75~75~55~30~105~85~0~0~0~0~2~0~146~120~10~5~50~3~11~0/0~";}
if(n==193){O="~193~338~Yanma~65~65~45~95~75~45~0~0~0~2~0~0~147~75~5/1~58/9~50~0~0~0/0~";}
if(n==194){O="~194~339~Axoloto~55~45~45~15~25~25~1~0~0~0~0~0~52~255~9/3~11/73~50~0~12/5~0/0~";}
if(n==195){O="~195~340~Maraiste~95~85~85~35~65~65~2~0~0~0~0~0~137~90~9/3~11/73~50~0~12/5~0/0~";}
if(n==196){O="~196~341~Mentali~65~65~60~110~130~95~0~0~0~0~2~0~197~45~12~66~12~0~5~0/0~";}
if(n==197){O="~197~342~Noctali~95~65~110~65~60~130~0~0~0~0~0~2~197~45~15~66~12~0~5~0/0~";}
if(n==198){O="~198~343~Cornebre~60~85~42~91~85~42~0~0~0~1~0~0~107~30~15/1~26~50~3~4~0/0~";}
if(n==199){O="~199~344~Roigada~95~75~80~30~100~110~0~0~0~0~0~3~164~70~9/12~38/40~50~0~9/12~0/0BB~";}
if(n==200){O="~200~345~Feuforêve~60~60~60~85~85~85~0~0~0~0~1~1~147~45~6~29~50~4~7~0/0D5~";}
if(n==201){O="~201~346~Zarbi~48~72~48~48~72~48~0~1~0~0~1~0~61~225~12~29~-1~0~10~0/0~";}
if(n==202){O="~202~161~Qulbutoke~190~33~58~33~33~58~2~0~0~0~0~0~177~45~12~53~50~0~7~0/0~";}
if(n==203){O="~203~164~Girafarig~70~80~65~85~90~65~0~0~0~0~2~0~149~60~16/12~25/14~50~0~5~0/08C~";}
if(n==204){O="~204~347~Pomdepic~50~65~90~15~35~35~0~0~1~0~0~0~60~190~5~62~50~0~0~0/0~";}
if(n==205){O="~205~348~Foretress~75~90~140~40~60~60~0~0~2~0~0~0~118~75~5/7~62~50~0~0~0/0~";}
if(n==206){O="~206~349~Insolourdo~100~70~70~45~65~65~1~0~0~0~0~0~75~190~16~52/49~50~0~5~0/0~";}
if(n==207){O="~207~350~Scorplane~65~75~105~85~35~65~0~0~1~0~0~0~108~60~3/1~22/51~50~3~0~0/0~";}
if(n==208){O="~208~351~Steelix~75~85~200~30~55~65~0~0~2~0~0~0~196~25~7/3~47/62~50~0~8~0/0C7~";}
if(n==209){O="~209~352~Snubbull~60~80~50~30~40~40~0~1~0~0~0~0~63~190~16~27/49~75~4~5/3~0/0~";}
if(n==210){O="~210~353~Granbull~90~120~75~45~60~60~0~2~0~0~0~0~178~75~16~27~75~4~5/3~0/0~";}
if(n==211){O="~211~354~Qwilfish~65~95~75~85~55~55~0~1~0~0~0~0~100~45~9/2~43/65~50~0~13~0/0~";}
if(n==212){O="~212~355~Cizayox~70~130~100~65~55~80~0~2~0~0~0~0~200~25~5/7~64~50~0~0~0/0~";}
if(n==213){O="~213~356~Caratroc~20~10~230~5~10~230~0~0~1~0~0~1~80~190~5/4~62~50~3~0~08B/08B~";}
if(n==214){O="~214~168~Scarhino~80~125~75~85~40~95~0~2~0~0~0~0~200~45~5/0~64/19~50~5~0~0/0~";}
if(n==215){O="~215~357~Farfuret~55~95~55~115~35~75~0~0~0~1~0~0~132~60~15/13~25/28~50~3~5~0/0B7~";}
if(n==216){O="~216~358~Teddiursa~60~80~50~40~50~50~0~1~0~0~0~0~124~120~16~41~50~0~5~0/0~";}
if(n==217){O="~217~359~Ursaring~90~130~75~55~75~75~0~2~0~0~0~0~189~60~16~19~50~0~5~0/0~";}
if(n==218){O="~218~103~Limagma~40~40~40~20~70~40~0~0~0~0~1~0~78~190~8~33/16~50~0~7~0/0~";}
if(n==219){O="~219~104~Volcaropod~50~50~120~30~80~80~0~0~2~0~0~0~154~75~8/4~33/16~50~0~7~0/0~";}
if(n==220){O="~220~360~Marcacrin~50~50~40~50~30~30~0~1~0~0~0~0~78~225~13/3~38~50~5~5~0/0~";}
if(n==221){O="~221~361~Cochignon~100~100~80~50~60~60~1~1~0~0~0~0~160~75~13/3~38~50~5~5~0/0~";}
if(n==222){O="~222~180~Corayon~55~55~85~35~65~85~0~0~1~0~0~1~113~60~9/4~21/37~75~4~12/14~0/030~";}
if(n==223){O="~223~362~Remoraid~35~65~35~65~65~35~0~0~0~0~1~0~78~190~9~21~50~0~12/13~0/0~";}
if(n==224){O="~224~363~Octillery~75~105~75~45~105~75~0~1~0~0~1~0~164~75~9~63~50~0~12/13~0/0~";}
if(n==225){O="~225~364~Cadoizo~45~55~45~75~65~45~0~0~0~1~0~0~183~45~13/1~71/21~50~4~12/5~0/0~";}
if(n==226){O="~226~365~Demanta~65~40~70~70~80~140~0~0~0~0~0~2~168~25~9/1~65/73~50~5~12~0/0~";}
if(n==227){O="~227~115~Airmure~65~80~140~70~40~70~0~0~2~0~0~0~168~25~7/1~28/62~50~5~4~0/0~";}
if(n==228){O="~228~366~Malosse~45~60~30~65~80~50~0~0~0~0~1~0~114~120~15/8~14/17~50~5~5~0/0~";}
if(n==229){O="~229~367~Demolosse~75~90~50~95~110~80~0~0~0~0~2~0~204~45~15/8~14/17~50~5~5~0/0~";}
if(n==230){O="~230~186~Hyporoi~75~95~95~85~95~95~0~1~0~0~1~1~207~45~9/14~65~50~0~12/2~0/0C9~";}
if(n==231){O="~231~165~Phanpy~90~60~60~40~40~40~1~0~0~0~0~0~124~120~3~41~50~0~5~0/0~";}
if(n==232){O="~232~166~Donphan~90~120~120~50~60~60~0~1~1~0~0~0~189~60~3~62~50~0~5~0/0~";}
if(n==233){O="~233~368~Porygon2~85~80~90~60~105~95~0~0~0~0~2~0~180~45~16~69~-1~0~8~0/0~";}
if(n==234){O="~234~369~Cerfrousse~73~95~62~85~85~65~0~1~0~0~0~0~165~45~16~27~50~5~5~0/0~";}
if(n==235){O="~235~370~Queulorior~55~20~35~75~20~45~0~0~0~1~0~0~106~45~16~40~50~4~5~0/0~";}
if(n==236){O="~236~371~Debugant~35~35~35~35~35~35~0~1~0~0~0~0~91~75~0~19~0~0~10~0/0~";}
if(n==237){O="~237~372~Kapoera~50~95~95~70~35~110~0~0~0~0~0~2~138~45~0~27~0~0~6~0/0~";}
if(n==238){O="~238~373~Lippouti~45~30~15~65~85~65~0~0~0~0~1~0~87~45~13/12~38~100~0~10~089/089~";}
if(n==239){O="~239~374~Elekid~45~63~37~95~65~55~0~0~0~1~0~0~106~45~11~59~25~0~10~0/0~";}
if(n==240){O="~240~375~Magby~45~75~37~83~70~55~0~0~0~1~0~0~117~45~8~16~25~0~10~088/088~";}
if(n==241){O="~241~376~Ecremeuh~95~80~105~100~40~70~0~0~2~0~0~0~200~45~16~67~100~5~5~01D/01D~";}
if(n==242){O="~242~377~Leuphorie~255~10~10~55~75~135~2~0~0~0~0~0~255~30~16~37/52~100~4~3~0/0C5~";}
if(n==243){O="~243~378~Raikou~90~85~75~115~115~100~0~0~0~2~1~0~216~3~11~44~-1~5~10~0/0~";}
if(n==244){O="~244~379~Entei~115~115~85~100~90~75~1~2~0~0~0~0~217~3~8~44~-1~5~10~0/0~";}
if(n==245){O="~245~380~Suicune~100~75~115~85~90~115~0~0~1~0~0~2~215~3~9~44~-1~5~10~0/0~";}
if(n==246){O="~246~381~Embrylex~50~64~50~41~45~50~0~1~0~0~0~0~67~45~4/3~19~50~5~9~0/0~";}
if(n==247){O="~247~382~Ymphect~70~84~70~51~65~70~0~2~0~0~0~0~144~45~4/3~54~50~5~9~0/0~";}
if(n==248){O="~248~383~Tyranocif~100~134~110~61~95~100~0~3~0~0~0~0~218~45~4/15~50~50~5~9~0/0~";}
if(n==249){O="~249~384~Lugia~106~90~130~110~90~154~0~0~0~0~0~3~220~3~12/1~44~-1~5~10~0/0~";}
if(n==250){O="~250~385~Ho-oh~106~130~90~90~110~154~0~0~0~0~0~3~220~3~8/1~44~-1~5~10~02D/02D~";}
if(n==251){O="~251~386~Celebi~100~100~100~100~100~100~3~0~0~0~0~0~64~45~12/10~37~-1~3~10~08D/08D~";}
if(n==277){O="~252~1~Arcko~40~45~35~70~65~55~0~0~0~1~0~0~65~45~10~39~12~3~9/2~0/0~";}
if(n==278){O="~253~2~Massko~50~65~45~95~85~65~0~0~0~2~0~0~141~45~10~39~12~3~9/2~0/0~";}
if(n==279){O="~254~3~Jungko~70~85~65~120~105~85~0~0~0~3~0~0~208~45~10~39~12~3~9/2~0/0~";}
if(n==280){O="~255~4~Poussifeu~45~60~40~45~70~50~0~0~0~0~1~0~65~45~8~3~12~3~5~0/0~";}
if(n==281){O="~256~5~Galifeu~60~85~60~55~85~60~0~1~0~0~1~0~142~45~8/0~3~12~3~5~0/0~";}
if(n==282){O="~257~6~Brasegali~80~120~70~80~110~70~0~3~0~0~0~0~209~45~8/0~3~12~3~5~0/0~";}
if(n==283){O="~258~7~Gobou~50~70~50~40~50~50~0~1~0~0~0~0~65~45~9~68~12~3~9/12~0/0~";}
if(n==284){O="~259~8~Flobio~70~85~70~50~60~70~0~2~0~0~0~0~143~45~9/3~68~12~3~9/12~0/0~";}
if(n==285){O="~260~9~Laggron~100~110~90~60~85~90~0~3~0~0~0~0~210~45~9/3~68~12~3~9/12~0/0~";}
if(n==286){O="~261~10~Medhyena~35~55~35~35~30~30~0~1~0~0~0~0~55~255~15~49~50~0~5~0/087~";}
if(n==287){O="~262~11~Grahyena~70~90~70~70~60~60~0~2~0~0~0~0~128~127~15~27~50~0~5~0/087~";}
if(n==288){O="~263~12~Zigzaton~38~30~41~60~30~41~0~0~0~1~0~0~60~255~16~41~50~0~5~0/08B~";}
if(n==289){O="~264~13~Lineone~78~70~61~100~50~61~0~0~0~2~0~0~128~90~16~41~50~0~5~08B/08E~";}
if(n==290){O="~265~14~Chenipotte~45~45~35~20~20~30~1~0~0~0~0~0~54~255~5~56~50~0~0~0/0~";}
if(n==291){O="~266~15~Armulys~50~35~55~15~25~25~0~0~2~0~0~0~71~120~5~54~50~0~0~0/0~";}
if(n==292){O="~267~16~Charmillon~60~70~50~65~90~50~0~0~0~0~3~0~161~45~5/1~64~50~0~0~0/0BC~";}
if(n==293){O="~268~17~Blindalys~50~35~55~15~25~25~0~0~2~0~0~0~72~120~5~54~50~0~0~0/0~";}
if(n==294){O="~269~18~Papinox~60~50~70~65~50~90~0~0~0~0~0~3~160~45~5/2~56~50~0~0~0/0BC~";}
if(n==295){O="~270~19~Nenupiot~40~30~30~30~40~50~0~0~0~0~0~1~74~255~9/10~65/46~50~3~12/11~0/0~";}
if(n==296){O="~271~20~Lombre~60~50~50~50~60~70~0~0~0~0~0~2~141~120~9/10~65/46~50~3~12/11~0/0~";}
if(n==297){O="~272~21~Ludicolo~80~70~70~70~90~100~0~0~0~0~0~3~181~45~9/10~65/46~50~3~12/11~0/0~";}
if(n==298){O="~273~22~Grainipiot~40~40~50~30~30~30~0~0~1~0~0~0~74~255~10~5/14~50~3~5/11~0/0~";}
if(n==299){O="~274~23~Pifeuil~70~70~40~60~60~40~0~2~0~0~0~0~141~45~10/15~5/14~50~3~5/11~0/0~";}
if(n==300){O="~275~24~Tengalice~90~100~60~80~90~60~0~3~0~0~0~0~181~45~10/15~5/14~50~3~5/11~0/0~";}
if(n==304){O="~276~25~Nirondelle~40~55~30~85~30~30~0~0~0~1~0~0~59~200~16/1~19~50~3~4~0/0~";}
if(n==305){O="~277~26~Heledelle~60~85~60~125~50~50~0~0~0~2~0~0~162~45~16/1~19~50~3~4~0/0~";}
if(n==309){O="~278~27~ Goelise~40~30~30~85~55~30~0~0~0~1~0~0~64~190~9/1~28~50~0~12/4~0/0~";}
if(n==310){O="~279~28~Bekipan~60~50~100~65~85~70~0~0~2~0~0~0~164~45~9/1~28~50~0~12/4~0/0~";}
if(n==392){O="~280~29~Tarsal~28~25~25~40~45~35~0~0~0~0~1~0~70~235~12~66/69~50~5~7~0/0~";}
if(n==393){O="~281~30~Kirlia~38~35~35~50~65~55~0~0~0~0~2~0~140~120~12~66/69~50~5~7~0/0~";}
if(n==394){O="~282~31~Gardevoir~68~65~65~80~125~115~0~0~0~0~3~0~208~45~12~66/69~50~5~7~0/0~";}
if(n==311){O="~283~32~Arakdo~40~30~32~65~50~52~0~0~0~1~0~0~63~200~5/9~65~50~0~12/0~0/0~";}
if(n==312){O="~284~33~Maskadra~70~60~62~60~80~82~0~0~0~0~1~1~128~75~5/1~27~50~0~12/0~0/0BC~";}
if(n==306){O="~285~34~Balignon~60~40~60~35~40~60~1~0~0~0~0~0~65~255~10~15~50~2~3/11~0/0~";}
if(n==307){O="~286~35~Chapignon~60~130~80~70~60~60~0~2~0~0~0~0~165~90~10/0~15~50~2~3/11~0/0~";}
if(n==364){O="~287~36~Parecool~60~60~60~30~35~35~1~0~0~0~0~0~83~255~16~70~50~5~5~0/0~";}
if(n==365){O="~288~37~Vigoroth~80~80~80~90~55~55~0~0~0~2~0~0~126~120~16~71~50~5~5~0/0~";}
if(n==366){O="~289~38~Monaflemit~150~160~100~100~95~65~3~0~0~0~0~0~210~45~16~70~50~5~5~0/0~";}
if(n==301){O="~290~42~Ningale~31~45~90~40~30~30~0~0~1~0~0~0~65~255~5/3~9~50~1~0~0/0~";}
if(n==302){O="~291~43~Ninjask~61~90~45~160~50~50~0~0~0~2~0~0~155~120~5/1~58~50~1~0~0/0~";}
if(n==303){O="~292~44~Munja~1~90~45~40~30~30~2~0~0~0~0~0~95~45~5/6~76~-1~1~8~0/0~";}
if(n==370){O="~293~45~Chuchmur~64~51~23~28~51~23~1~0~0~0~0~0~68~190~16~57~50~3~9/5~0/086~";}
if(n==371){O="~294~46~Ramboum~84~71~43~48~71~43~2~0~0~0~0~0~126~120~16~57~50~3~9/5~0/086~";}
if(n==372){O="~295~47~Brouhabam~104~91~63~68~91~63~3~0~0~0~0~0~184~45~16~57~50~3~9/5~0/086~";}
if(n==335){O="~296~48~Makuhita~72~60~30~25~20~30~1~0~0~0~0~0~87~180~0~67/19~25~2~6~0/0~";}
if(n==336){O="~297~49~Hariyama~144~120~60~50~40~60~2~0~0~0~0~0~184~200~0~67/19~25~2~6~0/0BB~";}
if(n==350){O="~298~54~Azurill~50~20~40~20~20~40~1~0~0~0~0~0~33~150~16~67/20~75~4~10~0/0~";}
if(n==320){O="~299~60~Tarinor~30~45~135~30~45~90~0~0~1~0~0~0~108~255~4~62/34~50~0~8~0/0~";}
if(n==315){O="~300~61~Skitty~50~45~45~50~35~35~0~0~0~1~0~0~65~255~16~10~75~4~5/3~0/08A~";}
if(n==316){O="~301~62~Delcatty~70~65~65~70~55~55~1~0~0~1~0~0~138~60~16~10~75~4~5/3~0/08A~";}
if(n==322){O="~302~68~Tenefix~50~75~75~50~65~65~0~1~1~0~0~0~98~45~15/6~28~50~3~6~0/0~";}
if(n==355){O="~303~69~Mysdibule~50~85~85~50~55~55~0~1~1~0~0~0~98~45~7~22/27~50~4~5/3~0/0~";}
if(n==382){O="~304~70~Galekid~50~70~100~30~40~40~0~0~1~0~0~0~96~180~7/4~62/47~50~5~9~0/0CC~";}
if(n==383){O="~305~71~Galegon~60~90~140~40~50~50~0~0~2~0~0~0~152~90~7/4~62/47~50~5~9~0/0CC~";}
if(n==384){O="~306~72~Galeking~70~110~180~50~60~60~0~0~3~0~0~0~205~45~7/4~62/47~50~5~9~0/0CC~";}
if(n==356){O="~307~76~Meditite~30~40~55~60~40~55~0~0~0~1~0~0~91~180~0/12~45~50~0~6~0/0~";}
if(n==357){O="~308~77~Charmina~60~60~75~80~60~75~0~0~0~2~0~0~153~90~0/12~45~50~0~6~0/0~";}
if(n==337){O="~309~78~Dynavolt~40~45~40~65~65~40~0~0~0~1~0~0~104~120~11~59/30~50~5~5~0/0~";}
if(n==338){O="~310~79~Elecsprint~70~75~60~105~105~60~0~0~0~2~0~0~168~45~11~59/30~50~5~5~0/0~";}
if(n==353){O="~311~80~Posipi~60~50~40~95~85~75~0~0~0~1~0~0~120~200~11~42~50~0~3~0/0~";}
if(n==354){O="~312~81~Negapi~60~40~50~95~75~85~0~0~0~1~0~0~120~200~11~36~50~0~3~0/0~";}
if(n==386){O="~313~86~Muciole~65~73~55~85~47~75~0~0~0~1~0~0~146~150~5~23/64~0~1~0/6~0/0~";}
if(n==387){O="~314~87~Lumivole~65~47~55~85~73~75~0~0~0~1~0~0~146~150~5~38~100~2~0/6~0/0~";}
if(n==363){O="~315~94~Roselia~50~60~45~65~100~80~0~0~0~0~1~0~152~150~10/2~37/43~50~3~3/11~0/0D3~";}
if(n==367){O="~316~95~Gloupti~70~43~53~40~43~53~1~0~0~0~0~0~75~225~2~32/61~50~2~7~0/06B~";}
if(n==368){O="~317~96~Avaltout~100~73~83~55~73~83~2~0~0~0~0~0~168~75~2~32/61~50~2~7~0/06B~";}
if(n==330){O="~318~97~Carvanha~45~90~20~65~65~20~0~1~0~0~0~0~88~225~9/15~48~50~5~13~0/0~";}
if(n==331){O="~319~98~Sharpedo~70~120~40~95~95~40~0~2~0~0~0~0~175~60~9/15~48~50~5~13~0/0~";}
if(n==313){O="~320~99~Wailmer~130~70~35~60~70~35~1~0~0~0~0~0~137~125~9~74/38~50~2~5/13~0/0~";}
if(n==314){O="~321~100~Wailord~170~90~45~60~90~45~2~0~0~0~0~0~206~60~9~74/38~50~2~5/13~0/0~";}
if(n==339){O="~322~101~Chamallot~60~60~40~35~65~45~0~0~0~0~1~0~88~255~8/3~38~50~0~5~088/088~";}
if(n==340){O="~323~102~Camerupt~70~100~70~40~105~75~0~1~0~0~1~0~175~150~8/3~33~50~0~5~088/088~";}
if(n==321){O="~324~105~Chartor~70~85~140~20~85~70~0~0~2~0~0~0~161~90~8~75~50~0~5~0/0~";}
if(n==351){O="~325~110~Spoink~60~25~35~60~70~80~0~0~0~0~0~1~89~255~12~67/40~50~4~5~0/0~";}
if(n==352){O="~326~111~Groret~80~45~65~80~90~110~0~0~0~0~0~2~164~60~12~67/40~50~4~5~0/0~";}
if(n==308){O="~327~114~Spinda~60~60~60~60~60~60~0~0~0~0~1~0~85~255~16~40~50~4~5/6~0/086~";}
if(n==332){O="~328~116~Kraknoix~45~100~45~10~45~45~0~1~0~0~0~0~73~255~3~22/1~50~3~0~0/0CB~";}
if(n==333){O="~329~117~Vibraninf~50~70~50~70~50~50~0~1~0~1~0~0~126~120~3/14~29~50~3~0~0/0~";}
if(n==334){O="~330~118~Libegon~80~100~80~100~80~80~0~1~0~2~0~0~197~45~3/14~29~50~3~0~0/0~";}
if(n==344){O="~331~119~Cacnea~50~85~40~35~85~40~0~0~0~0~1~0~97~190~10~51~50~3~11/6~0/0D3~";}
if(n==345){O="~332~120~Cacturne~70~115~60~55~115~60~0~1~0~0~1~0~177~60~10/15~51~50~3~11/6~0/0D3~";}
if(n==358){O="~333~121~Tylton~45~40~60~50~40~75~0~0~0~0~0~1~74~255~16/1~37~50~1~4/2~0/0~";}
if(n==359){O="~334~122~Altaria~75~70~90~80~70~105~0~0~0~0~0~2~188~45~14/1~37~50~1~4/2~0/0~";}
if(n==380){O="~335~123~Mangriff~73~115~60~90~60~60~0~2~0~0~0~0~165~90~16~24~50~1~5~0/0~";}
if(n==379){O="~336~124~Seviper~73~100~60~65~100~60~0~1~0~0~1~0~165~90~2~54~50~2~5/2~0/0~";}
if(n==348){O="~337~125~Seleroc~70~55~65~70~95~85~0~0~0~0~2~0~150~45~4/12~29~-1~4~8~0/05E~";}
if(n==349){O="~338~126~Solaroc~70~95~85~70~55~65~0~2~0~0~0~0~150~45~4/12~29~-1~4~8~0/05D~";}
if(n==323){O="~339~127~Barloche~50~48~43~60~46~41~1~0~0~0~0~0~92~190~9/3~38~50~0~13~0/0~";}
if(n==324){O="~340~128~Barbicha~110~78~73~60~76~71~2~0~0~0~0~0~158~75~9/3~38~50~0~13~0/0~";}
if(n==326){O="~341~129~Ecrapince~43~80~65~35~50~35~0~1~0~0~0~0~111~205~9~22/55~50~2~12/14~0/0~";}
if(n==327){O="~342~130~Colhomard~63~120~85~55~90~55~0~2~0~0~0~0~161~155~9/15~22/55~50~2~12/14~0/0~";}
if(n==318){O="~343~131~Balbuto~40~40~55~55~40~70~0~0~0~0~0~1~58~255~3/12~29~-1~0~8~0/0~";}
if(n==319){O="~344~132~Kaorine~60~70~105~75~70~120~0~0~0~0~0~2~189~90~3/12~29~-1~0~8~0/0~";}
if(n==388){O="~345~133~Lilia~66~41~77~23~61~87~0~0~0~0~0~1~121~45~4/10~63~12~1~14~0/0~";}
if(n==389){O="~346~134~Vacilys~86~81~97~43~81~107~0~0~0~0~0~2~201~45~4/10~63~12~1~14~0/0~";}
if(n==390){O="~347~135~Anorith~45~95~50~75~40~50~0~1~0~0~0~0~119~45~4/5~2~12~1~14~0/0~";}
if(n==391){O="~348~136~Armaldo~75~125~100~45~70~80~0~2~0~0~0~0~200~45~4/5~2~12~1~14~0/0~";}
if(n==328){O="~349~140~Barpau~20~15~20~80~10~55~0~0~0~1~0~0~61~255~9~65~50~1~12/2~0/0~";}
if(n==329){O="~350~141~Milobellus~95~60~79~81~100~125~0~0~0~0~0~2~213~60~9~35~50~1~12/2~0/0~";}
if(n==385){O="~351~142~Morpheo~70~70~70~70~70~70~1~0~0~0~0~0~145~45~16~18~50~0~3/7~0D1/0D1~";}
if(n==317){O="~352~145~Kecleon~60~90~70~40~60~120~0~0~0~0~0~1~132~200~16~8~50~3~5~0/08C~";}
if(n==377){O="~353~146~Shuppet~44~75~35~45~63~33~0~1~0~0~0~0~97~225~6~26~50~4~7~0/0D5~";}
if(n==378){O="~354~147~Branette~64~115~65~65~83~63~0~2~0~0~0~0~179~45~6~26~50~4~7~0/0D5~";}
if(n==361){O="~355~148~Skelenox~20~40~90~25~30~90~0~0~1~0~0~1~97~190~6~29~50~4~7~0/0D5~";}
if(n==362){O="~356~149~Teraclope~40~70~130~25~60~130~0~0~1~0~0~2~179~90~6~44~50~4~7~0/0D5~";}
if(n==369){O="~357~150~Tropius~99~68~83~51~72~87~2~0~0~0~0~0~169~200~10/1~5~50~5~9/11~0/0~";}
if(n==411){O="~358~151~Eoko~65~50~70~65~95~80~0~0~0~0~1~1~147~45~12~29~50~4~7~0/0~";}
if(n==376){O="~359~152~Absol~65~130~60~75~75~60~0~2~0~0~0~0~174~30~15~44~50~3~5~0/0~";}
if(n==360){O="~360~160~Okeoke~95~23~48~23~23~48~1~0~0~0~0~0~44~125~12~53~50~0~10~0/0~";}
if(n==346){O="~361~171~Stalgamin~50~50~50~50~50~50~1~0~0~0~0~0~74~190~13~25~50~0~3/8~0/0~";}
if(n==347){O="~362~172~Oniglalie~80~80~80~80~80~80~2~0~0~0~0~0~187~75~13~25~50~0~3/8~0/0D4~";}
if(n==341){O="~363~173~Obalie~70~40~50~25~55~50~1~0~0~0~0~0~75~255~13/9~67~50~3~12/5~0/0~";}
if(n==342){O="~364~174~Phogleur~90~60~70~45~75~70~2~0~0~0~0~0~128~120~13/9~67~50~3~12/5~0/0~";}
if(n==343){O="~365~175~Kaimorse~110~80~90~65~95~90~3~0~0~0~0~0~192~45~13/9~67~50~3~12/5~0/0~";}
if(n==373){O="~366~176~Coquiperl~35~64~85~32~74~55~0~0~1~0~0~0~142~255~9~55~50~1~12~0/031~";}
if(n==374){O="~367~177~Serpang~55~104~105~52~94~75~0~1~1~0~0~0~178~60~9~65~50~1~12~0/0~";}
if(n==375){O="~368~178~Rosabyss~55~84~105~52~114~75~0~0~0~0~2~0~178~60~9~65~50~1~12~0/0~";}
if(n==381){O="~369~179~Relicanth~100~90~130~55~45~65~1~0~1~0~0~0~198~25~9/4~65/47~12~5~12/13~0/033~";}
if(n==325){O="~370~183~Lovdisc~43~30~55~97~40~65~0~0~0~1~0~0~110~225~9~65~75~4~13~06F/0~";}
if(n==395){O="~371~187~Draby~45~75~60~50~40~30~0~1~0~0~0~0~89~45~14~47~50~5~2~0/0C9~";}
if(n==396){O="~372~188~Drackhaus~65~95~100~50~60~50~0~0~2~0~0~0~144~45~14~47~50~5~2~0/0C9~";}
if(n==397){O="~373~189~Drattak~95~135~80~100~110~80~0~3~0~0~0~0~218~45~14/1~27~50~5~2~0/0C9~";}
if(n==398){O="~374~190~Terhal~40~55~80~30~35~60~0~0~1~0~0~0~103~3~7/12~6~-1~5~8~0/0C7~";}
if(n==399){O="~375~191~Metang~60~75~100~50~55~80~0~0~2~0~0~0~153~3~7/12~6~-1~5~8~0/0C7~";}
if(n==400){O="~376~192~Metalosse~80~135~130~70~95~90~0~0~3~0~0~0~210~3~7/12~6~-1~5~8~0/0C7~";}
if(n==401){O="~377~193~Regirock~80~100~200~50~50~100~0~0~3~0~0~0~217~3~4~6~-1~5~10~0/0~";}
if(n==402){O="~378~194~Regice~80~50~100~50~100~200~0~0~0~0~0~3~216~3~13~6~-1~5~10~0/0~";}
if(n==403){O="~379~195~Registeel~80~75~150~50~75~150~0~0~2~0~0~1~215~3~7~6~-1~5~10~0/0~";}
if(n==407){O="~380~196~Latias~80~80~90~110~110~130~0~0~0~0~0~3~211~3~14/12~29~100~5~10~0/0~";}
if(n==408){O="~381~197~Latios~80~90~80~110~130~110~0~0~0~0~3~0~211~3~14/12~29~0~5~10~0/0~";}
if(n==404){O="~382~198~Kyogre~100~100~90~90~150~140~0~0~0~0~3~0~218~5~9~12~-1~5~10~0/0~";}
if(n==405){O="~383~199~Groudon~100~150~140~90~100~90~0~3~0~0~0~0~218~5~3~13~-1~5~10~0/0~";}
if(n==406){O="~384~200~Rayquaza~105~150~90~95~150~90~0~2~0~0~1~0~220~3~14/1~0~-1~5~10~0/0~";}
if(n==409){O="~385~201~Jirachi~100~100~100~100~100~100~3~0~0~0~0~0~215~3~7/12~52~-1~5~10~06D/06D~";}
if(n==410){
 O="~386~202~Deoxys~50~150~50~150~150~50~0~1~0~1~1~0~215~3~12~44~-1~5~10~0/0~";
 if(f.Game.selectedIndex==14||f.Game.selectedIndex==16||f.Game.selectedIndex==19||f.Game.selectedIndex==21
  ||f.Game.selectedIndex==23||f.Game.selectedIndex==25||f.Game.selectedIndex==27
  ){O="~386~202~Deoxys~50~180~20~150~180~20~0~1~0~1~1~0~215~3~12~44~-1~5~10~0/0~";}
 if(f.Game.selectedIndex==15||f.Game.selectedIndex==17||f.Game.selectedIndex==20||f.Game.selectedIndex==22
  ||f.Game.selectedIndex==24||f.Game.selectedIndex==26||f.Game.selectedIndex==28
  ){O="~386~202~Deoxys~50~70~160~90~70~160~0~1~0~1~1~0~215~3~12~44~-1~5~10~0/0~";}
 if(f.Game.selectedIndex==18){O="~386~202~Deoxys~50~95~90~180~95~90~0~1~0~1~1~0~215~3~12~44~-1~5~10~0/0~";}
}
return O;
}

function ItemC(){
var f=document.PokemonForm;
var t=" ";
var i=0;
i=f.Held.selectedIndex;
t=f.Held[i].value;
f.ItemDesc.value=ItemDex(t,2);
return i;
}

function ItemDex(n,w){
var o=" ";
var i=0;
var t=" ";
if(n=="000"){o="~Aucun~Aucun objet tenu~";}else{o="~Inconnu~"+n+" Objet inconnu~";}
i=0;
if(n=="001"){o="~Master Ball~The greatest ball, it catches Pokemon without fail.~"; i=1;}
if(n=="002"){o="~Ultra Ball~Easier to catch than with a Great Ball. Has a *2.0 catch rate.~"; i=2;}
if(n=="003"){o="~Great Ball~Easier to catch than with a Poke Ball. Has a *1.5 catch rate.~"; i=3;}
if(n=="004"){o="~Poke Ball~Item used to catch wild Pokemon. Has a *1.0 catch rate.~"; i=4;}
if(n=="005"){o="~Safari Ball~A special ball made to use only in the Safari Zone. Has a *1.5 catch rate.~"; i=5;}
if(n=="006"){o="~Net Ball~A ball that makes it easy to catch Water and Bug type Pokemon. Has a *3.0 catch rate for these Pokemon.~"; i=6;}
if(n=="007"){o="~Dive Ball~A ball that makes it easy to catch Pokemon on the ocean floor. Has a *3.5 catch rate for these Pokemon.~"; i=7;}
if(n=="008"){o="~Nest Ball~A ball that easily catches Pokemon weaker than your own. Has a *1.0~*4.0 catch rate for these Pokemon.~"; i=8;}
if(n=="009"){o="~Repeat Ball~Pokemon already caught are easier to catch. Has a *3.0 catch rate for these Pokemon.~"; i=9;}
if(n=="00A"){o="~Timer Ball~After a number of turns that go by, it becomes easier to catch a Pokemon. Has a *1.0 through *4.0 catch rate for these Pokemon.~"; i=10;}
if(n=="00B"){o="~Luxury Ball~Has a *1.0 catch rate. A caught Pokemon's Tameness Value is higher.~"; i=11;}
if(n=="00C"){o="~Premier Ball~A new, commemorative Poke Ball. Has a *1.0 catch rate.~"; i=12;}
if(n=="00D"){o="~Potion~Pokemon recoveres 20 HP.~"; i=13;}
if(n=="00E"){o="~Antidote~Recover from Poison status.~"; i=14;}
if(n=="00F"){o="~Burn Heal~Recover from Burn status.~"; i=15;}
if(n=="010"){o="~Ice Heal~Recover from Freeze status.~"; i=16;}
if(n=="011"){o="~Awakeningg~Recover from Sleep status.~"; i=17;}
if(n=="012"){o="~Parlyz Heal~Recover from Paralyze status.~"; i=18;}
if(n=="013"){o="~Full Restore~Pokemon recovers full HP and from any status ailment~"; i=19;}
if(n=="014"){o="~Max Potion~Pokemon recovers full HP.~"; i=20;}
if(n=="015"){o="~Hyper Potion~Pokemon recovers 200 HP.~"; i=21;}
if(n=="016"){o="~Super Potion~Pokemon recovers 50 HP.~"; i=22;}
if(n=="017"){o="~Full Heal~Recovers from any status ailment.~"; i=23;}
if(n=="018"){o="~Revive~Recovers from Faint status with half HP recovered.~"; i=24;}
if(n=="019"){o="~Max Revive~Recovers from Faint status with full HP recovered.~"; i=25;}
if(n=="01A"){o="~Fresh Water~A mineral-filled water which recovers 50 HP for a Pokemon.~"; i=26;}
if(n=="01B"){o="~Soda Pop~A fizzy soda which recovers 60 HP for a Pokemon.~"; i=27;}
if(n=="01C"){o="~Lemonade~A very sweet which recovers 80 HP for a Pokemon.~"; i=28;}
if(n=="01D"){o="~MooMoo Milk~A nutrition-filled milk which recovers 100 HP for a Pokemon.~"; i=29;}
if(n=="01E"){o="~Energy Powder~A very bitter powder which recovers 50 HP for a Pokemon.~"; i=30;}
if(n=="01F"){o="~Energy Root~A very bitter root which recovers 200 HP for a Pokemon.~"; i=31;}
if(n=="020"){o="~Heal Powder~An extremely bitter powder which completely recovers from any status ailment.~"; i=32;}
if(n=="021"){o="~Revival Herb~A very bitter herb which recovers from Faint status.~"; i=33;}
if(n=="022"){o="~Ether~Recovers 10 PP for one move.~"; i=34;}
if(n=="023"){o="~Max Ether~Recovers full PP for one move.~"; i=35;}
if(n=="024"){o="~Elixir~Recovers 10 PP for all moves.~"; i=36;}
if(n=="025"){o="~Max Elixir~Recovers all PP for one Pokemon.~"; i=37;}
if(n=="026"){o="~Lava Cookie~A local specialty which completely recovers from any status ailment.~"; i=38;}
if(n=="027"){o="~Blue Flute~Play this glass flute to recover from Sleep status.(Must walk 250 steps at volcano to obtain.)~"; i=39;}
if(n=="028"){o="~Yellow Flute~Play this glass flute to recover from Confusion status.(Must walk 500 steps at volcano to obtain.)~"; i=40;}
if(n=="029"){o="~Red Flute~Play this glass flute to recover from Attract status. (Must walk 1,000 steps at volcano to obtain.)~"; i=41;}
if(n=="02A"){o="~Black Flute~Play this glass flute to encounter wild Pokemon less often. (Must walk 1,000 steps at volcano to obtain.)~"; i=42;}
if(n=="02B"){o="~White Flute~Play this glass flute to encounter wild Pokemon more often. (Must walk 1,000 steps at volcano to obtain.)~"; i=43;}
if(n=="02C"){o="~Berry Juice~Made completely from berries, it restores 20 HP for a Pokemon.~"; i=44;}
if(n=="02D"){o="~Sacred Ash~Revives all Pokemon from Faint status.~"; i=45;}
if(n=="02E"){o="~Shoal Salt~Salt obtained from deep inside the SHOAL CAVE.~"; i=46;}
if(n=="02F"){o="~Shoal Shell~A seashell found deep inside the SHOAL CAVE.~"; i=47;}
if(n=="030"){o="~Red Shard~Appears to be a fragment of an item made long ago. Sells low. [Becomes Fire Stone.]~"; i=48;}
if(n=="031"){o="~Blue Shard~Appears to be a fragment of an item made long ago. Sells low. [Becomes Water Stone.]~"; i=49;}
if(n=="032"){o="~Yellow Shard~Appears to be a fragment of an item made long ago. Sells low. [Becomes Thunderstone.]~"; i=50;}
if(n=="033"){o="~Green Shard~Appears to be a fragment of an item made long ago. Sells low. [Becomes Leaf Stone.]"; i=51;}
if(n=="03F"){o="~HP Up~Raises HP.~"; i=52;}
if(n=="040"){o="~Protein~Raises Attack points.~"; i=53;}
if(n=="041"){o="~Iron~Raises Defense points.~"; i=54;}
if(n=="042"){o="~Carbos~Raises Speed points.~"; i=55;}
if(n=="043"){o="~Calcium~Raises Special Attack points.~"; i=56;}
if(n=="044"){o="~Rare Candy~Pokemon raises 1 level.~"; i=57;}
if(n=="045"){o="~PP Up~PP's maximum raises.~"; i=58;}
if(n=="046"){o="~Zinc~Raises Special Defense points.~"; i=59;}
if(n=="047"){o="~PP Max~PP's maximum raises to its limit.~"; i=60;}
if(n=="049"){o="~Guard Spec~Abilities cannot be lowered in battle.~"; i=61;}
if(n=="04A"){o="~Dire Hit~Critical hits occur more often in battle.~"; i=62;}
if(n=="04B"){o="~X Attack~ATTACK power raises in battle.~"; i=63;}
if(n=="04C"){o="~X Defend~DEFENSE power raises in battle.~"; i=64;}
if(n=="04D"){o="~X Speed~SPEED raises in battle.~"; i=65;}
if(n=="04E"){o="~X Accuracy~Accuracy raises in battle.~"; i=66;}
if(n=="04F"){o="~X Special~SPECIAL ATTACK's power raises in battle.~"; i=67;}
if(n=="050"){o="~Poke Doll~Run away from wild Pokemon without fail.~"; i=68;}
if(n=="051"){o="~Fluffy Tail~Run away from wild Pokemon without fail.~"; i=69;}
if(n=="053"){o="~Super Repel~Do not encounter weaker Pokemon for 200 steps.~"; i=70;}
if(n=="054"){o="~Max Repel~Do not encounter weaker Pokemon for 250 steps.~"; i=71;}
if(n=="055"){o="~Escape Rope~Escape from caves and dungeons.~"; i=72;}
if(n=="056"){o="~Repel~Do not encounter weaker Pokemon for 100 steps.~"; i=73;}
if(n=="05D"){o="~Sun Stone~A stone which evolves special Pokemon.~"; i=74;}
if(n=="05E"){o="~Moon Stone~A stone which evolves special Pokemon.~"; i=75;}
if(n=="05F"){o="~Fire Stone~A stone which evolves special Pokemon.~"; i=76;}
if(n=="060"){o="~Thunder Stone~A stone which evolves special Pokemon.~"; i=77;}
if(n=="061"){o="~Water Stone~A stone which evolves special Pokemon.~"; i=78;}
if(n=="062"){o="~Leaf Stone~A stone which evolves special Pokemon.~"; i=79;}
if(n=="067"){o="~Tiny Mushroom~A plain, ordinary mushroom. Sells low.~"; i=80;}
if(n=="068"){o="~Big Mushroom~A rare mushroom. Sells high.~"; i=81;}
if(n=="06A"){o="~Pearl~A pretty pearl. Sells low.~"; i=82;}
if(n=="06B"){o="~Big Pearl~A very pretty large pearl. Sells high.~"; i=83;}
if(n=="06C"){o="~Stardust~Beautiful red sand. Sells high.~"; i=84;}
if(n=="06D"){o="~Star Piece~A red gem shard. Sells very high.~"; i=85;}
if(n=="06E"){o="~Nugget~A solid gold nugget. Sells high.~"; i=86;}
if(n=="06F"){o="~Heart Scale~A beautiful scale which is popular among collectors.~"; i=87;}
if(n=="079"){o="~Orange Mail~Zigzagoon-print mail which a Pokemon holds.~"; i=88;}
if(n=="07A"){o="~Harbor Mail~Wingull-print mail which a Pokemon holds.~"; i=89;}
if(n=="07B"){o="~Glitter Mail~Pikachu-print mail which a Pokemon holds.~"; i=90;}
if(n=="07C"){o="~Mech Mail~Magmemite-print mail which a Pokemon holds.~"; i=91;}
if(n=="07D"){o="~Wood Mail~Slakoth-print mail which a Pokemon holds.~"; i=92;}
if(n=="07E"){o="~Wave Mail~Wailmer-print mail which a Pokemon holds.~"; i=93;}
if(n=="07F"){o="~Bead Mail~Mail which shows a sketch of the Pokemon holding it.~"; i=94;}
if(n=="080"){o="~Shadow Mail~Duskull-print mail which a Pokemon holds.~"; i=95;}
if(n=="081"){o="~Tropic Mail~Bellossom-print mail which a Pokemon holds.~"; i=96;}
if(n=="082"){o="~Dream Mail~Mail which shows a sketch of the Pokemon holding it.~"; i=97;}
if(n=="083"){o="~Fab Mail~Gorgeous-print mail which a Pokemon holds.~"; i=98;}
if(n=="084"){o="~Retro Mail~Three starter Pokemon-print mail which a Pokemon holds.~"; i=99;}
if(n=="085"){o="~Cheri Berry~When held, Paralyze status recovers by itself.~"; i=100;}
if(n=="086"){o="~Chesto Berry~When held, Sleep status recovers by itself.~"; i=101;}
if(n=="087"){o="~Pecha Berry~When held, Poison status recovers by itself.~"; i=102;}
if(n=="088"){o="~Rawst Berry~When held, Burn status recovers by itself.~"; i=103;}
if(n=="089"){o="~Aspear Berry~When held, Freeze status recovers by itself.~"; i=104;}
if(n=="08A"){o="~Leppa Berry~When held, 10 PP recovers by itself when PP is 0.~"; i=105;}
if(n=="08B"){o="~Oran Berry~When held, 10 HP recovers by itself when HP is below half.~"; i=106;}
if(n=="08C"){o="~Persim Berry~When held, Confusion status recovers by itself.~"; i=107;}
if(n=="08D"){o="~Lum Berry~When held, any status ailment recovers by itself.~"; i=108;}
if(n=="08E"){o="~Sitrus Berry~When held, 30 HP recovers by itself when HP is below half.~"; i=109;}
if(n=="08F"){o="~Figy Berry~When held, 1/8 HP recovers when HP is below half, but Confusion occurs in all but Pokemon that are Bold, Timid, Modest, or Calm.~"; i=110;}
if(n=="090"){o="~Wiki Berry~When held, 1/8 HP recovers when HP is below half, but Confusion occurs in all but Pokemon that are Adamant, Impish, Jolly, or Careful.~"; i=111;}
if(n=="091"){o="~Mago Berry~When held, 1/8 HP recovers when HP is below half, but Confusion occurs in all but Pokemon that are Brave, Relaxed, Quiet, or Sassy.~"; i=112;}
if(n=="092"){o="~Aguav Berry~When held, 1/8 HP recovers when HP is below half, but Confusion occurs in all but Pokemon that are Naughty, Lax, Naive, or Rash.~"; i=113;}
if(n=="093"){o="~Iapapa Berry~When held, 1/8 HP recovers when HP is below half, but Confusion occurs in all but Pokemon that are Lonely, Hasty, Mild, or Gentle.~"; i=114;}
if(n=="094"){o="~Razz Berry~Bury in the earth to grow RAZZ ingredients for PokeBlocks.~"; i=115;}
if(n=="095"){o="~Bluk Berry~Bury in the earth to grow BLUK ingredients for PokeBlocks.~"; i=116;}
if(n=="096"){o="~Nanab Berry~Bury in the earth to grow NANAB ingredients for PokeBlocks.~"; i=117;}
if(n=="097"){o="~Wepear Berry~Bury in the earth to grow WEPEAR ingredients for PokeBlocks.~"; i=118;}
if(n=="098"){o="~Pinap Berry~Bury in the earth to grow PINAP ingredients for PokeBlocks.~"; i=119;}
if(n=="099"){o="~Pomeg Berry~Bury in the earth to grow POMEG ingredients for PokeBlocks.~"; i=120;}
if(n=="09A"){o="~Kelpsy Berry~Bury in the earth to grow KELPSY ingredients for PokeBlocks.~"; i=121;}
if(n=="09B"){o="~Qualot Berry~Bury in the earth to grow QUALOT ingredients for PokeBlocks.~"; i=122;}
if(n=="09C"){o="~Hondew Berry~Bury in the earth to grow HONDEW ingredients for PokeBlocks.~"; i=123;}
if(n=="09D"){o="~Grepa Berry~Bury in the earth to grow GREPA ingredients for PokeBlocks.~"; i=124;}
if(n=="09E"){o="~Tamato Berry~Bury in the earth to grow TAMATO ingredients for PokeBlocks.~"; i=125;}
if(n=="09F"){o="~Cornn Berry~Bury in the earth to grow CORNN ingredients for PokeBlocks.~"; i=126;}
if(n=="0A0"){o="~Magost Berry~Bury in the earth to grow MAGOST ingredients for PokeBlocks.~"; i=127;}
if(n=="0A1"){o="~Rabuta Berry~Bury in the earth to grow RABUTA ingredients for PokeBlocks.~"; i=128;}
if(n=="0A2"){o="~Nomel Berry~Bury in the earth to grow NOMEL ingredients for PokeBlocks.~"; i=129;}
if(n=="0A3"){o="~Spelon Berry~Bury in the earth to grow SPELON ingredients for PokeBlocks.~"; i=130;}
if(n=="0A4"){o="~Pamtre Berry~Bury in the earth to grow PAMTRE ingredients for PokeBlocks.~"; i=131;}
if(n=="0A5"){o="~Watmel Berry~Bury in the earth to grow WATMEL ingredients for PokeBlocks.~"; i=132;}
if(n=="0A6"){o="~Durin Berry~Bury in the earth to grow DURIN ingredients for PokeBlocks.~"; i=133;}
if(n=="0A7"){o="~Belue Berry~Bury in the earth to grow BELUE ingredients for PokeBlocks.~"; i=134;}
if(n=="0A8"){o="~Liechi Berry~When held, while in a pinch, Attack raises one stage.~"; i=135;}
if(n=="0A9"){o="~Ganlon Berry~When held, while in a pinch, Defense raises one stage.~"; i=136;}
if(n=="0AA"){o="~Salac Berry~When held, while in a pinch, Speed raises one stage.~"; i=137;}
if(n=="0AB"){o="~Petaya Berry~When held, while in a pinch, Special Attack raises one stage.~"; i=138;}
if(n=="0AC"){o="~Apicot Berry~When held, while in a pinch, Special Defense raises one stage.~"; i=139;}
if(n=="0AD"){o="~Lansat Berry~When held, while in a pinch, it becomes easy to Critical Hit the enemy.~"; i=140;}
if(n=="0AE"){o="~Starf Berry~When held, while in a pinch, one ability raises two stages.~"; i=141;}
if(n=="0AF"){o="~Enigma Berry~Bury in the earth to grow mysterious ingredients for PokeBlocks.~"; i=142;}
if(n=="0B3"){o="~Bright Powder~Hold and a light lowers the opponent's accuracy.~"; i=143;}
if(n=="0B4"){o="~White Herb~When held by a Pokemon, if an ability is lowered, it will be raised back up.~"; i=144;}
if(n=="0B5"){o="~Macho Brace~When held by a Pokemon, Speed lowers one stage, but Effort Values earned doubles.~"; i=145;}
if(n=="0B6"){o="~Exp Share~When held by a Pokemon, its Experience Value and Effort Value raise without battling.~"; i=146;}
if(n=="0B7"){o="~Quick Claw~When held by a Pokemon, a preemptive attack may occur.~"; i=147;}
if(n=="0B8"){o="~Soothe Bell~When held, a Pokemon's Tameness Value raises more easily.~"; i=148;}
if(n=="0B9"){o="~Mental Herb~When held, Attract recovers by itself.~"; i=149;}
if(n=="0BA"){o="~Choice Band~The user's Attack becomes *1.5, but only the first chosen move can be used. Special Attack is uneffected.~"; i=150;}
if(n=="0BB"){o="~King's Rock~When held by a Pokemon, its attacks may cause the opponent to flinch.~"; i=151;}
if(n=="0BC"){o="~Silver Powder~When held, a Pokemon's Bug type moves power increases by 10%.~"; i=152;}
if(n=="0BD"){o="~Amulet Coin~When held by a Pokemon, double the money is earned from battles.~"; i=153;}
if(n=="0BE"){o="~Cleanse Tag~When held by a Pokemon, wild Pokemon will be encountered less often.~"; i=154;}
if(n=="0BF"){o="~Soul Dew~When held, Latias or Latios SPECIAL ATTACK increases by 50%.~"; i=155;}
if(n=="0C0"){o="~Deep Sea Tooth~When held, Clamperl's SPECIAL ATTACK increases by 100%.~"; i=156;}
if(n=="0C1"){o="~Deep Sea Scale~When held, Clamperl's SPECIAL DEFENSE increases by 100%.~"; i=157;}
if(n=="0C2"){o="~Smoke Ball~Run away from wild Pokemon without fail.~"; i=158;}
if(n=="0C3"){o="~Everstone~A mysterious rock that prevents a Pokemon from evolving when held.~"; i=159;}
if(n=="0C4"){o="~Focus Band~When held, sometimes the Pokemon will survive with 1 HP instead of 0 HP.~"; i=160;}
if(n=="0C5"){o="~Lucky Egg~When held, a Pokemon gains more experience.~"; i=161;}
if(n=="0C6"){o="~Scope Lens~When held, it is easier for a Pokemon to Critical Hit.~"; i=162;}
if(n=="0C7"){o="~Metal Coat~When held, a Pokemon's Steel type moves power increases by 10%.~"; i=163;}
if(n=="0C8"){o="~Leftovers~When held, HP recovers by 1/16th every turn.~"; i=164;}
if(n=="0C9"){o="~Dragon Scale~A mysterious scale held by Dragon type Pokemon.~"; i=165;}
if(n=="0CA"){o="~Light Ball~When held, Pikachu's SPECIAL ATTACK increases by 100%.~"; i=166;}
if(n=="0CB"){o="~Soft Sand~When held, a Pokemon's Ground type moves power increases by 10%.~"; i=167;}
if(n=="0CC"){o="~Hard Stone~When held, a Pokemon's Rock type moves power increases by 10%.~"; i=168;}
if(n=="0CD"){o="~Miracle Seed~When held, a Pokemon's Grass type moves power increases by 10%.~"; i=169;}
if(n=="0CE"){o="~Black Glasses~When held, a Pokemon's Dark type moves power increases by 10%.~"; i=170;}
if(n=="0CF"){o="~Black Belt~When held, a Pokemon's Fighting type moves power increases by 10%.~"; i=171;}
if(n=="0D0"){o="~Magnet~When held, a Pokemon's Electric type moves power increases by 10%.~"; i=172;}
if(n=="0D1"){o="~Mystic Water~When held, a Pokemon's Water type moves power increases by 10%.~"; i=173;}
if(n=="0D2"){o="~Sharp Beak~When held, a Pokemon's Flying type moves power increases by 10%.~"; i=174;}
if(n=="0D3"){o="~Poison Barb~When held, a Pokemon's Poison type moves power increases by 10%.~"; i=175;}
if(n=="0D4"){o="~Nevermelt Ice~When held, a Pokemon's Ice type moves power increases by 10%.~"; i=176;}
if(n=="0D5"){o="~Spell Tag~When held, a Pokemon's Ghost type moves power increases by 10%.~"; i=177;}
if(n=="0D6"){o="~Twisted Spoon~When held, a Pokemon's Psychic type moves power increases by 10%.~"; i=178;}
if(n=="0D7"){o="~Charcoal~When held, a Pokemon's Fire type moves power increases by 10%."; i=179;}
if(n=="0D8"){o="~Dragon Fang~When held, a Pokemon's Dragon type moves power increases by 10%."; i=180;}
if(n=="0D9"){o="~Silk Scarf~When held, a Pokemon's Normal type moves power increases by 10%.~"; i=181;}
if(n=="0DA"){o="~Up-Grade~When held, evolves Porygon when traded.~"; i=182;}
if(n=="0DB"){o="~Shell Bell~When held, a Pokemon recovers HP equal to 1/8th the damage its attacks deal to the opponent.~"; i=183;}
if(n=="0DC"){o="~Sea Incense~When held, a Pokemon's Water type moves power increases slightly by 5%."; i=184;}
if(n=="0DD"){o="~Lax Incense~When held, the enemy's accuracy lowers slightly by 5%.~"; i=185;}
if(n=="0DE"){o="~Lucky Punch~When held, it is easier for Chansey to Critical Hit.~"; i=186;}
if(n=="0DF"){o="~Metal Powder~When held, Ditto's DEFENSE and SPECIAL DEFENSE become *1.5.~"; i=187;}
if(n=="0E0"){o="~Thick Club~When held, Cubone and Marowak's ATTACK becomes *2.~"; i=188;}
if(n=="0E1"){o="~Stick~When held, it is easier for Farfetch'd to Critical Hit.~"; i=189;}
if(n=="0FE"){o="~Red Scarf~When held, raises COOL in contests.~"; i=190;}
if(n=="0FF"){o="~Blue Scarf~When held, raises BEAUTY in contests.~"; i=191;}
if(n=="100"){o="~Pink Scarf~When held, raises CUTE in contests.~"; i=192;}
if(n=="101"){o="~Green Scarf~When held, raises SMART in contests.~"; i=193;}
if(n=="102"){o="~Yellow Scarf~When held, raises TOUGH in contests.~"; i=194;}
if(n=="103"){o="~Mach Bike~A folding bicycle that more than doubles movement speed.~"; i=195;}
if(n=="104"){o="~Coin Case~A case that holds up to 9,999 COINS.~"; i=196;}
if(n=="105"){o="~ItemFinder~Makes a sound when an unseen item is detected.~"; i=197;}
if(n=="106"){o="~Old Rod~Use to fish for Pokemon in the water.~"; i=198;}
if(n=="107"){o="~Good Rod~A better rod used to fish for Pokemon."; i=199;}
if(n=="108"){o="~Super Rod~The best rod used to fish for Pokemon.~"; i=200;}
if(n=="109"){o="~S.S. Ticket~A ticket required to sail on a ferry.~"; i=201;}
if(n=="10A"){o="~Contest Pass~A pass required to participate in a contest.~"; i=202;}
if(n=="10C"){o="~Wailmer Pail~Used to pour water on the ground. Buried trees will quickly grow berries.~"; i=203;}
if(n=="10D"){o="~Devon's Goods~A package that contains DEVON's machine parts.~"; i=204;}
if(n=="10E"){o="~Soot Sack~A sack used to gather and hold volcanic ash.~"; i=205;}
if(n=="10F"){o="~Basement Key~The key for NEW MAUVILLE beneath MAUVILLE CITY.~"; i=206;}
if(n=="110"){o="~Acro Bike~A folding bicycle capable of jumps and wheelies.~"; i=207;}
if(n=="111"){o="~PokeBlock Case~A case for holding PokeBlocks made with a BERRY BLENDER.~"; i=208;}
if(n=="112"){o="~Letter~A letter to STEVEN from the PRESIDENT of the DEVON CORP.~"; i=209;}
if(n=="113"){o="~Eon Ticket~The ticket for a ferry to a distant southern island.~"; i=210;}
if(n=="114"){o="~Red Orb~A red, glowing orb said to contain an ancient power.~"; i=211;}
if(n=="115"){o="~Blue Orb~A blue, glowing orb said to contain an ancient power.~"; i=212;}
if(n=="116"){o="~Scanner~A device found inside the ABANDONED SHIP.~"; i=213;}
if(n=="117"){o="~Go-Goggles~Great goggles which protect the eyes from desert sandstorms.~"; i=214;}
if(n=="118"){o="~Meteorite~A fallen meteorite found in Meteor Falls.~"; i=215;}
if(n=="119"){o="~Rm.1 Key~A key that opens a door inside the ABANDONED SHIP.~"; i=216;}
if(n=="11A"){o="~Rm.2 Key~A key that opens a door inside the ABANDONED SHIP.~"; i=217;}
if(n=="11B"){o="~Rm.4 Key~A key that opens a door inside the ABANDONED SHIP.~"; i=218;}
if(n=="11C"){o="~Rm.6 Key~A key that opens a door inside the ABANDONED SHIP.~"; i=219;}
if(n=="11D"){o="~Storage Key~The key to the storage inside the ABANDONED SHIP.~"; i=220;}
if(n=="11E"){o="~Root Fossil~A fossil of an ancient Pokemon believes to live on the sea floor.~"; i=221;}
if(n=="11F"){o="~Claw Fossil~A fossil of an ancient Pokemon believes to live on the sea floor.~"; i=222;}
if(n=="120"){o="~Devon Scope~A special item made by Devon. It makes a sound when it finds an unseen Pokemon.~"; i=223;}
if(n=="121"){o="~TM01 (Focus Punch)~A powerful loyalty attack. The user flinches if hit.~"; i=224;}
if(n=="122"){o="~TM02 (Dragon Claw)~Slashes the foe with sharp claws.~"; i=225;}
if(n=="123"){o="~TM03 (Water Pulse)~Attacks with ultrasonic waves. May confuse the foe.~"; i=226;}
if(n=="124"){o="~TM04 (Calm Mind)~Raises SP. ATK and SP. DEF by focusing the mind.~"; i=227;}
if(n=="125"){o="~TM05 (Roar)~Makes the foe flee to end the battle.~"; i=228;}
if(n=="126"){o="~TM06 (Toxic)~Poisons the foe with an intensifying toxin.~"; i=229;}
if(n=="127"){o="~TM07 (Hail)~Summons a hailstorm that strikes every turn.~"; i=230;}
if(n=="128"){o="~TM08 (Bulk Up)~Bulks up the body to boost both ATTACK and DEFENSE.~"; i=231;}
if(n=="129"){o="~TM09 (Bullet Seed)~Shoots 2 to 5 seeds in a row to strike the foe.~"; i=232;}
if(n=="12A"){o="~TM10 (Hidden Power)~The effectiveness varies with the user.~"; i=233;}
if(n=="12B"){o="~TM11 (Sunny Day)~Boosts the power of FIREtype moves for 5 turns.~"; i=234;}
if(n=="12C"){o="~TM12 (Taunt)~Taunts the foe into only using attack moves.~"; i=235;}
if(n=="12D"){o="~TM13 (Ice Beam)~Blasts the foe with an icy beam that may freeze it.~"; i=236;}
if(n=="12E"){o="~TM14 (Blizzard)~Hits the foe with an icy storm that may freeze it.~"; i=237;}
if(n=="12F"){o="~TM15 (Hyper Beam)~Powerful, but leaves the user immobile the next turn.~"; i=238;}
if(n=="130"){o="~TM16 (Light Screen)~Creates a wall of light that lowers SP. ATK damage.~"; i=239;}
if(n=="131"){o="~TM17 (Protect)~Evades attack, but may fail if used in succession.~"; i=240;}
if(n=="132"){o="~TM18 (Rain Dance)~Boosts the power of WATERtype moves for 5 turns.~"; i=241;}
if(n=="133"){o="~TM19 (Giga Drain)~An attack that steals half the damage inflicted.~"; i=242;}
if(n=="134"){o="~TM20 (Safeguard)~A mystical force prevents all status problems.~"; i=243;}
if(n=="135"){o="~TM21 (Frustration)~An attack that is stronger if the TRAINER is disliked.~"; i=244;}
if(n=="136"){o="~TM22 (Solar Beam)~Absorbs light in one turn, then attacks next turn.~"; i=245;}
if(n=="137"){o="~TM23 (Iron Tail)~Attacks with a rock-hard tail. May lower DEFENSE.~"; i=246;}
if(n=="138"){o="~TM24 (Thunderbolt)~A strong electrical attack that may paralyze the foe.~"; i=247;}
if(n=="139"){o="~TM25 (Thunder)~A lightning attack that may cause paralysis.~"; i=248;}
if(n=="13A"){o="~TM26 (Earthquake)~A powerful quake, but has no effect on flying foes.~"; i=249;}
if(n=="13B"){o="~TM27 (Return)~An attack that increases in power with friendship.~"; i=250;}
if(n=="13C"){o="~TM28 (Dig)~Digs underground the first turn and strikes next turn.~"; i=251;}
if(n=="13D"){o="~TM29 (Psychic)~A powerful psychic attack that may lower SP. DEF.~"; i=252;}
if(n=="13E"){o="~TM30 (Shadow Ball)~Hurls a black blob that may lower the foe's SP. DEF.~"; i=253;}
if(n=="13F"){o="~TM31 (Brick Break)~Destroys barriers such as REFLECT and causes damage.~"; i=254;}
if(n=="140"){o="~TM32 (Double Team)~Creates illusory copies to raise evasiveness.~"; i=255;}
if(n=="141"){o="~TM33 (Reflect)~Creates a wall of light that weakens physical attacks.~"; i=256;}
if(n=="142"){o="~TM34 (Shock Wave)~A fast and unavoidable electric attack.~"; i=257;}
if(n=="143"){o="~TM35 (Flamethrower)~A powerful fire attack that may inflict a burn.~"; i=258;}
if(n=="144"){o="~TM36 (Sludge Bomb)~Sludge is hurled to inflict damage. May also poison.~"; i=259;}
if(n=="145"){o="~TM37 (Sandstorm)~Causes a sandstorm that rages for several turns.~"; i=260;}
if(n=="146"){o="~TM38 (Fire Blast)~A fiery blast that scorches all. May cause a burn.~"; i=261;}
if(n=="147"){o="~TM39 (Rock Tomb)~Stops the foe from moving with rocks and cuts SPEED.~"; i=262;}
if(n=="148"){o="~TM40 (Aerial Ace)~An extremely speedy and unavoidable attack.~"; i=263;}
if(n=="149"){o="~TM41 (Torment)~Torments the foe and stops successive use of a move.~"; i=264;}
if(n=="14A"){o="~TM42 (Facade)~Boosts ATTACK when burned, paralyzed, or poisoned.~"; i=265;}
if(n=="14B"){o="~TM43 (Secret Power)~An attack with effects that vary by location.~"; i=266;}
if(n=="14C"){o="~TM44 (Rest)~The user sleeps for 2 turns, restoring HP and status.~"; i=267;}
if(n=="14D"){o="~TM45 (Attract)~Makes the opposite gender less likely to attack.~"; i=268;}
if(n=="14E"){o="~TM46 (Thief)~While attacking, it may steal the foe's held item.~"; i=269;}
if(n=="14F"){o="~TM47 (Steel Wing)~Strikes the foe with hard wings spread wide.~"; i=270;}
if(n=="150"){o="~TM48 (Skill Swap)~The user swaps special abilities with the target.~"; i=271;}
if(n=="151"){o="~TM49 (Snatch)~Steals the effects of the move the foe uses next.~"; i=272;}
if(n=="152"){o="~TM50 (Overheat)~Allows a full-power attack, but sharply lowers SP. ATK.~"; i=273;}
if(n=="153"){o="~HM01 (Cut)~Cuts the foe with sharp scythes, claws, etc.~"; i=274;}
if(n=="154"){o="~HM02 (Fly)~Flies up on the first turn, then strikes the next turn.~"; i=275;}
if(n=="155"){o="~HM03 (Surf)~Creates a huge wave, then crashes it down on the foe.~"; i=276;}
if(n=="156"){o="~HM04 (Strength)~Builds enormous power, then slams the foe.~"; i=277;}
if(n=="157"){o="~HM05 (Flash)~Looses a powerful blast of light that cuts accuracy.~"; i=278;}
if(n=="158"){o="~HM06 (Rock Smash)~A rock-crushing attack that may lower DEFENSE.~"; i=279;}
if(n=="159"){o="~HM07 (Waterfall)~Charges the foe with speed to climb waterfalls.~"; i=280;}
if(n=="15A"){o="~HM08 (Dive)~Dives underwater the first turn and strikes next turn.~"; i=281;}
if(n=="15D"){o="~{Oak's Parcel}~A package from Viridian City's PokéMart. Deliver to Professor Oak.~"; i=282;}
if(n=="15E"){o="~{Poke Flute}~Plays a beautiful melody, which awakens sleeping Pokémon.~"; i=283;}
if(n=="15F"){o="~{Secret Key}~Cinnabar Island Pokémon Gym's Key~"; i=284;}
if(n=="160"){o="~{Bike Voucher}~Cerulean's Miracle Bicycle~"; i=285;}
if(n=="161"){o="~{Gold Teeth}~Safari Zone's warden very~"; i=286;}
if(n=="162"){o="~{Old Amber}~A reddish-coloured amber. It can be used to recreate the ancient Pokemon Aerodactyl.~"; i=287;}
if(n=="163"){o="~{Card Key}~apphron's Silph Company building's door lock card type's key~"; i=288;}
if(n=="164"){o="~{Elevator Key}~Team Rocket hideout elevator key Team Rocket's mark~"; i=289;}
if(n=="165"){o="~{Dome Fossil}~A fossil of the ancient Pokemon Kabuto. It's dome-shaped.~"; i=290;}
if(n=="166"){o="~{Helix Fossil}~A fossil of the ancient Pokemon Omanyte. It's helix-shaped.~"; i=291;}
if(n=="167"){o="~{Silph Scope}~scope Silph Company~"; i=292;}
if(n=="168"){o="~{Bicycle}~Running shoes/bicycle.~"; i=293;}
if(n=="169"){o="~{Town Map}~Fire/Leaf Key Item~"; i=294;}
if(n=="16A"){o="~{VS Seeker}~Fire/Leaf Key Item~"; i=295;}
if(n=="16B"){o="~{Fame Seeker}~Fire/Leaf Key Item~"; i=296;}
if(n=="16C"){o="~{TM Case}~TM holding case. Bag's Important Items~"; i=297;}
if(n=="16D"){o="~{Berry Bag}~Berry holding sack. Bag's Important Items~"; i=298;}
if(n=="16E"){o="~{Help TV}~A TV with programs that aide beginning trainers.~"; i=299;}
if(n=="16F"){o="~{Tri-Pass}~A boat pass to 1 Island, 2 Island, and 3 Island.~"; i=300;}
if(n=="170"){o="~{Rainbow Pass}~A boat pass for Vermilion City to Nana Island.~"; i=301;}
if(n=="171"){o="~{Tea}~Old lady~"; i=302;}
if(n=="172"){o="~{Mystery Ticket}~A boat ticket necessary to travel to Navel Cavern. Lugia/Ho-oh is found there.~"; i=303;}
if(n=="173"){o="~{Aurora Ticket}~A boat ticket necessary to travel to Birth Island. Deoxys is found there.~"; i=304;}
if(n=="174"){o="~{Powder Jar}~Berry crush berry~"; i=305;}
if(n=="175"){o="~{Ruby Plate}~A very beautiful shining red jewel. A symbol of passion.~"; i=306;}
if(n=="176"){o="~{Sapphire Plate}~A very beautiful shining blue jewel. A symbol of faith.~"; i=307;}
if(n=="177"){o="~/Magma Emblem/~A medal-like item in the same shape as TEAM MAGMA's mark.~"; i=308;}
if(n=="178"){o="~/Old Sea Map/~A faded sea chart that shows the way to a certian island.~"; i=309;}
if(n=="1F4"){o="~[Jail Key] _Safe Key_~Colosseum / Objet Rare pkmn XD~"; i=310;}
if(n=="1F5"){o="~[Elevator Key] _Elevator Key_~Colosseum / Objet Rare pkmn XD~"; i=311;}
if(n=="1F6"){o="~[Small Tablet] _Bonsly Card_~Colosseum / Objet Rare pkmn XD~"; i=312;}
if(n=="1F7"){o="~[F-Disk] _Machine Part_~Colosseum / Objet Rare pkmn XD~"; i=313;}
if(n=="1F8"){o="~[R-Disk] _Gonzap's Key_~Colosseum / Objet Rare pkmn XD~"; i=314;}
if(n=="1F9"){o="~[L-Disk] _Data ROM_~Colosseum / Objet Rare pkmn XD~"; i=315;}
if(n=="1FA"){o="~[D-Disk] _ID Card_~Colosseum / Objet Rare pkmn XD~"; i=316;}
if(n=="1FB"){o="~[U-Disk] _Music Disc_~Colosseum / Objet Rare pkmn XD~"; i=317;}
if(n=="1FC"){o="~[Subway Key] _System Lever_~Colosseum / Objet Rare pkmn XD~"; i=318;}
if(n=="1FD"){o="~[Maingate Key] _Mayor's Note_~Colosseum / Objet Rare pkmn XD~"; i=319;}
if(n=="1FE"){o="~[Card Key] _Miror Radar_~Colosseum / Objet Rare pkmn XD~"; i=320;}
if(n=="1FF"){o="~[Down St. Key] _Poke Snack_~Colosseum / Objet Rare pkmn XD~"; i=321;}
if(n=="200"){o="~[DNA Sample 1] _Cologne Case_~Colosseum / Objet Rare pkmn XD~"; i=322;}
if(n=="201"){o="~[Bayleef DNA] _Joy Scent_~Colosseum / Objet Rare pkmn XD~"; i=323;}
if(n=="202"){o="~[DNA Sample 2] _Excite Scent_~Colosseum / Objet Rare pkmn XD~"; i=324;}
if(n=="203"){o="~[Quilava DNA] _Vivid Scent_~Colosseum / Objet Rare pkmn XD~"; i=325;}
if(n=="204"){o="~[DNA Sample 3] _Sun Shard_~Colosseum / Objet Rare pkmn XD~"; i=326;}
if(n=="205"){o="~[Croconaw DNA] _Moon Shard_~Colosseum / Objet Rare pkmn XD~"; i=327;}
if(n=="206"){o="~[DNA Sample 4] _Bonsly Photo_~Colosseum / Objet Rare pkmn XD~"; i=328;}
if(n=="207"){o="~[Sudowoodo DNA] _Cry Analyzer_~Colosseum / Objet Rare pkmn XD~"; i=329;}
if(n=="208"){o="~[DNA Sample 5]~Colosseum Key Item~"; i=330;}
if(n=="209"){o="~[Misdreavus DNA]~Colosseum Key Item~"; i=331;}
if(n=="20A"){o="~[DNA Sample 6]~Colosseum Key Item~"; i=332;}
if(n=="20B"){o="~[Mightyena DNA] _Krane Memo 1_~Colosseum / Objet Rare pkmn XD~"; i=333;}
if(n=="20C"){o="~[DNA Sample 7] _Krane Memo 2_~Colosseum / Objet Rare pkmn XD~"; i=334;}
if(n=="20D"){o="~[Raikou DNA] _Krane Memo 3_~Colosseum / Objet Rare pkmn XD~"; i=335;}
if(n=="20E"){o="~[DNA Sample 8] _Krane Memo 4_~Colosseum / Objet Rare pkmn XD~"; i=336;}
if(n=="20F"){o="~[Entei DNA] _Krane Memo 5_~Colosseum / Objet Rare pkmn XD~"; i=337;}
if(n=="210"){o="~[DNA Sample 9] _Voice Case 1_~Colosseum / Objet Rare pkmn XD~"; i=338;}
if(n=="211"){o="~[Suicune DNA] _Voice Case 2_~Colosseum / Objet Rare pkmn XD~"; i=339;}
if(n=="212"){o="~[Data ROM] _Voice Case 3_~Colosseum / Objet Rare pkmn XD~"; i=340;}
if(n=="213"){o="~[Steel Teeth] _Voice Case 4_~Colosseum / Objet Rare pkmn XD~"; i=341;}
if(n=="214"){o="~[Gear] _Voice Case 5_~Colosseum / Objet Rare pkmn XD~"; i=342;}
if(n=="215"){o="~[Red ID Badge] _Disc Case_~Colosseum / Objet Rare pkmn XD~"; i=343;}
if(n=="216"){o="~[Green ID Badge] _Battle CD 01_~Colosseum / Objet Rare pkmn XD~"; i=344;}
if(n=="217"){o="~[Blue ID Badge] _Battle CD 02_~Colosseum / Objet Rare pkmn XD~"; i=345;}
if(n=="218"){o="~[Yellow ID Badge] _Battle CD 03_~Colosseum / Objet Rare pkmn XD~"; i=346;}
if(n=="219"){o="~[Time Flute] _Battle CD 04_~Colosseum / Objet Rare pkmn XD~"; i=347;}
if(n=="21A"){o="~[Ein File S] _Battle CD 05_~Colosseum / Objet Rare pkmn XD~"; i=348;}
if(n=="21B"){o="~[Ein File H] _Battle CD 06_~Colosseum / Objet Rare pkmn XD~"; i=349;}
if(n=="21C"){o="~[Ein File C] _Battle CD 07_~Colosseum / Objet Rare pkmn XD~"; i=350;}
if(n=="21D"){o="~[Ein File P] _Battle CD 08_~Colosseum / Objet Rare pkmn XD~"; i=351;}
if(n=="21E"){o="~[Cologne Case] _Battle CD 09_~Colosseum / Objet Rare pkmn XD~"; i=352;}
if(n=="21F"){o="~[Joy Scent] _Battle CD 10_~Colosseum / Objet Rare pkmn XD~"; i=353;}
if(n=="220"){o="~[Excite Scent] _Battle CD 11_~Colosseum / Objet Rare pkmn XD~"; i=354;}
if(n=="221"){o="~[Vivid Scent] _Battle CD 12_~Colosseum / Objet Rare pkmn XD~"; i=355;}
if(n=="222"){o="~[Powerup Part] _Battle CD 13_~Colosseum / Objet Rare pkmn XD~"; i=356;}
if(n=="223"){o="~[Ein File F] _Battle CD 14_~Colosseum / Objet Rare pkmn XD~"; i=357;}
if(n=="224"){o="~_Battle CD 15_~Objet Rare pkmn XD~"; i=358;}
if(n=="225"){o="~_Battle CD 16_~Objet Rare pkmn XD~"; i=359;}
if(n=="226"){o="~_Battle CD 17_~Objet Rare pkmn XD~"; i=360;}
if(n=="227"){o="~_Battle CD 18_~Objet Rare pkmn XD~"; i=361;}
if(n=="228"){o="~_Battle CD 19_~Objet Rare pkmn XD~"; i=362;}
if(n=="229"){o="~_Battle CD 20_~Objet Rare pkmn XD~"; i=363;}
if(n=="22A"){o="~_Battle CD 21_~Objet Rare pkmn XD~"; i=634;}
if(n=="22B"){o="~_Battle CD 22_~Objet Rare pkmn XD~"; i=365;}
if(n=="22C"){o="~_Battle CD 23_~Objet Rare pkmn XD~"; i=366;}
if(n=="22D"){o="~_Battle CD 24_~Objet Rare pkmn XD~"; i=367;}
if(n=="22E"){o="~_Battle CD 25_~Objet Rare pkmn XD~"; i=368;}
if(n=="22F"){o="~_Battle CD 26_~Objet Rare pkmn XD~"; i=369;}
if(n=="230"){o="~_Battle CD 27_~Objet Rare pkmn XD~"; i=370;}
if(n=="231"){o="~_Battle CD 28_~Objet Rare pkmn XD~"; i=371;}
if(n=="232"){o="~_Battle CD 29_~Objet Rare pkmn XD~"; i=372;}
if(n=="233"){o="~_Battle CD 30_~Objet Rare pkmn XD~"; i=373;}
if(n=="234"){o="~_Battle CD 31_~Objet Rare pkmn XD~"; i=374;}
if(n=="235"){o="~_Battle CD 32_~Objet Rare pkmn XD~"; i=375;}
if(n=="236"){o="~_Battle CD 33_~Objet Rare pkmn XD~"; i=376;}
if(n=="237"){o="~_Battle CD 34_~Objet Rare pkmn XD~"; i=377;}
if(n=="238"){o="~_Battle CD 35_~Objet Rare pkmn XD~"; i=378;}
if(n=="239"){o="~_Battle CD 36_~Objet Rare pkmn XD~"; i=379;}
if(n=="23A"){o="~_Battle CD 37_~Objet Rare pkmn XD~"; i=380;}
if(n=="23B"){o="~_Battle CD 38_~Objet Rare pkmn XD~"; i=381;}
if(n=="23C"){o="~_Battle CD 39_~Objet Rare pkmn XD~"; i=382;}
if(n=="23D"){o="~_Battle CD 40_~Objet Rare pkmn XD~"; i=383;}
if(n=="23E"){o="~_Battle CD 41_~Objet Rare pkmn XD~"; i=384;}
if(n=="23F"){o="~_Battle CD 42_~Objet Rare pkmn XD~"; i=385;}
if(n=="240"){o="~_Battle CD 43_~Objet Rare pkmn XD~"; i=386;}
if(n=="241"){o="~_Battle CD 44_~Objet Rare pkmn XD~"; i=387;}
if(n=="242"){o="~_Battle CD 45_~Objet Rare pkmn XD~"; i=388;}
if(n=="243"){o="~_Battle CD 46_~Objet Rare pkmn XD~"; i=389;}
if(n=="244"){o="~_Battle CD 47_~Objet Rare pkmn XD~"; i=390;}
if(n=="245"){o="~_Battle CD 48_~Objet Rare pkmn XD~"; i=391;}
if(n=="246"){o="~_Battle CD 49_~Objet Rare pkmn XD~"; i=392;}
if(n=="247"){o="~_Battle CD 50_~Objet Rare pkmn XD~"; i=393;}
if(n=="248"){o="~_Battle CD 51_~Objet Rare pkmn XD~"; i=394;}
if(n=="249"){o="~_Battle CD 52_~Objet Rare pkmn XD~"; i=395;}
if(n=="24A"){o="~_Battle CD 53_~Objet Rare pkmn XD~"; i=396;}
if(n=="24B"){o="~_Battle CD 54_~Objet Rare pkmn XD~"; i=397;}
if(n=="24C"){o="~_Battle CD 55_~Objet Rare pkmn XD~"; i=398;}
if(n=="24D"){o="~_Battle CD 56_~Objet Rare pkmn XD~"; i=399;}
if(n=="24E"){o="~_Battle CD 57_~Objet Rare pkmn XD~"; i=400;}
if(n=="24F"){o="~_Battle CD 58_~Objet Rare pkmn XD~"; i=401;}
if(n=="250"){o="~_Battle CD 59_~Objet Rare pkmn XD~"; i=402;}
if(n=="251"){o="~_Battle CD 60_~Objet Rare pkmn XD~"; i=403;}
if(w==0){t=o;}
if(w==1){t=i;}
if(w==2){t=FI(o,"~",2);}
if(w==3){t=FI(o,"~",1);}
return t;
}

function LocDex(n,w){
var o=" ";
var a=" ";
var t=" ";
o="~"+n+"~Unknown Location~Unknown Location~Unknown Location~";
if(n=="00"){o="~Littleroot Town~[met at a distant land.]~_(You Start With It)_~";}
if(n=="01"){o="~Oldale Town~[OUTSKIRT STAND]~ ~";}
if(n=="02"){o="~Dewford Town~[OUTSKIRT STAND]~ ~";}
if(n=="03"){o="~Lavaridge Town~[PHENAC CITY]~ ~";}
if(n=="04"){o="~Fallarbor Town~[PHENAC CITY]~ ~";}
if(n=="05"){o="~Verdanturf Town~[MAYOR'S HOUSE]~ ~";}
if(n=="06"){o="~Pacifidlog Town~[MAYOR'S HOUSE]~ ~";}
if(n=="07"){o="~Petalburg City~[PHENAC CITY]~ ~";}
if(n=="08"){o="~Slateport City~[PHENAC CITY]~ ~";}
if(n=="09"){o="~Mauville City~[PHENAC CITY]~_Ciphere Lab (Basement 1)_~";}
if(n=="0A"){o="~Rustboro City~[PHENAC CITY]~_Ciphere Lab (Basement 2)_~";}
if(n=="0B"){o="~Fortree City~[PRE GYM]~_Chiper Lab (Outside)_~";}
if(n=="0C"){o="~Lilycove City~[PRE GYM]~ ~";}
if(n=="0D"){o="~Mossdeep City~[PHENAC STADIUM]~ ~";}
if(n=="0E"){o="~Sootopolis City~[PHENAC STADIUM]~ ~";}
if(n=="0F"){o="~Ever Grande City~[PYRITE TOWN]~ ~";}
if(n=="10"){o="~Route 101~[PYRITE TOWN]~_Mt. Battle_~";}
if(n=="11"){o="~Route 102~[PYRITE TOWN]~ ~";}
if(n=="12"){o="~Route 103~[PYRITE TOWN]~ ~";}
if(n=="13"){o="~Route 104~[PYRITE TOWN]~ ~";}
if(n=="14"){o="~Route 105~[PYRITE TOWN]~ ~";}
if(n=="15"){o="~Route 106~[PYRITE TOWN]~ ~";}
if(n=="16"){o="~Route 107~[PYRITE TOWN]~ ~";}
if(n=="17"){o="~Route 108~[PYRITE TOWN]~ ~";}
if(n=="18"){o="~Route 109~[PYRITE BLDG]~ ~";}
if(n=="19"){o="~Route 110~[PYRITE BLDG]~ ~";}
if(n=="1A"){o="~Route 111~[PYRITE BLDG]~ ~";}
if(n=="1B"){o="~Route 112~[PYRITE BLDG]~ ~";}
if(n=="1C"){o="~Route 113~[PYRITE BLDG]~ ~";}
if(n=="1D"){o="~Route 114~[PYRITE CAVE]~ ~";}
if(n=="1E"){o="~Route 115~[MIROR'S HIDEOUT]~ ~";}
if(n=="1F"){o="~Route 116~[PYRITE CAVE]~ ~";}
if(n=="20"){o="~Route 117~[PYRITE CAVE]~ ~";}
if(n=="21"){o="~Route 118~[PYRITE CAVE]~ ~";}
if(n=="22"){o="~Route 119~[PYRITE CAVE]~ ~";}
if(n=="23"){o="~Route 120~[PYRITE COLOSSEUM]~ ~";}
if(n=="24"){o="~Route 121~[AGATE VILLAGE]~ ~";}
if(n=="25"){o="~Route 122~[RELIC CAVE]~ ~";}
if(n=="26"){o="~Route 123~[RELIC CAVE]~ ~";}
if(n=="27"){o="~Route 124~[AGATE VILLAGE]~ ~";}
if(n=="28"){o="~Route 125~[AGATE VILLAGE]~ ~";}
if(n=="29"){o="~Route 126~[AGATE VILLAGE]~ ~";}
if(n=="2A"){o="~Route 127~[AGATE VILLAGE]~ ~";}
if(n=="2B"){o="~Route 128~[AGATE VILLAGE]~ ~";}
if(n=="2C"){o="~Route 129~[AGATE VILLAGE]~ ~";}
if(n=="2D"){o="~Route 130~[AGATE VILLAGE]~ ~";}
if(n=="2E"){o="~Route 131~[AGATE VILLAGE]~ ~";}
if(n=="2F"){o="~Route 132~[THE UNDER]~ ~";}
if(n=="30"){o="~Route 133~[THE UNDER]~ ~";}
if(n=="31"){o="~Route 134~[THE UNDER]~ ~";}
if(n=="32"){o="~Underwater (Route 124)~[THE UNDER]~ ~";}
if(n=="33"){o="~Underwater (Route 126)~[THE UNDER]~ ~";}
if(n=="34"){o="~Underwater (Route 127)~[THE UNDER]~ ~";}
if(n=="35"){o="~Underwater (Route 128)~[THE UNDER]~ ~";}
if(n=="36"){o="~Underwater (Sootopoist)~[THE UNDER]~ ~";}
if(n=="37"){o="~Granite Cave~[THE UNDER]~ ~";}
if(n=="38"){o="~Mt. Chimney~[met at a distant land.]~ ~";}
if(n=="39"){o="~Safari Zone~[THE UNDER SUBWAY]~ ~";}
if(n=="3A"){o="~Battle Tower~[THE UNDER SUBWAY]~ ~";}
if(n=="3B"){o="~Petalburg Woods~[THE UNDER SUBWAY]~ ~";}
if(n=="3C"){o="~Rusturf Tunnel~[THE UNDER SUBWAY]~ ~";}
if(n=="3D"){o="~Abandoned Ship~[THE UNDER SUBWAY]~ ~";}
if(n=="3E"){o="~New Maulville~[THE UNDER]~ ~";}
if(n=="3F"){o="~Meteor Falls~[UNDER COLOSSEUM]~ ~";}
if(n=="40"){o="~Meteor Falls~[DEEP COLOSSEUM]~_Cipher Key Lair(First Floor)_~";}
if(n=="41"){o="~Mt. Pyre~[FRONT OF LAB]~_Cipher Key Lair(Second Floor)_~";}
if(n=="42"){o="~Hideout~[LABORATORY]~_Cipher Key Lair(Third Floor)_~";}
if(n=="43"){o="~Shoal Cave~[LABORATORY]~_Cipher Key Lair(Fourth Floor)_~";}
if(n=="44"){o="~Seafloor Cavern~[LABORATORY]~_Cipher Key Lair(Rooftop)_~";}
if(n=="45"){o="~Underwater (Seafloor Cavern)~[LABORATORY]~_Cipher Key Lair Office_~";}
if(n=="46"){o="~Victory Road~[LABORATORY]~_Cipher Key Lair (Rooftop)_~";}
if(n=="47"){o="~Mirage Island~[LABORATORY]~_Outside Cipher Key Lair_~";}
if(n=="48"){o="~Cave of Origin~[LABORATORY]~ ~";}
if(n=="49"){o="~Southern Island~[LABORATORY]~_Citadark Isle(Control Room)_~";}
if(n=="4A"){o="~Fiery Path~[MT. BATTLE]~_Citadark Isle Final Area_~";}
if(n=="4B"){o="~Fiery Path~[MT. BATTLE]~_Citadark Isle(Walkway)_~";}
if(n=="4C"){o="~Jagged Pass~[MT. BATTLE]~_Citadark Isle Entrance_~";}
if(n=="4D"){o="~Jagged Pass~[MT. BATTLE]~_Citadark Isle(Lower Volcano)_~";}
if(n=="4E"){o="~Sealed Chamber~[MT. BATTLE]~ ~";}
if(n=="4F"){o="~Underwater (Route 134)~[MT. BATTLE]~ ~";}
if(n=="50"){o="~Scorched Slab~[MT. BATTLE]~_Citadark Isle (Upper Volcano)_~";}
if(n=="51"){o="~Island Cave~[MT. BATTLE]~_Citadark Isle(Inner Volcano)_~";}
if(n=="52"){o="~Desert Ruins~[MT. BATTLE]~ ~";}
if(n=="53"){o="~Ancient Tomb~[MT. BATTLE]~ ~";}
if(n=="54"){o="~Inside of Truck~[MT. BATTLE]~_Citadark Isle(Crane Room)_~";}
if(n=="55"){o="~Sky Pillar~[MT. BATTLE]~_Citadark Isle(Whirlpool)_~";}
if(n=="56"){o="~Secret Base~[MT. BATTLE]~ ~";}
if(n=="57"){o="~Ferry~[MT. BATTLE]~_Citadark Isle(Bridge)_~";}
if(n=="58"){o="~{Pallett Town}~[MT. BATTLE]~_Outside Citadark Isle_~";}
if(n=="59"){o="~{Viridian City}~[MT. BATTLE]~ ~";}
if(n=="5A"){o="~{Pewter City}~[MT. BATTLE]~_Rock Poké Spot_~";}
if(n=="5B"){o="~{Cerulean City}~[MT. BATTLE]~_Oasis Poké Spot_~";}
if(n=="5C"){o="~{Lavender Town}~[MT. BATTLE]~_Cave Poké Spot_~";}
if(n=="5D"){o="~{Vermillion City}~[MT. BATTLE]~ ~";}
if(n=="5E"){o="~{Celadon City}~[MT. BATTLE]~_Phenac City (Pre Gym)_~";}
if(n=="5F"){o="~{Fuchsia City}~[MT.BTL COLOSSEUM]~ ~";}
if(n=="60"){o="~{Cinnibar Isle}~[met at a distant land.]~ ~";}
if(n=="61"){o="~{Indigo Plateau}~[met at a distant land.]~ ~";}
if(n=="62"){o="~{Saffron City}~[met at a distant land.]~ ~";}
if(n=="63"){o="~{Route 4}~[met at a distant land.]~ ~";}
if(n=="64"){o="~{Route 10}~[met at a distant land.]~_Phenac City Plaza_~";}
if(n=="65"){o="~{Route 1}~[met at a distant land.]~ ~";}
if(n=="66"){o="~{Route 2}~[REALGAM TOWER]~ ~";}
if(n=="67"){o="~{Route 3}~[REALGAMTWR DOME]~ ~";}
if(n=="68"){o="~{Route 4}~[REALGAMTWR DOME]~ ~";}
if(n=="69"){o="~{Route 5}~[REALGAMTWR DOME]~ ~";}
if(n=="6A"){o="~{Route 6}~[REALGAMTWR DOME]~ ~";}
if(n=="6B"){o="~{Route 7}~[REALGAMTWR DOME]~_Phenac City Stadium_~";}
if(n=="6C"){o="~{Route 8}~[REALGAMTWR DOME]~ ~";}
if(n=="6D"){o="~{Route 9}~[REALGAMTWR DOME]~_Pyrite Town (Onbs Bulding)_~";}
if(n=="6E"){o="~{Route 10}~[REALGAMTWR DOME]~_Pyrite Town (Onbs Bulding)_~";}
if(n=="6F"){o="~{Route 11}~[REALGAMTWR DOME]~_Pyrite Town (Onbs Bulding)_~";}
if(n=="70"){o="~{Route 12}~[REALGAMTWR DOME]~ ~";}
if(n=="71"){o="~{Route 13}~[REALGAMTWR DOME]~ ~";}
if(n=="72"){o="~{Route 14}~[REALGAMTWR LOBBY]~ ~";}
if(n=="73"){o="~{Route 15}~[REALGAM TOWER]~ ~";}
if(n=="74"){o="~{Route 16}~[REALGAM TOWER]~ ~";}
if(n=="75"){o="~{Route 17}~[REALGAM TOWER]~ ~";}
if(n=="76"){o="~{Route 18}~[TOWER COLOSSEUM]~ ~";}
if(n=="77"){o="~{Sea Route 19}~[PHENAC CITY]~_Pyrite Town (Onbs Bulding)_~";}
if(n=="78"){o="~{Sea Route 20}~[PYRITE COLOSSEUM]~ ~";}
if(n=="79"){o="~{Sea Route 21}~[UNDER COLOSSEUM]~ ~";}
if(n=="7A"){o="~{Route 22}~[THE UNDER]~ ~";}
if(n=="7B"){o="~{Route 23}~[REALGAM TOWER]~ ~";}
if(n=="7C"){o="~{Route 24}~[REALGAM TOWER]~ ~";}
if(n=="7D"){o="~{Route 25}~[DEEP COLOSSEUM]~ ~";}
if(n=="7E"){o="~{Viridian Forest}~[ORRE COLOSSEUM]~ ~";}
if(n=="7F"){o="~{Mt Moon}~[THE UNDER]~ ~";}
if(n=="80"){o="~{SS Anne (Pier)}~[PHENAC CITY]~ ~";}
if(n=="81"){o="~{Underground Path}~[SNEGEM HIDOUT]~ ~";}
if(n=="82"){o="~{Underground Path}~[SNEGEM HIDOUT]~ ~";}
if(n=="83"){o="~{Diglett Cave}~[SNEGEM HIDOUT]~ ~";}
if(n=="84"){o="~{Victory Road}~[SNEGEM HIDOUT]~ ~";}
if(n=="85"){o="~{Team Rocket's Hideout}~[SNEGEM HIDOUT]~ ~";}
if(n=="86"){o="~{Silph Company (Lapras)}~[SNEGEM HIDOUT]~ ~";}
if(n=="87"){o="~{Pokemon Mansion}~[SNEGEM HIDOUT]~ ~";}
if(n=="88"){o="~{Safari Zone}~[SNEGEM HIDOUT]~ ~";}
if(n=="89"){o="~{Pokemon League}~[SNEGEM HIDOUT]~ ~";}
if(n=="8A"){o="~{Rock Tunnel}~[THE UNDER SUBWAY]~ ~";}
if(n=="8B"){o="~{Seafoam Islands}~[THE UNDER SUBWAY]~ ~";}
if(n=="8C"){o="~{Pokemon Tower}~[LABORATORY]~ ~";}
if(n=="8D"){o="~{Cerulean Cave}~[LABORATORY]~ ~";}
if(n=="8E"){o="~{Power Plant}~[PYRITE COLOSSEUM]~ ~";}
if(n=="8F"){o="~{ONE ISLAND}~[met at a distant land.]~_Pokémon Hq Lab_~";}
if(n=="90"){o="~{TWO ISLAND}~[met at a distant land.]~ ~";}
if(n=="91"){o="~{THREE ISLAND}~[met at a distant land.]~ ~";}
if(n=="92"){o="~{FOUR ISLAND (Nursery)}~[met at a distant land.]~ ~";}
if(n=="93"){o="~{FIVE ISLAND}~[met at a distant land.]~ ~";}
if(n=="94"){o="~{SEVEN ISLAND}~[met at a distant land.]~ ~";}
if(n=="95"){o="~{SIX ISLAND}~[met at a distant land.]~ ~";}
if(n=="96"){o="~{Isle 1-KINDLE ROAD}~ ~ ~";}
if(n=="97"){o="~{Isle 1-TREASURE BEACH}~ ~ ~";}
if(n=="98"){o="~{Isle 2-CAPE BRINK}~ ~ ~";}
if(n=="99"){o="~{Isle 3-BOND BRIDGE}~ ~_Gateon Port_~";}
if(n=="9A"){o="~{THREE ISLAND PORT}~ ~ ~";}
if(n=="9B"){o="~{SEVII ISLE 6}~ ~ ~";}
if(n=="9C"){o="~{SEVII ISLE 7}~ ~ ~";}
if(n=="9D"){o="~{SEVII ISLE 8}~ ~ ~";}
if(n=="9E"){o="~{SEVII ISLE 9}~ ~ ~";}
if(n=="9F"){o="~{RESORT GORGEOUS}~ ~ ~";}
if(n=="A0"){o="~{Isle 5-WATER LABYRINTH}~ ~ ~";}
if(n=="A1"){o="~{FIVE ISLE MEADOW}~ ~ ~";}
if(n=="A2"){o="~{Isle 5-South Sea Route-MEMORIAL PILLAR}~ ~_Gateon Port Lighthouse_~";}
if(n=="A3"){o="~{OUTCAST ISLAND}~ ~ ~";}
if(n=="A4"){o="~{GREEN PATH}~ ~_Outskirt Stand_~";}
if(n=="A5"){o="~{WATER PATH}~ ~ ~";}
if(n=="A6"){o="~{RUIN VALLEY}~ ~ ~";}
if(n=="A7"){o="~{TRAINER TOWER}~ ~ ~";}
if(n=="A8"){o="~{CANYON ENTRANCE}~ ~ ~";}
if(n=="A9"){o="~{SEVAULT CANYON}~ ~ ~";}
if(n=="AA"){o="~{TANOBY RUINS}~ ~ ~";}
if(n=="AB"){o="~{SEVII ISLE 22}~ ~ ~";}
if(n=="AC"){o="~{SEVII ISLE 23}~ ~ ~";}
if(n=="AD"){o="~{SEVII ISLE 24}~ ~ ~";}
if(n=="AE"){o="~{Isle 8-NAVEL ROCK(Lugia & Ho-oh)}~ ~ ~";}
if(n=="AF"){o="~{Isle 1-MT. EMBER}~ ~ ~";}
if(n=="B0"){o="~{BERRY FOREST}~ ~ ~";}
if(n=="B1"){o="~{Isle 4-ICEFALL CAVE}~ ~ ~";}
if(n=="B2"){o="~{ROCKET WAREHOUSE}~ ~ ~";}
if(n=="B3"){o="~{TRAINER TOWER}~ ~ ~";}
if(n=="B4"){o="~{DOTTED HOLE}~ ~ ~";}
if(n=="B5"){o="~{Isle 5-LOST CAVE}~ ~ ~";}
if(n=="B6"){o="~{PATTERN BUSH}~ ~ ~";}
if(n=="B7"){o="~{ALTERING CAVE}~ ~ ~";}
if(n=="B8"){o="~{TRNOBY CHAMBERS}~ ~ ~";}
if(n=="B9"){o="~{THREE ISLE PATH-Tunnel}~ ~ ~";}
if(n=="BA"){o="~{TANOBY KEY}~ ~ ~";}
if(n=="BB"){o="~{Isle 9-BIRTH ISLAND(Deoxys)}~ ~ ~";}
if(n=="BC"){o="~{Iresu Sekisitsu-MONEAN CHAMBER}~ ~ ~";}
if(n=="BD"){o="~{Nazan Sekisitsu-LIPTOO CHAMBER}~ ~ ~";}
if(n=="BE"){o="~{Yugo Sekisitsu-WEEPTH CHAMBER}~ ~ ~";}
if(n=="BF"){o="~{Aleboca Sekisitsu-DILFORD CHAMBER}~ ~ ~";}
if(n=="C0"){o="~{Kotou Sekisitsu-SCUFIB CHAMBER}~ ~ ~";}
if(n=="C1"){o="~{Anuza Sekisitsu-RIXY CHAMBER}~ ~ ~";}
if(n=="C2"){o="~{Oliphu Sekisitsu-VIAPOIS CHAMBER}~ ~ ~";}
if(n=="C3"){o="~{EMBER SPA}~ ~ ~";}
if(n=="C4"){o="~{CELADON DEPT.}~ ~ ~";}
if(n=="C5"){o="~/Aqua Hideout/~ ~ ~";}
if(n=="C6"){o="~/Magma Hidout/~ ~ ~";}
if(n=="C7"){o="~/Mirage Tower/~ ~ ~";}
if(n=="C8"){o="~/Birth Island-Deoxys/~ ~ ~";}
if(n=="C9"){o="~/Faraway Island-Mew/~ ~ ~";}
if(n=="CA"){o="~/Artisan Cave/~ ~ ~";}
if(n=="CB"){o="~/Marine Cave-Kryogre/~ ~ ~";}
if(n=="CC"){o="~/Underwater/~ ~ ~";}
if(n=="CD"){o="~/Terra Cave-Groudon/~ ~ ~";}
if(n=="CE"){o="~/Underwater/~ ~ ~";}
if(n=="CF"){o="~/Underwater/~ ~ ~";}
if(n=="D0"){o="~/Underwater/~ ~ ~";}
if(n=="D1"){o="~/Desert Underpass/~ ~ ~";}
if(n=="D2"){o="~/Altering Cave/~ ~ ~";}
if(n=="D3"){o="~/Navel Rock-Ho-oh,Lugia/~ ~ ~";}
if(n=="D4"){o="~/Trainer Hill/~ ~ ~";}
if(n=="D5"){o="~ ~ ~ ~";}
if(n=="D6"){o="~ ~ ~ ~";}
if(n=="D7"){o="~ ~ ~ ~";}
if(n=="D8"){o="~ ~ ~ ~";}
if(n=="D9"){o="~ ~ ~ ~";}
if(n=="DA"){o="~ ~ ~ ~";}
if(n=="DB"){o="~ ~ ~ ~";}
if(n=="DC"){o="~ ~ ~ ~";}
if(n=="DD"){o="~ ~ ~ ~";}
if(n=="DE"){o="~ ~ ~ ~";}
if(n=="DF"){o="~ ~ ~ ~";}
if(n=="E0"){o="~ ~ ~ ~";}
if(n=="E1"){o="~ ~ ~ ~";}
if(n=="E2"){o="~ ~ ~ ~";}
if(n=="E3"){o="~ ~ ~ ~";}
if(n=="E4"){o="~ ~ ~ ~";}
if(n=="E5"){o="~ ~ ~ ~";}
if(n=="E6"){o="~ ~ ~ ~";}
if(n=="E7"){o="~ ~ ~ ~";}
if(n=="E8"){o="~ ~ ~ ~";}
if(n=="E9"){o="~ ~ ~ ~";}
if(n=="EA"){o="~ ~ ~ ~";}
if(n=="EB"){o="~ ~ ~ ~";}
if(n=="EC"){o="~ ~ ~ ~";}
if(n=="ED"){o="~ ~ ~ ~";}
if(n=="EE"){o="~ ~ ~ ~";}
if(n=="EF"){o="~ ~ ~ ~";}
if(n=="F0"){o="~ ~ ~ ~";}
if(n=="F1"){o="~ ~ ~ ~";}
if(n=="F2"){o="~ ~ ~ ~";}
if(n=="F3"){o="~ ~ ~ ~";}
if(n=="F4"){o="~ ~ ~ ~";}
if(n=="F5"){o="~ ~ ~ ~";}
if(n=="F6"){o="~ ~ ~ ~";}
if(n=="F7"){o="~ ~ ~ ~";}
if(n=="F8"){o="~ ~ ~ ~";}
if(n=="F9"){o="~ ~ ~ ~";}
if(n=="FA"){o="~ ~ ~ ~";}
if(n=="FB"){o="~ ~ ~ ~";}
if(n=="FC"){o="~ ~ ~ ~";}
if(n=="FD"){o="~ ~ ~ ~";}
if(n=="FE"){o="~In-game Trade~ ~ ~";}
if(n=="FF"){o="~fateful encounter.~/fateful encounter./~_fateful encounter._~";}
// Num
t=n;
if(w==0){
 a=FI(o,"~",1);
 t+=" "+a;
 a=FI(o,"~",2);
 t+=a;
 a=FI(o,"~",3);
 t+=a;
}
// Ruby/Sapphire/Emerald/Fire/Leaf
if(w==1||w==2||w==3){
 a=FI(o,"~",1);
 t+=" "+a;
}
// Colosseum
if(w==4){
 a=FI(o,"~",2);
 t+=" "+a;
}
// XD
if(w==5){
 a=FI(o,"~",3);
 t+=" "+a;
}
return t;
}

function MoveDex(n,w){
var o=" ";
// 1    2     3        4  5    6
// ~Name~power~Accuracy~PP~Type~Desc~
o="~Inconnu~0~0%~5~Inconnu~"+DecToHex(n,4)+" Attaque Inconnue~";
if(n==0){o="~Aucune attaque~0~0%~0~rien~aucune attaque.~";}
if(n==1){o="~Ecras'face~40~100%~35~Normal~Pas d'effet.~";}
if(n==2){o="~Poing Karate~50~100%~25~Combat~beaucoup de chance de coup critique.~";}
if(n==3){o="~Torgnoles~15~85%~10~Normal~attauqe 2-5 fois. Il a 37.5% d'attaquer 2-5 fois et 12.5% d'attaquer 4-5 fois.~";}
if(n==4){o="~Poing Comète~18~85%~15~Normal~Attacks 2-5 times. Has a 37.5% chance each of hitting 2 or 3 times and a 12.5% chance each of hitting 4 or 5 times.~";}
if(n==5){o="~Ultimapoing~80~85%~20~Normal~No effect.~";}
if(n==6){o="~jackpot~40~100%~20~Normal~User gains money after battle.~";}
if(n==7){o="~Poing Feu~75~100%~15~Fire~May induce opponent with BURN status.~";}
if(n==8){o="~Poing Glace~75~100%~15~Ice~May induce opponent with FREEZE status.~";}
if(n==9){o="~Poing eclair~75~100%~15~Electric~May induce opponent with PARALYSIS status.~";}
if(n==10){o="~Griffe~40~100%~35~Normal~No effect.~";}
if(n==11){o="~Force poigne~55~100%~30~Normal~No effect.~";}
if(n==12){o="~Guillotine~1~30%~5~Normal~Knocks out opponent in one hit. Accuracy increases by an amount equal to the difference between user and enemy's experience levels, then divided by 128. Accuracy will be 23.4-100%.~";}
if(n==13){o="~Coupe-vent~80~100%~10~Normal~Attacks in two turns. Has a high critical hit ratio.~";}
if(n==14){o="~Danse-lame~0~0%~30~Normal~Raises user's ATTACK ability up two stages.~";}
if(n==15){o="~Coupe~50~95%~30~Normal~HM01-No effect.~";}
if(n==16){o="~Tornade~40~100%~35~Flying~Forces opponent to switch. Also hits while opponent is using Fly.~";}
if(n==17){o="~Cru-aile~60~100%~35~Flying~No effect.~";}
if(n==18){o="~Cyclone~0~100%~20~Normal~Escape from a wild battle. Switch opponent's Pokémon in a link battle.~";}
if(n==19){o="~Vol~70~95%~15~Flying~HM02-Attacks in two turns. The first turn, user does not take damage.~";}
if(n==20){o="~Etreinte~15~75%~20~Normal~Traps opponent for 2-5 turns. Deals 1/16 HP of damage each turn.~";}
if(n==21){o="~Souplesse~80~75%~20~Normal~No effect.~";}
if(n==22){o="~Fouet lianes~35~100%~10~Grass~No effect.~";}
if(n==23){o="~Ecrasement~65~100%~20~Normal~May cause opponent to FLINCH.~";}
if(n==24){o="~Double pied~30~100%~30~Fighting~Attacks twice.~";}
if(n==25){o="~Ultimawashi~120~75%~5~Normal~No effect.~";}
if(n==26){o="~Pied Sauté~70~95%~25~Fighting~If attack misses, user takes 1/8 HP of damage.~";}
if(n==27){o="~Mawashi Geri~60~85%~15~Fighting~May cause opponent to FLINCH.~";}
if(n==28){o="~Jet de Sable~0~100%~15~Ground~Lowers opponent's Hit Ratio ability down one stage.~";}
if(n==29){o="~Coup d'Boule~70~100%~15~Normal~May cause opponent to FLINCH.~";}
if(n==30){o="~Koud'Korne~65~100%~25~Normal~No effect.~";}
if(n==31){o="~Furie~15~85%~20~Normal~Attacks 2-5 times. Has a 37.5% chance each of hitting 2 or 3 times and a 12.5% chance each of hitting 4 or 5 times.~";}
if(n==32){o="~Empal-Korne~1~30%~5~Normal~Knocks out opponent in one hit. Accuracy increases by an amount equal to the difference between user and enemy's experience levels, then divided by 128. Accuracy will be 23.4-100%.~";}
if(n==33){o="~Charge~35~95%~35~Normal~No effect.~";}
if(n==34){o="~Plaquage~85~100%~15~Normal~May induce opponent with PARALYSIS status.~";}
if(n==35){o="~Ligotage~15~85%~20~Normal~Traps opponent for 2-5 turns. Deals 1/16 HP of damage each turn.~";}
if(n==36){o="~Belier~90~85%~20~Normal~User is dealt recoil damage equal to 1/4 damage dealt to opponent.~";}
if(n==37){o="~Mania~90~100%~20~Normal~Attacks 2, 3 turns, then induces user with CONFUSION condition.~";}
if(n==38){o="~Damocles~120~100%~15~Normal~User is dealt recoil damage equal to 1/3 damage dealt to opponent.~";}
if(n==39){o="~Mimi-queue~0~100%~30~Normal~Lowers opponent's DEFENSE ability down one stage.~";}
if(n==40){o="~Drad-venin~15~100%~35~Poison~May induce opponent with POISON status.~";}
if(n==41){o="~Double-dard~25~100%~20~Bug~Attacks 2 times. May induce opponent with POISON condition.~";}
if(n==42){o="~Dard-nuee~14~85%~20~Bug~Attacks 2-5 times. Has a 37.5% chance each of hitting 2 or 3 times and a 12.5% chance each of hitting 4 or 5 times.~";}
if(n==43){o="~Groz'yeux~0~100%~30~Normal~Lowers opponent's DEFENSE ability down one stage.~";}
if(n==44){o="~Morsure~60~100%~25~Dark~May cause opponent to FLINCH.~";}
if(n==45){o="~Rugissement~0~100%~40~Normal~Lowers opponent's ATTACK ability down one stage.~";}
if(n==46){o="~Hurlement~0~100%~20~Normal~TM05-Escape from a wild battle. Switch opponent's Pokémon in a link battle.~";}
if(n==47){o="~Berceuse~0~55%~15~Normal~May induce opponent with SLEEP status.~";}
if(n==48){o="~Ultrason~0~55%~20~Normal~Induces opponent with CONFUSION condition.~";}
if(n==49){o="~Sonicboom~1~90%~20~Normal~Alway deals 20 HP of damage.~";}
if(n==50){o="~Entrave~0~55%~20~Normal~Disables an opponent's move for a short amount of time.~";}
if(n==51){o="~Acide~40~100%~30~Poison~May lower opponent's DEFENSE ability down one stage.~";}
if(n==52){o="~Flammeche~40~100%~25~Fire~May induce opponent with BURN status.~";}
if(n==53){o="~Lance Flamme~95~100%~15~Fire~TM35-May induce opponent with BURN status.~";}
if(n==54){o="~Brume~0~0%~30~Ice~Prevents user's abilities from being lowered.~";}
if(n==55){o="~Pistolet a O~40~100%~25~Water~No effect.~";}
if(n==56){o="~Hydrocanon~120~80%~5~Water~No effect.~";}
if(n==57){o="~Surf~95~100%~15~Water~HM03-No effect.~";}
if(n==58){o="~Laser Glace~95~100%~10~Ice~TM13-May induce opponent with FREEZE status.~";}
if(n==59){o="~Blizzard~120~70%~5~Ice~TM14-May induce opponent with FREEZE status.~";}
if(n==60){o="~Rafale Psy~65~100%~20~Psychic~May induce opponent with CONFUSION condition.~";}
if(n==61){o="~Bulles d'O~65~100%~20~Water~May lower opponent's SPEED ability down one stage.~";}
if(n==62){o="~Onde Boréale~65~100%~20~Ice~May lower opponent's ATTACK ability down one stage.~";}
if(n==63){o="~Ultralaser~150~90%~5~Normal~TM15-Attacks in two turns. The second turn, user does not attack.~";}
if(n==64){o="~Picpic~35~100%~35~Flying~No effect.~";}
if(n==65){o="~Bec Vrille~80~100%~20~Flying~No effect.~";}
if(n==66){o="~Sacrifice~80~80%~25~Fighting~User is dealt recoil damage equal to 1/4 damage dealt to opponent.~";}
if(n==67){o="~Balayage~1~100%~20~Fighting~Power depends on the opponent's weight.~";}
if(n==68){o="~Riposte~1~100%~20~Fighting~If hit by a physical attack, deals back double the damage.~";}
if(n==69){o="~Frappe Atlas~1~100%~20~Fighting~Deals HP of damage equal to user's level.~";}
if(n==70){o="~Force~80~100%~15~Normal~HM04-No effect.~";}
if(n==71){o="~Vol-Vie~20~100%~20~Grass~User recovers half damage dealt.~";}
if(n==72){o="~Mega-Sangsue~40~100%~10~Grass~User recovers half damage dealt.~";}
if(n==73){o="~Vampigraine~0~90%~10~Grass~Absorbs a small amount of HP from the opponent every turn.~";}
if(n==74){o="~Croissance~0~0%~40~Normal~Raises user's SPECIAL ATTACK ability up one stage.~";}
if(n==75){o="~Tranch'Herbe~55~95%~25~Grass~Has a high critical hit rate.~";}
if(n==76){o="~Lance-Soleil~120~100%~10~Grass~TM22-Attacks in two turns. The first turn, user does not attack. Attacks in one turn during Clear Skies weather.~";}
if(n==77){o="~Poudre Toxik~0~75%~35~Poison~Induces opponent with POISON status.~";}
if(n==78){o="~Para-Spore~0~75%~30~Grass~Induces opponent with PARALYSIS status.~";}
if(n==79){o="~Poudre Dodo~0~75%~15~Grass~May induce opponent with SLEEP status.~";}
if(n==80){o="~Danse Fleur~70~100%~20~Grass~Attacks 2, 3 turns, then induces user with CONFUSION condition.~";}
if(n==81){o="~Secretion~0~95%~40~Bug~Lowers opponent's SPEED ability down one stage.~";}
if(n==82){o="~Draco-Rage~1~100%~10~Dragon~Alway deals 40 HP of damage.~";}
if(n==83){o="~DanseFlamme~15~70%~15~Fire~Traps opponent for 2-5 turns. Deals 1/16 HP of damage each turn.~";}
if(n==84){o="~Eclair~40~100%~30~Electric~May induce opponent with PARALYSIS status.~";}
if(n==85){o="~Tonnerre~95~100%~15~Electric~TM24-May induce opponent with PARALYSIS status.~";}
if(n==86){o="~Cage Eclair~0~100%~20~Electric~Induces opponent with PARALYSIS status.~";}
if(n==87){o="~Fatal-Foudre~120~70%~10~Electric~TM25-May induce opponent with PARALYSIS. Has 100% accuracy during Big Rain weather.~";}
if(n==88){o="~Jet Pierres~50~90%~15~Rock~No effect.~";}
if(n==89){o="~Seisme~100~100%~10~Ground~TM26-Hits all opponents.~";}
if(n==90){o="~Abime~1~30%~5~Ground~Knocks out opponent in one hit. Accuracy increases by an amount equal to the difference between user and enemy's experience levels, then divided by 128. Accuracy will be 23.4-100%.~";}
if(n==91){o="~Tunnel~60~100%~10~Ground~TM28-Attacks in two turns. The first turn, user does not take damage.~";}
if(n==92){o="~Toxik~0~85%~10~Poison~TM06-Induces opponent with TOXIC status.~";}
if(n==93){o="~Choc Mental~50~100%~25~Psychic~May induce opponent with CONFUSION condition.~";}
if(n==94){o="~Psyko~90~100%~10~Psychic~TM29-May lower opponent's SPECIAL DEFENSE ability down one stage.~";}
if(n==95){o="~Hypnose~0~60%~20~Psychic~May induce opponent with SLEEP status.~";}
if(n==96){o="~Yoga~0~0%~40~Psychic~Raises user's ATTACK ability up one stage.~";}
if(n==97){o="~Hate~0~0%~30~Psychic~Raises user's SPEED ability up two stages.~";}
if(n==98){o="~Vive-Attaque~40~100%~30~Normal~Always attacks first.~";}
if(n==99){o="~Frenesie~20~100%~20~Normal~User's Attack raises when damaged by opponent.~";}
if(n==100){o="~Teleport~0~0%~20~Psychic~Flees from battle. Does not work in Trainer Battles.~";}
if(n==101){o="~Tenebres~1~100%~15~Ghost~Deals HP of damage equal to user's level.~";}
if(n==102){o="~Copie~0~100%~10~Normal~Copies move used by opponent.~";}
if(n==103){o="~Grincement~0~85%~40~Normal~Lowers opponent's DEFENSE ability down two stages.~";}
if(n==104){o="~Reflet~0~0%~15~Normal~TM32-Raises user's Evasion ability up one stage.~";}
if(n==105){o="~Soin~0~0%~20~Normal~Restores half of user's maximum HP.~";}
if(n==106){o="~Armure~0~0%~30~Normal~Raises user's DEFENSE ability up one stage.~";}
if(n==107){o="~Lilliput~0~0%~20~Normal~Raises user's Evasion ability up one stage. STOMP deals double damage to user as long as user remains in battle.~";}
if(n==108){o="~Brouillard~0~100%~20~Normal~Lowers opponent's Hit Ratio ability down one stage.~";}
if(n==109){o="~Onde Folie~0~100%~10~Ghost~Induces opponent with CONFUSION condition.~";}
if(n==110){o="~Repli~0~0%~40~Water~Raises user's DEFENSE ability up one stage.~";}
if(n==111){o="~Boul'Armure~0~0%~40~Normal~Raises Defense up one stage. Damage from Rollout will increase.~";}
if(n==112){o="~Bouclier~0~0%~30~Psychic~Raises user's DEFENSE ability up two stages.~";}
if(n==113){o="~Mur Lumière~0~0%~30~Psychic~TM16-Special type moves deal half damage to user for five turns.~";}
if(n==114){o="~Buée Noir~0~0%~30~Ice~Resets all ability stages.~";}
if(n==115){o="~Protection~0~0%~20~Psychic~TM33-Physical type moves deal half damage to user for five turns.~";}
if(n==116){o="~Puissance~0~0%~30~Normal~Increases user's critical hit rate.~";}
if(n==117){o="~Patience~1~100%~10~Normal~Withstands attacks for 2, 3 turns, then deals back double the damage.~";}
if(n==118){o="~Metronome~0~0%~10~Normal~Randomly uses almost any attack.~";}
if(n==119){o="~Mimique~0~0%~20~Flying~Move is replaced by the last move used by opponent.~";}
if(n==120){o="~Destruction~200~100%~5~Normal~Attack deals double damage. User faints.~";}
if(n==121){o="~Bomb'Oeuf~100~75%~10~Normal~No effect.~";}
if(n==122){o="~Lechouille~20~100%~30~Ghost~May induce opponent with PARALYSIS status.~";}
if(n==123){o="~Puredpois~20~70%~20~Poison~May induce opponent with POISON status.~";}
if(n==124){o="~Detritus~65~100%~20~Poison~May induce opponent with POISON status.~";}
if(n==125){o="~Massd'Os~65~85%~20~Ground~May cause opponent to FLINCH.~";}
if(n==126){o="~Deflagration~120~85%~5~Fire~TM38-May induce opponent with BURN status.~";}
if(n==127){o="~Cascade~80~100%~15~Water~HM07-No effect.~";}
if(n==128){o="~Claquoir~35~75%~10~Water~Traps opponent for 2-5 turns. Deals 1/16 HP of damage each turn.~";}
if(n==129){o="~Meteores~60~0%~20~Normal~If opponent is on screen, hits without fail.~";}
if(n==130){o="~Coud'Krane~100~100%~15~Normal~Raises Defense up one stage first turn, then attacks second turn.~";}
if(n==131){o="~Picanon~20~100%~15~Normal~Attacks 2-5 times. Has a 37.5% chance each of hitting 2 or 3 times and a 12.5% chance each of hitting 4 or 5 times.~";}
if(n==132){o="~Constriction~10~100%~35~Normal~May lower opponent's SPEED ability down one stage.~";}
if(n==133){o="~Amnesie~0~0%~20~Psychic~Raises user's SPECIAL DEFENSE ability up two stages.~";}
if(n==134){o="~Telekinesie~0~80%~15~Psychic~Lowers opponent's Hit Ratio ability down one stage.~";}
if(n==135){o="~E-Coque~0~100%~10~Normal~User recovers half maximum HP.~";}
if(n==136){o="~Pied Voltige~85~90%~20~Fighting~If attack misses, user takes 1/8 HP of damage.~";}
if(n==137){o="~Intimidation~0~75%~30~Normal~Induces opponent with PARALYSIS status.~";}
if(n==138){o="~Devoreve~100~100%~15~Psychic~Only works when opponent is SLEEP condition. User recovers HP based on damage to opponent.~";}
if(n==139){o="~Gaz Toxik~0~55%~40~Poison~Induces opponent with POISON status.~";}
if(n==140){o="~Pilonnage~15~85%~20~Normal~Attacks 2-5 times. Has a 37.5% chance each of hitting 2 or 3 times and a 12.5% chance each of hitting 4 or 5 times.~";}
if(n==141){o="~Vampirisme~20~100%~15~Bug~User recovers half damage dealt.~";}
if(n==142){o="~Grobisou~0~75%~10~Normal~May induce opponent with SLEEP status.~";}
if(n==143){o="~Pique~140~90%~5~Flying~Attacks in two turns. May cause opponent to FLINCH.~";}
if(n==144){o="~Morphing~0~0%~10~Normal~User's abilities (except for HP) become that of opponent. User's ability changes and status inducement also become that of opponent. Users moves become those of opponent, but only have 5 PP each.~";}
if(n==145){o="~Ecume~20~100%~30~Water~May lower opponent's SPEED ability down one stage.~";}
if(n==146){o="~Uppercut~70~100%~10~Normal~May induce opponent with CONFUSION condition.~";}
if(n==147){o="~Spore~0~100%~15~Grass~May induce opponent with SLEEP status.~";}
if(n==148){o="~Flash~0~70%~20~Normal~HM05-Lowers opponent's Hit Ratio ability down one stage.~";}
if(n==149){o="~Vague Psy~1~80%~15~Psychic~Deals HP of damage equal to 1 to 1.5 x user's level.~";}
if(n==150){o="~Trempette~0~0%~40~Normal~Does nothing.~";}
if(n==151){o="~Acidarmure~0~0%~40~Poison~Raises user's DEFENSE ability up two stages.~";}
if(n==152){o="~Pince Masse~90~85%~10~Water~Has a high critical hit rate.~";}
if(n==153){o="~Explosion~250~100%~5~Normal~Attack deals double damage. User faints.~";}
if(n==154){o="~Combo-Griffe~18~80%~15~Normal~Attacks 2-5 times. Has a 37.5% chance each of hitting 2 or 3 times and a 12.5% chance each of hitting 4 or 5 times.~";}
if(n==155){o="~Osmerang~50~90%~10~Ground~Attacks twice.~";}
if(n==156){o="~Repos~0~0%~10~Psychic~TM44-User restores all HP and is induced with SLEEP condition for two turns.~";}
if(n==157){o="~Eboulement~75~90%~10~Rock~May cause opponent to FLINCH.~";}
if(n==158){o="~Croc de mort~80~90%~15~Normal~May cause opponent to FLINCH.~";}
if(n==159){o="~Affutage~0~0%~30~Normal~Raises user's ATTACK ability up one stage.~";}
if(n==160){o="~Adaptation~0~0%~30~Normal~User's Type becomes the same as the Type of one of its moves.~";}
if(n==161){o="~Triplattaque~80~100%~10~Normal~May induce opponent with either BURN, FREEZE, or PARALYSIS.~";}
if(n==162){o="~Croc Fatal~1~90%~10~Normal~Deals damage equal to half opponent's current HP.~";}
if(n==163){o="~Tranche~70~100%~20~Normal~Has a high critical hit rate.~";}
if(n==164){o="~Clonage~0~0%~10~Normal~Uses 1/4 of the user's HP to make a decoy. Decoy takes damage from opponent's attacks until it breaks.~";}
if(n==165){o="~Lutte~50~100%~1~Normal~User is dealt recoil damage equal to 1/4 damage dealt to opponent.~";}
if(n==166){o="~Gribouille~0~0%~1~Normal~Permanently copies opponent's last move.~";}
if(n==167){o="~Triple Pied~10~90%~10~Fighting~Attacks 1 to 3 times.~";}
if(n==168){o="~Larcin~40~100%~10~Dark~TM46-If user is not holding an item, user takes opponent's item.~";}
if(n==169){o="~Toile~0~100%~10~Bug~Opponent cannot escape as long as user remains in battle.~";}
if(n==170){o="~Lire-Esprit~0~100%~5~Normal~Ensures that user's next attack will hit without fail.~";}
if(n==171){o="~Cauchemar~0~100%~15~Ghost~Inflicts 1/4 damage every turn. Only works if opponent is induced with SLEEP condition.~";}
if(n==172){o="~Roue de Feu~60~100%~25~Fire~May induce opponent with BURN status. Can remove FREEZE status from user.~";}
if(n==173){o="~Ronflement~40~100%~15~Normal~Can only be used when user is induced with SLEEP.~";}
if(n==174){o="~Malediction~0~0%~10~???~For a Ghost type Pokémon, the user loses half their maximum HIT POINTS, and the opponent is inflicted with a Nightmare. For all other type Pokémon, raises user's ATTACK and DEFENSE abilities each up one stage. Lowers user's SPEED ability down one stage.~";}
if(n==175){o="~Fleai~1~100%~15~Normal~The less HP user has, the higher the attack power. When HP is very low, attack power is 200. When HP is highest, attack power is 20.~";}
if(n==176){o="~Conversion 2~0~100%~30~Normal~User becomes a Type resistent to last attack's Type.~";}
if(n==177){o="~Aeroblast~100~95%~5~Flying~Has a high critical hit rate.~";}
if(n==178){o="~Spore Cotton~0~85%~40~Grass~Lowers opponent's SPEED ability down two stages.~";}
if(n==179){o="~Contre~1~100%~15~Fighting~The less HP user has, the higher the attack power. When HP is very low, attack power is 200. When HP is highest, attack power is 20.~";}
if(n==180){o="~Depit~0~100%~10~Ghost~Opponent's last move used loses 2 to 5 PP.~";}
if(n==181){o="~Poudreuse~40~100%~25~Ice~May induce opponent with FREEZE status.~";}
if(n==182){o="~Abri~0~0%~10~Normal~TM17-Takes no damage from opponent's attack. May fail if used more than once in a row.~";}
if(n==183){o="~Mach Punch~40~100%~30~Fighting~Always attacks first.~";}
if(n==184){o="~Grimace~0~90%~10~Normal~Lowers opponent's SPEED ability down two stages.~";}
if(n==185){o="~Feinte~60~0%~20~Dark~If opponent is on screen, hits without fail.~";}
if(n==186){o="~Doux Baiser~0~75%~10~Normal~Induces opponent with CONFUSION condition.~";}
if(n==187){o="~Cognobidon~0~0%~10~Normal~Raises user's ATTACK ability up very high. Will consume half of the user's maximum HP is available.~";}
if(n==188){o="~Bomb-Beurk~90~100%~10~Poison~TM36-May induce opponent with POISON status.~";}
if(n==189){o="~Coud'Boue~20~100%~10~Ground~May lower opponent's Hit Ratio ability down one stage.~";}
if(n==190){o="~Octazooka~65~85%~10~Water~May lower opponent's Hit Ratio ability down one stage.~";}
if(n==191){o="~Picots~0~0%~20~Ground~Sets spikes down. Opponent takes damage upon switch.~";}
if(n==192){o="~Elecannon~100~50%~5~Electric~May induce opponent with PARALYSIS status.~";}
if(n==193){o="~Clairvoyance~0~100%~40~Normal~After use, opponent's raised evasion will be ignored.~";}
if(n==194){o="~Prelevement du Destin~0~0%~5~Ghost~If user is knocked out by opponent's next move, then opponent is also knocked out.~";}
if(n==195){o="~Requiem~0~0%~5~Normal~All Pokémon will faint after three turns. Switching a Pokémon out of battle prevents its fainting.~";}
if(n==196){o="~Vent Glace~55~95%~15~Ice~May lower opponent's SPEED ability down one stage.~";}
if(n==197){o="~Detection~0~0%~5~Fighting~Takes no damage from opponent's attack. May fail if used more than once in a row.~";}
if(n==198){o="~Charge-Os~25~80%~10~Ground~Attacks 2-5 times. Has a 37.5% chance each of hitting 2 or 3 times and a 12.5% chance each of hitting 4 or 5 times.~";}
if(n==199){o="~Verouillage~0~100%~5~Normal~Ensures that user's next attack will hit without fail.~";}
if(n==200){o="~Colère~90~100%~15~Dragon~Attacks 2, 3 turns, then induces user with CONFUSION condition.~";}
if(n==201){o="~TempeteSable~0~0%~10~Rock~TM37-Causes sandstorm weather for five turns.~";}
if(n==202){o="~Giga-Sangsue~60~100%~5~Grass~TM19-User recovers half damage dealt.~";}
if(n==203){o="~Tenacite~0~0%~10~Normal~Ensures that opponent's next attack will leave user with at least 1 HP.~";}
if(n==204){o="~Charme~0~100%~20~Normal~Lowers opponent's ATTACK ability down two stages.~";}
if(n==205){o="~Roulade~30~90%~20~Rock~Attacks for 5 turns.~";}
if(n==206){o="~Faux-Chage~40~100%~40~Normal~Always leaves opponent with at least 1 HP.~";}
if(n==207){o="~Vantardise~0~90%~15~Normal~Raises opponent's ATTACK ability up two stages, then induces opponent with CONFUSION condition.~";}
if(n==208){o="~Lait A Boire~0~0%~10~Normal~User recovers half maximum HP.~";}
if(n==209){o="~Etincelle~65~100%~20~Electric~May induce opponent with PARALYSIS status.~";}
if(n==210){o="~Taillade~10~95%~20~Bug~Move's power becomes stonger if it hits.~";}
if(n==211){o="~Aile d'Acier~70~90%~25~Steel~TM47-May raise user's DEFENSE ability up one stage.~";}
if(n==212){o="~Regard Noir~0~100%~5~Normal~Opponent cannot escape as long as user remains in battle.~";}
if(n==213){o="~Attraction~0~100%~15~Normal~TM45-Induces opponent with ATTRACT condition.~";}
if(n==214){o="~Blabla Dodo~0~0%~10~Normal~Is user if includes with SLEEP condition, randomly uses ones of the user's moves.~";}
if(n==215){o="~Glas de Soin~0~0%~5~Normal~Party recovers from all status ailments.~";}
if(n==216){o="~Retour~1~100%~20~Normal~TM27-Power is greater when Pokémon is happy. Attack power is Tameness*10/25~";}
if(n==217){o="~Cadeau~1~90%~15~Normal~Causes damage randomly (40,80, or 120 points) or restores defender's HP by 80.~";}
if(n==218){o="~Frustration~1~100%~20~Normal~TM21-Power is greater when Pokémon is not happy. Attack power is (255-Tameness)*10/25~";}
if(n==219){o="~Rune Protect~0~0%~25~Normal~TM20-User's status cannot be altered for five turns.~";}
if(n==220){o="~Balance~0~100%~20~Normal~Evenly divides HP so that both user and opponent have half of their combined remaining HP.~";}
if(n==221){o="~Feu Sacré~100~95%~5~Fire~May induce opponent with BURN status. Can remove FREEZE status from user.~";}
if(n==222){o="~Ampleur~1~100%~30~Ground~Attack power is randomly 10, 30, 50, 70, 90, 110, or 150, based on the magnitude of the attack (4 through 20 respectively.)~";}
if(n==223){o="~Dynamopoing~100~50%~5~Fighting~May induce opponent with CONFUSION condition.~";}
if(n==224){o="~Megacorne~120~85%~10~Bug~No effect.~";}
if(n==225){o="~Dracosouffle~60~100%~20~Dragon~May induce opponent with PARALYSIS status.~";}
if(n==226){o="~Relais~0~0%~40~Normal~User switches Pokemon without losing increased stats and battle-only status conditions, such as Leech Seed.~";}
if(n==227){o="~Encore~0~100%~5~Normal~The opponent must repeat its last move for another 3-6 turns.~";}
if(n==228){o="~Poursuite~40~100%~20~Dark~If the opponent switches, double damage is dealt.~";}
if(n==229){o="~Tour Rapide~20~100%~40~Normal~User becomes free of restrictive moves, such as Wrap and Fire Spin.~";}
if(n==230){o="~Doux Parfum~0~100%~20~Normal~Lowers opponent's Evasion ability down one stage.~";}
if(n==231){o="~Queue de Fer~100~75%~15~Steel~TM23-May lower opponent's DEFENSE ability down one stage.~";}
if(n==232){o="~Griffe Acier~50~95%~35~Steel~May raise user's ATTACK ability up one stage.~";}
if(n==233){o="~Corps Perdu~70~100%~10~Fighting~Hits opponent without fail. Always goes last.~";}
if(n==234){o="~Aurore~0~0%~5~Normal~Recovers user's HP by 25%. Recovery doubles during the morning. Sunny weather increases healing and rainy weather decrease healing.";}
if(n==235){o="~Synthese~0~0%~5~Grass~Recovers user's HP by 25%. Recovery doubles during the daytime. Sunny weather increases healing and rainy weather decrease healing.~";}
if(n==236){o="~Rayon Lune~0~0%~5~Normal~Recovers user's HP by 25%. Recovery doubles during the night. Sunny weather increases healing and rainy weather decrease healing.~";}
if(n==237){o="~Puissance Cachée~1~100%~15~Normal~TM10-Power and type are dependant of the user's Individual Values.~";}
if(n==238){o="~Coupx-Croix~100~80%~5~Fighting~Has a high critical hit rate.~";}
if(n==239){o="~Ouragan~40~100%~20~Dragon~May cause opponent to FLINCH. Damage is double while opponent is using Fly.~";}
if(n==240){o="~Danse Pluie~0~0%~5~Water~TM18-Causes 'Big Rain' weather for five turns.~";}
if(n==241){o="~Zenith~0~0%~5~Fire~TM11-Causes 'Clear Skies' weather for five turns.~";}
if(n==242){o="~Machouille~80~100%~15~Dark~May lower opponent's SPECIAL DEFENSE ability down one stage.~";}
if(n==243){o="~Voile Mirroir~1~100%~20~Psychic~If hit by a special attack, deals back double the damage.~";}
if(n==244){o="~Boost~0~0%~10~Normal~The user's ability stages raise to those of the opponent.~";}
if(n==245){o="~Vitesse Extrême~80~100%~5~Normal~Always attacks first.~";}
if(n==246){o="~Pouvoir Ancien~60~100%~5~Rock~May raise all of user's abilities up one stage.~";}
if(n==247){o="~Ball'Ombre~80~100%~15~Ghost~May lower opponent's SPECIAL DEFENSE ability down one stage.~";}
if(n==248){o="~Prescience~80~90%~15~Psychic~Damage is dealt after two turns pass. There is no type affinity.~";}
if(n==249){o="~Eclate-Roc~20~100%~15~Fighting~HM06-May lower opponent's DEFENSE ability down one stage.~";}
if(n==250){o="~Siphon~15~70%~15~Water~Traps opponent for 2-5 turns. Deals 1/16 HP of damage each turn.~";}
if(n==251){o="~Baston~10~100%~10~Dark~Attacks opponent a number of times equal to your number of healthy pokemon.~";}
if(n==252){o="~Bluff~40~100%~10~Normal~When used on the first turn, the user attacks first and the opponent will FLINCH.~";}
if(n==253){o="~Brouhaha~50~100%~10~Normal~Cannot sleep for 2 to 5 turns.~";}
if(n==254){o="~Stockage~0~0%~10~Normal~Stores energy. May be used up to three times.~";}
if(n==255){o="~Relache~100~100%~10~Normal~Deals damage depending on how much energy is stored.~";}
if(n==256){o="~Avale~0~0%~10~Normal~Recovers HP depending on how much energy is stored.~";}
if(n==257){o="~Canicule~100~90%~10~Fire~May induce opponent with BURN status.~";}
if(n==258){o="~Grêle~0~0%~10~Ice~TM07-Causes hailstorm weather for five turns.~";}
if(n==259){o="~Tourmente~0~100%~15~Dark~TM41-The same move cannot be used twice in a row.~";}
if(n==260){o="~Flatterie~0~100%~15~Dark~Raises opponent's SPECIAL ATTACK ability up two stages, then induces opponent with CONFUSION condition.~";}
if(n==261){o="~Feu Follet~0~75%~15~Fire~Induces opponent with BURN status.~";}
if(n==262){o="~Souvenir~0~100%~10~Dark~User faints and opponent's abilities lower.~";}
if(n==263){o="~Facade~70~100%~20~Normal~TM42-Attack power is double if user is inflicted with a status change (i.e. POISON, PARALYZE, BURN).~";}
if(n==264){o="~Mitra-Poing~150~100%~20~Fighting~TM01-If user is hit before attacking, user will FLINCH.~";}
if(n==265){o="~Stimulant~60~100%~10~Normal~If the opponent is induced with PARALYZE status, attack power is double. Opponent recovers from PARALYZE status.~";}
if(n==266){o="~Par Ici~0~100%~20~Normal~User takes all hits from opponents' attacks. Best used in 2vs2 battles.~";}
if(n==267){o="~Force-Nature~0~95%~20~Normal~Move used depends on battle location.~";}
if(n==268){o="~Charge~0~100%~20~Electric~Stores electricity to increase the power of the next electric attack.~";}
if(n==269){o="~Provoc~0~100%~20~Dark~TM12-For two turns, non-damage-dealing moves by the opponent will fail.~";}
if(n==270){o="~Coup D'Main~0~100%~20~Normal~During a 2vs2 battle, the partner's attacks are 1.5x attack power. Best used in 2vs2 battles.~";}
if(n==271){o="~Tourmagik~0~100%~10~Psychic~User and opponent exchange held items.~";}
if(n==272){o="~Imitation~0~100%~10~Psychic~User's characteristic changes to opponent's characteristic.~";}
if(n==273){o="~Voeu~0~100%~10~Normal~Half maximum HP is recovered at the end of the next turn. Still recovers, even if user switches.~";}
if(n==274){o="~Assistance~0~100%~20~Normal~Uses a random move of a Pokémon on the belt.~";}
if(n==275){o="~Racines~0~100%~20~Grass~HP is recovered every turn. However, the user cannot switch.~";}
if(n==276){o="~Surpuissance~120~100%~5~Fighting~Lowers user's ATTACK and DEFENSE abilities each down one stage.~";}
if(n==277){o="~Reflet Magik~0~100%~15~Psychic~(The effect of any SPECIAL move will rebound and return to opponent.)~";}
if(n==278){o="~Recyclage~0~100%~10~Normal~User's disposable held item returns.~";}
if(n==279){o="~Vendetta~60~100%~10~Fighting~If the user is damaged before it attacks, the attack power is double.~";}
if(n==280){o="~Vasse Brique~75~100%~15~Fighting~TM31-The effects of Reflect and Light Screen are removed.~";}
if(n==281){o="~Baillement~0~100%~10~Normal~If the opponent remains in battle, it will be induced with SLEEP on the following turn.~";}
if(n==282){o="~Sabotage~20~100%~20~Dark~Opponent drops item for remainder of battle.~";}
if(n==283){o="~Effort~1~100%~5~Normal~Damage is equal to opponent's current HP minus user's current HP.~";}
if(n==284){o="~Eruption~150~100%~5~Fire~Power decreases as user's HP lowers.~";}
if(n==285){o="~Echange~0~100%~10~Psychic~TM48-User and opponent trade Abilities.~";}
if(n==286){o="~Possessif~0~100%~10~Psychic~Opponent cannot use any move that user knows.~";}
if(n==287){o="~Regeneration~0~100%~20~Normal~User recovers from BURN, FREEZE, or PARALYSIS status.~";}
if(n==288){o="~Rancune~0~100%~5~Ghost~If user is fainted by opponent's next move, then that move's PP drops to 0.~";}
if(n==289){o="~Saisie~0~100%~10~Dark~TM49-If the opponent uses a beneficial move, the user gets the effects of the move instead.~";}
if(n==290){o="~Force Cachée~70~100%~20~Normal~TM43-Effect depends on surroundings. In grass, effect is POISON. In tall grass, effect is SLEEP. On the ocean, ATTACK lowers one stage. Underwater, DEFENSE lowers one stage. In a pond, SPEED lowers one stage. In sand, accuracy lowers one stage. In a cave, effect is FLINCH. On rocks, effect is CONFUSION. Elsewhere, effect is PARALYZE.~";}
if(n==291){o="~Plongée~60~100%~10~Water~HM08-Attacks in two turns. The first turn, user does not take damage.~";}
if(n==292){o="~Cogne~15~100%~20~Fighting~Attacks 2-5 times. Has a 37.5% chance each of hitting 2 or 3 times and a 12.5% chance each of hitting 4 or 5 times.~";}
if(n==293){o="~Camouflage~0~100%~20~Normal~Type changes based on surroundings. On and under water, changes to Water type. In caves and on rocks, changes to Rock type. Elsewhere, changes to Normal type.~";}
if(n==294){o="~Lumiqueue~0~100%~20~Bug~Raises user's SPECIAL ATTACK ability up two stages.~";}
if(n==295){o="~Lumi-Eclat~70~100%~5~Psychic~May lower opponent's SPECIAL DEFENSE ability down one stage.~";}
if(n==296){o="~Ball'Brume~70~100%~5~Psychic~May lower opponent's SPECIAL ATTACK ability down one stage.~";}
if(n==297){o="~Danse Plume~0~100%~15~Flying~Lowers opponent's ATTACK ability down two stages.~";}
if(n==298){o="~Danse-Folle~0~100%~20~Normal~All Pokémon except user become induced with CONFUSION.~";}
if(n==299){o="~Pied Bruleur~85~90%~10~Fire~May induce opponent with BURN status. Has a high critical hit ratio.~";}
if(n==300){o="~Lance-Boue~0~100%~15~Ground~As long as user remains in battle, Electric type moves deal less damage to user and opponent.~";}
if(n==301){o="~Ball'Glace~30~90%~20~Ice~Attacks for 5 turns.~";}
if(n==302){o="~Poing Dard~60~100%~15~Grass~May cause opponent to FLINCH.~";}
if(n==303){o="~Paresse~0~100%~10~Normal~Restores half of user's maximum HP.~";}
if(n==304){o="~Megaphone~90~100%~10~Normal~No effect.~";}
if(n==305){o="~CrochetVenin~50~100%~15~Poison~May induce opponent with TOXIC status.~";}
if(n==306){o="~EclateGriffe~75~95%~10~Normal~May lower opponent's DEFENSE ability down one stage.~";}
if(n==307){o="~Deflagration~150~90%~5~Fire~Attacks in two turns. The second turn, user does not attack.~";}
if(n==308){o="~Hydroblast~150~90%~5~Water~Attacks in two turns. The second turn, user does not attack.~";}
if(n==309){o="~Poing Meteor~100~85%~10~Steel~May raise user's ATTACK ability up one stage.~";}
if(n==310){o="~Etonnement~30~100%~15~Ghost~May cause opponent to FLINCH.~";}
if(n==311){o="~Balle Meteo~50~100%~10~Normal~Attack power doubles during weather. Type changes based on weather. Becomes Fire type in 'Clear Skies'. Becomes Water type in 'Big Rain'. Becomes Ice type in hailstorm. Becomes Rock type in sandstorm.~";}
if(n==312){o="~Aromatherapie~0~0%~5~Grass~Party recovers from all status ailments.~";}
if(n==313){o="~Croco Larmes~0~100%~20~Dark~Lowers opponent's SPECIAL DEFENSE ability down two stages.~";}
if(n==314){o="~Tranch'Air~55~95%~25~Flying~Has a high critical hit rate.~";}
if(n==315){o="~Surchauffe~140~90%~5~Fire~TM50-Lowers user's SPECIAL ATTACK ability down two stages.~";}
if(n==316){o="~Flair~0~100%~40~Normal~After use, opponent's raised evasion will be ignored.~";}
if(n==317){o="~Tomberoche~50~80%~10~Rock~TM39-May lower opponent's SPEED ability down one stage.~";}
if(n==318){o="~Vent argente~60~100%~5~Bug~May raise all of user's abilities up one stage.~";}
if(n==319){o="~Strido-Son~0~85%~40~Steel~Lowers opponent's SPECIAL DEFENSE ability down two stages.~";}
if(n==320){o="~Siffl'Herbe~0~55%~15~Grass~May induce opponent with SLEEP status.~";}
if(n==321){o="~Chatouille~0~100%~20~Normal~Lowers opponent's ATTACK and DEFENSE abilities each down one stage.~";}
if(n==322){o="~Force Cosmik~0~0%~20~Psychic~Raises user's DEFENSE and SPECIAL DEFENSE abilities each up one stage.~";}
if(n==323){o="~Gicledo~150~100%~5~Water~Power decreases as user's HP lowers.~";}
if(n==324){o="~Rayon Signal~75~100%~15~Bug~May induce opponent with CONFUSION condition.~";}
if(n==325){o="~Poing Ombre~60~0%~20~Ghost~TM30-If opponent is on screen, hits without fail.~";}
if(n==326){o="~Extrasenseur~80~100%~30~Psychic~May cause opponent to FLINCH.~";}
if(n==327){o="~Stratopercut~85~90%~15~Fighting~Can hit opponent during FLY.~";}
if(n==328){o="~Tourbi-Sable~15~70%~15~Ground~Traps opponent for 2-5 turns. Deals 1/16 HP of damage each turn.~";}
if(n==329){o="~Glaciation~1~30%~5~Ice~Knocks out opponent in one hit. Accuracy increases by an amount equal to the difference between user and enemy's experience levels, then divided by 128. Accuracy will be 23.4-100%.~";}
if(n==330){o="~Ocroupi~95~85%~10~Water~May lower opponent's Hit Ratio ability down one stage.~";}
if(n==331){o="~Balle graine~10~100%~30~Grass~TM09-Attacks 2-5 times. Has a 37.5% chance each of hitting 2 or 3 times and a 12.5% chance each of hitting 4 or 5 times.~";}
if(n==332){o="~Aeropique~60~0%~20~Flying~TM40-If opponent is on screen, hits without fail.~";}
if(n==333){o="~Stalagtite~10~100%~30~Ice~Attacks 2-5 times. Has a 37.5% chance each of hitting 2 or 3 times and a 12.5% chance each of hitting 4 or 5 times.~";}
if(n==334){o="~Mur de Fer~0~0%~15~Steel~Raises user's DEFENSE ability up two stages.~";}
if(n==335){o="~Barrage~0~100%~5~Normal~Opponent cannot escape as long as user remains in battle.~";}
if(n==336){o="~Grondement~0~0%~40~Normal~Raises user's ATTACK ability up one stage.~";}
if(n==337){o="~DracoGriffe~80~100%~15~Dragon~TM02-No effect.~";}
if(n==338){o="~Vege-attack~150~90%~5~Grass~Attacks in two turns. The second turn, user does not attack.~";}
if(n==339){o="~Gonflette~0~0%~20~Fighting~TM08-Raises user's ATTACK and DEFENSE abilities each up one stage.~";}
if(n==340){o="~Rebond~85~85%~5~Flying~Attacks in two turns. The first turn, user does not take damage.~";}
if(n==341){o="~Tir de Boue~55~95%~15~Ground~May lower opponent's SPEED ability down one stage.~";}
if(n==342){o="~Queue-Poison~50~100%~25~Poison~May induce opponent with POISON status. Has a high critical hit ratio.~";}
if(n==343){o="~Impolre~40~100%~40~Normal~If user is not holding an item, user takes opponent's item.~";}
if(n==344){o="~Electacle~120~100%~15~Electric~User is dealt recoil damage equal to 1/3 damage dealt to opponent.~";}
if(n==345){o="~Feuillemagik~60~0%~20~Grass~If opponent is on screen, hits without fail.~";}
if(n==346){o="~Tourniquet~0~100%~15~Water~As long as user remains in battle, Fire type moves deal less damage to user and opponent.~";}
if(n==347){o="~Plenitude~0~0%~20~Psychic~TM04-Raises user's SPECIAL ATTACK and SPECIAL DEFENSE abilities each up one stage.~";}
if(n==348){o="~Lame Feuille~70~100%~15~Grass~Has a high critical hit rate.~";}
if(n==349){o="~Dance Draco~0~0%~20~Dragon~Raises user's ATTACK and SPEED abilities each up one stage.~";}
if(n==350){o="~Boule Rock~25~80%~10~Rock~Attacks 2-5 times. Has a 37.5% chance each of hitting 2 or 3 times and a 12.5% chance each of hitting 4 or 5 times.~";}
if(n==351){o="~Onde de Choc~60~0%~20~Electric~TM34-If opponent is on screen, hits without fail.~";}
if(n==352){o="~Vibraqua~60~100%~20~Water~TM03-May induce opponent with CONFUSION condition.~";}
if(n==353){o="~Carnareket~120~85%~5~Steel~Damage is dealt after two turns pass. There is no type affinity.~";}
if(n==354){o="~Psycho Boost~140~90%~5~Psychic~Lowers user's SPECIAL ATTACK ability down two stage.~";}
if(n==356){o="~Charge Noir~90~100%~99~Shadow~Pokemon Colosseum ONLY [Only Shadow Pokemon can use this move; self-inflicts some damage.]~";}
t=FI(o,"~",w);
return t;
}

function NMove(n){
var f=document.PokemonForm;
var i=0;
var x=0;
var y=0;
var o=" ";
i=f.Move1.options[f.Move1.selectedIndex].value;
if(n=="1" || n=="5"){
o=MoveDex(i,4);
x=Math.floor((1*o)/5);
y=(x*f.M1UPP.selectedIndex)+(1*o);
f.M1PP.value=y;
}
o=MoveDex(i,5); f.M1Ty.value=o;
o=MoveDex(i,2); f.M1Po.value=o;
o=MoveDex(i,3); f.M1Ac.value=o;
o=MoveDex(i,6); f.M1De.value=o;
i=f.Move2.options[f.Move2.selectedIndex].value;
if(n=="2" || n=="5"){
o=MoveDex(i,4);
x=Math.floor((1*o)/5);
y=(x*f.M2UPP.selectedIndex)+(1*o);
f.M2PP.value=y;
}
o=MoveDex(i,5); f.M2Ty.value=o;
o=MoveDex(i,2); f.M2Po.value=o;
o=MoveDex(i,3); f.M2Ac.value=o;
o=MoveDex(i,6); f.M2De.value=o;
i=f.Move3.options[f.Move3.selectedIndex].value;
if(n=="3" || n=="5"){
o=MoveDex(i,4);
x=Math.floor((1*o)/5);
y=(x*f.M3UPP.selectedIndex)+(1*o);
f.M3PP.value=y;
}
o=MoveDex(i,5); f.M3Ty.value=o;
o=MoveDex(i,2); f.M3Po.value=o;
o=MoveDex(i,3); f.M3Ac.value=o;
o=MoveDex(i,6); f.M3De.value=o;
i=f.Move4.options[f.Move4.selectedIndex].value;
if(n=="4" || n=="5"){
o=MoveDex(i,4);
x=Math.floor((1*o)/5);
y=(x*f.M4UPP.selectedIndex)+(1*o);
f.M4PP.value=y;
}
o=MoveDex(i,5); f.M4Ty.value=o;
o=MoveDex(i,2); f.M4Po.value=o;
o=MoveDex(i,3); f.M4Ac.value=o;
o=MoveDex(i,6); f.M4De.value=o;
return i;
}

function Copy(c){
// Version 0.00 02/05/2004 05:00 PM CST
var f = document.PokemonForm;
var C=f.Code;
if(c=="C"){C=f.Code;}
if(c=="L"){C=f.LogC;}
if(c=="D"){C=f.DNA;}
if(navigator.appName=="Microsoft Internet Explorer"){
 if(parseInt(navigator.appVersion) > 3){
 C.focus();
 C.select();
 var crange=C.createTextRange();
  copyRange=crange.execCommand("Copy");
 f.LogC.value=navigator.appName + " a copier le code correctement";
} else {
 f.LogC.value=navigator.appName + " a besoin de la version 4+";
}
} else {
 f.LogC.value=navigator.appName + " ne peut pas copier";
}
}

function Paste(c){
// Version 0.00 02/05/2004 05:00 PM CST
var f = document.PokemonForm;
var C=f.Code;
if(c=="C"){C=f.Code;}
if(c=="L"){C=f.LogC;}
if(c=="D"){C=f.DNA;}
if(navigator.appName=="Microsoft Internet Explorer"){
 if(parseInt(navigator.appVersion) > 3){
  C.value="";
  C.focus();
  document.execCommand('Paste');
 f.LogC.value=navigator.appName + " a couper correctement";
} else {
 f.LogC.value=navigator.appName + " a besoin de la vrsion 4++";
}
} else {
 f.LogC.value=navigator.appName + " ne peut pas couper";
}
}

function MakeHexC(JI) {
// Version 3.00 07/26/2002 08:00 PM CST
// Convert 1 JunkChar to HexChar "0" - "F"
//
var HO=" ";
HO="*";
if(JI=="?") { HO="0"; }
if(JI=="0") { HO="0"; }
if(JI=="1") { HO="1"; }
if(JI=="2") { HO="2"; }
if(JI=="3") { HO="3"; }
if(JI=="4") { HO="4"; }
if(JI=="5") { HO="5"; }
if(JI=="6") { HO="6"; }
if(JI=="7") { HO="7"; }
if(JI=="8") { HO="8"; }
if(JI=="9") { HO="9"; }
if(JI=="a") { HO="A"; }
if(JI=="b") { HO="B"; }
if(JI=="c") { HO="C"; }
if(JI=="d") { HO="D"; }
if(JI=="e") { HO="E"; }
if(JI=="f") { HO="F"; }
if(JI=="A") { HO="A"; }
if(JI=="B") { HO="B"; }
if(JI=="C") { HO="C"; }
if(JI=="D") { HO="D"; }
if(JI=="E") { HO="E"; }
if(JI=="F") { HO="F"; }
return HO;
}

function MakeHexW(JI) {
// Version 3.00 07/26/2002 08:00 PM CST
// Take Junk Code and Make it Hex
// init vars
// vars for input & output
var mx = "0123456789abcdef";
var HO = "ERREUR           ";
//  var for parsing HexInput
var CHF="F";
var CHE="E";
var CHD="D";
var CHC="C";
var CHB="B";
var CHA="A";
var CH9="9";
var CH8="8";
var CH7="7";
var CH6="6";
var CH5="5";
var CH4="4";
var CH3="3";
var CH2="2";
var CH1="1";
var CH0="0";
var chkspace = " ";
// Parse JunkIn and make valid hex
mx = JI;
CHF=MakeHexC(mx.substring(0,1));
CHE=MakeHexC(mx.substring(1,2));
CHD=MakeHexC(mx.substring(2,3));
CHC=MakeHexC(mx.substring(3,4));
CHB=MakeHexC(mx.substring(4,5));
CHA=MakeHexC(mx.substring(5,6));
CH9=MakeHexC(mx.substring(6,7));
CH8=MakeHexC(mx.substring(7,8));
chkspace=mx.substring(8,9);
if(chkspace==" "||chkspace==":") {
 CH7=MakeHexC(mx.substring(9,10));
 CH6=MakeHexC(mx.substring(10,11));
 CH5=MakeHexC(mx.substring(11,12));
 CH4=MakeHexC(mx.substring(12,13));
 CH3=MakeHexC(mx.substring(13,14));
 CH2=MakeHexC(mx.substring(14,15));
 CH1=MakeHexC(mx.substring(15,16));
 CH0=MakeHexC(mx.substring(16,17));
}else{
 CH7=MakeHexC(mx.substring(8,9));
 CH6=MakeHexC(mx.substring(9,10));
 CH5=MakeHexC(mx.substring(10,11));
 CH4=MakeHexC(mx.substring(11,12));
 CH3=MakeHexC(mx.substring(12,13));
 CH2=MakeHexC(mx.substring(13,14));
 CH1=MakeHexC(mx.substring(14,15));
 CH0=MakeHexC(mx.substring(15,16));
}
HO=CHF+CHE+CHD+CHC+CHB+CHA+CH9+CH8;
HO+=CH7+CH6+CH5+CH4+CH3+CH2+CH1+CH0;
return HO;
}

function DecToHex(DecNum, Group, Sign, Dollar) {
// All Function by kpdavatar@programmer.net
// Version 8.02s 09/25/2003 04:00 PM CST
// DecNum = Decimal Number In
// Group = Number of digit to show
// Sign = 0 no sign / Sign = 1 show sign / Sign = 2 invert bits
// Dollar = 0 no $ / Dollar = 1 show $
// 0xFF javascript hex value
// 4294967296 dec = 0x100000000 hex too big
// 268435456 dec = 0x10000000 hex
// 16777216 dec = 0x1000000 hex
// 1048576 dec = 0x100000 hex
// 65536 dec = 0x10000 hex
// 4096 dec = 0x1000 hex
// 256 dec = 0x100 hex
// 16 dec = 0x10 hex
// 1 dec = 0x01 hex
 var HexChars = "0123456789ABCDEF";
 var HexOut = "00000000";
 var tc = " ";
 var H7 = 0;
 var H6 = 0;
 var H5 = 0;
 var H4 = 0;
 var H3 = 0;
 var H2 = 0;
 var H1 = 0;
 var H0 = 0;
 var a = 0;
 var b = 0;
 var g = 1;
 var s = 0;
 var st = 0;
 var d = 0;
 s = 0;
 st = 0;
 if (Sign == 1) { s = 1; }
 if (Sign == 2) { s = 2; }
 d = 0;
 if (Dollar == 1) { d = 1; }
 g = 1;
 g = Group;
 if (g < 1 || g > 8) {
  g = 1;
 }
 a = DecNum;
 if (a < 0) {
  st = 1;
  if (s == 1) {
   a = a * -1;
  }
  if (s == 2) {
   a = a * -1;
   a -= 1;
  }
 }
 if (a > 0xFFFFFFFF) {
 a = 0;
 }
 b = a % 0x10000000;
 H7 = (a - b) / 0x10000000;
 a = b;
 b = a % 0x1000000;
 H6 = (a - b) / 0x1000000;
 a = b;
 b = a % 0x100000;
 H5 = (a - b) / 0x100000;
 a = b;
 b = a % 0x10000;
 H4 = (a - b) / 0x10000;
 a = b;
 b = a % 0x1000;
 H3 = (a - b) / 0x1000;
 a = b;
 b = a % 0x100;
 H2 = (a - b) / 0x100;
 a = b;
 b = a % 0x10;
 H1 = (a - b) / 0x10;
 H0 = b;
 HexOut = "";
 if (s == 1 ) {
  if (st == 1) {
   HexOut += "-";
  } else {
   HexOut += "+";
  }
 }
 if (d == 1) { HexOut += "$"; }  
 if (g > 7) {
  tc = HexChars.charAt(H7);
  if (s == 2 && st == 1) { tc = InvHex(tc);}
  HexOut += tc;
 }
 if (g > 6) {
  tc = HexChars.charAt(H6);
  if (s == 2 && st == 1) { tc = InvHex(tc);}
  HexOut += tc;
 }
 if (g > 5) {
  tc = HexChars.charAt(H5);
  if (s == 2 && st == 1) { tc = InvHex(tc);}
  HexOut += tc;
 }
 if (g > 4) {
  tc = HexChars.charAt(H4);
  if (s == 2 && st == 1) { tc = InvHex(tc);}
  HexOut += tc;
 }
 if (g > 3) {
  tc = HexChars.charAt(H3);
  if (s == 2 && st == 1) { tc = InvHex(tc);}
  HexOut += tc;
 }
 if (g > 2) {
  tc = HexChars.charAt(H2);
  if (s == 2 && st == 1) { tc = InvHex(tc);}
  HexOut += tc;
 }
 if (g > 1) {
  tc = HexChars.charAt(H1);
  if (s == 2 && st == 1) { tc = InvHex(tc);}
  HexOut += tc;
 }
 tc = HexChars.charAt(H0);
 if (s == 2 && st == 1) { tc = InvHex(tc);}
 HexOut += tc;
// output HexOut
 return HexOut;
}

function InvHex(Hex) {
// All Function by kpdavatar@programmer.net
// Version 8.02s 09/25/2003 04:00 PM CST
 var IHex = "0";
 if (Hex == "0") { IHex = "F"; }
 if (Hex == "1") { IHex = "E"; }
 if (Hex == "2") { IHex = "D"; }
 if (Hex == "3") { IHex = "C"; }
 if (Hex == "4") { IHex = "B"; }
 if (Hex == "5") { IHex = "A"; }
 if (Hex == "6") { IHex = "9"; }
 if (Hex == "7") { IHex = "8"; }
 if (Hex == "8") { IHex = "7"; }
 if (Hex == "9") { IHex = "6"; }
 if (Hex == "A") { IHex = "5"; }
 if (Hex == "B") { IHex = "4"; }
 if (Hex == "C") { IHex = "3"; }
 if (Hex == "D") { IHex = "2"; }
 if (Hex == "E") { IHex = "1"; }
 if (Hex == "F") { IHex = "0"; }
 if (Hex == "a") { IHex = "5"; }
 if (Hex == "b") { IHex = "4"; }
 if (Hex == "c") { IHex = "3"; }
 if (Hex == "d") { IHex = "2"; }
 if (Hex == "e") { IHex = "1"; }
 if (Hex == "f") { IHex = "0"; }
  return IHex;
}

function GAD(Code,what) {
// Version 9.00 07/30/2003 09:22 PM CST
// Gamboy Advance Decrypt
var x=" ";
var y=" ";
var ta=" ";
var tv=" ";
var z=" ";
var mx=" ";
// Get Code
x=Code;
mx=x+"00000000000000000";
mx=mx.substr(0,17);
// make sure input is hex
 mx = MakeHexW(mx);
ta = mx.substr(0,8);
tv = mx.substr(8,16);
y = GADecrypt(ta,tv,what);
// put Hex code out
x= y.substring(0,8);
z= y.substring(8,16);
y=x+z;
// y+=" "+what;
return y;
}

function GADecrypt(ar,vl,what) {
// Version 9.00 07/30/2003 09:22 PM CST
// Use Parasyte Info.
 var rs = "0xC6EF3720";
 var ra = "0x9E3779B9";
 var v1s0 = "0x09F4FBBD";
 var v1s1 = "0x9681884A";
 var v1s2 = "0x352027E9";
 var v1s3 = "0xF3DEE5A7";
 var v3s0 = "0x7AA9648F";
 var v3s1 = "0x7FAE6994";
 var v3s2 = "0xC0EFAAD5";
 var v3s3 = "0x42712C57";
 var loop = 0;
 var tval = 0;
 var tadd = 0;
 var shif = 0;
 var s0 = 0;
 var s1 = 0;
 var s2 = 0;
 var s3 = 0;
var r = 0;
var rsa = 0;
var t = 0;
var t2 = 0;
 var hout = "0123456789ancdef";

r = 1 * rs;
rsa = 1 * ra;
 if (what == "1") {
  s0 = 1 * v1s0;
  s1 = 1 * v1s1;
  s2 = 1 * v1s2;
  s3 = 1 * v1s3;
 } else {
  s0 = 1 * v3s0;
  s1 = 1 * v3s1;
  s2 = 1 * v3s2;
  s3 = 1 * v3s3;
 }
 tval = 1 * ("0x" + vl);
 tadd = 1 * ("0x" + ar);
l = 32;
while (l > 0) {
 t = (tadd << 4) & (1 * "0xFFFFFFFF");
 if (t < 0) { t += (1 * "0x100000000"); }
 if (t > (1 * "0xFFFFFFFF")) { t -= (1 * "0x100000000"); }
 t += s2;
 if (t < 0) { t += (1 * "0x100000000"); }
 if (t > (1 * "0xFFFFFFFF")) { t -= (1 * "0x100000000"); }
 t2 = tadd + r;
 if (t2 < 0) { t2 += (1 * "0x100000000"); }
 if (t2 > (1 * "0xFFFFFFFF")) { t2 -= (1 * "0x100000000"); }
 t ^= t2;
 if (t < 0) { t += (1 * "0x100000000"); }
 if (t > (1 * "0xFFFFFFFF")) { t -= (1 * "0x100000000"); }
 t2 = (tadd >> 5) & (1 * "0x07FFFFFF");
 if (t2 < 0) { t2 += (1 * "0x100000000"); }
 if (t2 > (1 * "0xFFFFFFFF")) { t2 -= (1 * "0x100000000"); }
 t2 += s3;
 if (t2 < 0) { t2 += (1 * "0x100000000"); }
 if (t2 > (1 * "0xFFFFFFFF")) { t2 -= (1 * "0x100000000"); }
 t ^= t2;
 if (t < 0) { t += (1 * "0x100000000"); }
 if (t > (1 * "0xFFFFFFFF")) { t -= (1 * "0x100000000"); }
 tval -= t;
 if (tval < 0) { tval += (1 * "0x100000000"); }
 if (tval > (1 * "0xFFFFFFFF")) { tval -= (1 * "0x100000000"); }
 t = (tval << 4) & (1 * "0xFFFFFFFF");
 if (t < 0) { t += (1 * "0x100000000"); }
 if (t > (1 * "0xFFFFFFFF")) { t -= (1 * "0x100000000"); }
 t += s0;
 if (t < 0) { t += (1 * "0x100000000"); }
 if (t > (1 * "0xFFFFFFFF")) { t -= (1 * "0x100000000"); }
 t2 = tval + r;
 if (t2 < 0) { t2 += (1 * "0x100000000"); }
 if (t2 > (1 * "0xFFFFFFFF")) { t2 -= (1 * "0x100000000"); }
 t ^= t2;
 if (t < 0) { t += (1 * "0x100000000"); }
 if (t > (1 * "0xFFFFFFFF")) { t -= (1 * "0x100000000"); }
 t2 = (tval >> 5) & (1 * "0x07FFFFFF");
 if (t2 < 0) { t2 += (1 * "0x100000000"); }
 if (t2 > (1 * "0xFFFFFFFF")) { t2 -= (1 * "0x100000000"); }
 t2 += s1;
 if (t2 < 0) { t2 += (1 * "0x100000000"); }
 if (t2 > (1 * "0xFFFFFFFF")) { t2 -= (1 * "0x100000000"); }
 t ^= t2;
 if (t < 0) { t += (1 * "0x100000000"); }
 if (t > (1 * "0xFFFFFFFF")) { t -= (1 * "0x100000000"); }
 tadd -= t;
 if (tadd < 0) { tadd += (1 * "0x100000000"); }
 if (tadd > (1 * "0xFFFFFFFF")) { tadd -= (1 * "0x100000000"); }
 r -= rsa;
 if (r < 0) { r += (1 * "0x100000000"); }
 if (r > (1 * "0xFFFFFFFF")) { r -= (1 * "0x100000000"); }
 l --;
}
hout = DecToHex(tadd,8,2) + DecToHex(tval,8,2);
return hout;
}

function GAE(Code,what) {
// Version 9.00 07/30/2003 09:22 PM CST
// Gamboy Advance Decrypt
var x=" ";
var y=" ";
var ta=" ";
var tv=" ";
var z=" ";
var mx=" ";
// Get Code
x=Code;
mx=x+"00000000000000000";
mx=mx.substr(0,17);
// make sure input is hex
 mx = MakeHexW(mx);
 ta = mx.substr(0,8);
 if(what=="1") { ta= "2"+ ta.substr(1,8); }
 if(what=="3") { ta= "04"+ mx.substr(1,1)+  mx.substr(3,5); }
// if(what=="3") { ta="04"+mx.substr(1,2)+ mx.substr(3,8); )
 tv = mx.substr(8,16);
 y = GAEncrypt(ta,tv,what);
// put Hex code out
x=y.substring(0,8);
z=y.substring(8,16);
y=x+" "+z;
// y+=" "+what;
return y;
}

function GAEncrypt(ar,vl,what) {
// Version 9.00 07/30/2003 09:22 PM CST
// Use Parasyte Info.
 var rs = "0x00000000";
 var ra = "0x9E3779B9";
 var v1s0 = "0x09F4FBBD";
 var v1s1 = "0x9681884A";
 var v1s2 = "0x352027E9";
 var v1s3 = "0xF3DEE5A7";
 var v3s0 = "0x7AA9648F";
 var v3s1 = "0x7FAE6994";
 var v3s2 = "0xC0EFAAD5";
 var v3s3 = "0x42712C57";
 var loop = 0;
 var tval = 0;
 var tadd = 0;
 var shif = 0;
 var s0 = 0;
 var s1 = 0;
 var s2 = 0;
 var s3 = 0;
var r = 0;
var rsa = 0;
var t = 0;
var t2 = 0;
var hout = "0123456789ancdef";

r = 1 * rs;
rsa = 1 * ra;
 if (what == "1") {
  s0 = 1 * v1s0;
  s1 = 1 * v1s1;
  s2 = 1 * v1s2;
  s3 = 1 * v1s3;
 } else {
  s0 = 1 * v3s0;
  s1 = 1 * v3s1;
  s2 = 1 * v3s2;
  s3 = 1 * v3s3;
 }
 tval = 1 * ("0x" + vl);
 tadd = 1 * ("0x" + ar);
l = 32;
while (l > 0) {
 r += rsa;
 if (r < 0) { r += (1 * "0x100000000"); }
 if (r > (1 * "0xFFFFFFFF")) { r -= (1 * "0x100000000"); }
 t = (tval << 4) & (1 * "0xFFFFFFFF");
 if (t < 0) { t += (1 * "0x100000000"); }
 if (t > (1 * "0xFFFFFFFF")) { t -= (1 * "0x100000000"); }
 t += s0;
 if (t < 0) { t += (1 * "0x100000000"); }
 if (t > (1 * "0xFFFFFFFF")) { t -= (1 * "0x100000000"); }
 t2 = tval + r;
 if (t2 < 0) { t2 += (1 * "0x100000000"); }
 if (t2 > (1 * "0xFFFFFFFF")) { t2 -= (1 * "0x100000000"); }
 t ^= t2;
 if (t < 0) { t += (1 * "0x100000000"); }
 if (t > (1 * "0xFFFFFFFF")) { t -= (1 * "0x100000000"); }
 t2 = (tval >> 5) & (1 * "0x07FFFFFF");
 if (t2 < 0) { t2 += (1 * "0x100000000"); }
 if (t2 > (1 * "0xFFFFFFFF")) { t2 -= (1 * "0x100000000"); }
 t2 += s1;
 if (t2 < 0) { t2 += (1 * "0x100000000"); }
 if (t2 > (1 * "0xFFFFFFFF")) { t2 -= (1 * "0x100000000"); }
 t ^= t2;
 if (t < 0) { t += (1 * "0x100000000"); }
 if (t > (1 * "0xFFFFFFFF")) { t -= (1 * "0x100000000"); }
 tadd += t;
 if (tadd < 0) { tadd += (1 * "0x100000000"); }
 if (tadd > (1 * "0xFFFFFFFF")) { tadd -= (1 * "0x100000000"); }
 t = (tadd << 4) & (1 * "0xFFFFFFFF");
 if (t < 0) { t += (1 * "0x100000000"); }
 if (t > (1 * "0xFFFFFFFF")) { t -= (1 * "0x100000000"); }
 t += s2;
 if (t < 0) { t += (1 * "0x100000000"); }
 if (t > (1 * "0xFFFFFFFF")) { t -= (1 * "0x100000000"); }
 t2 = tadd + r;
 if (t2 < 0) { t2 += (1 * "0x100000000"); }
 if (t2 > (1 * "0xFFFFFFFF")) { t2 -= (1 * "0x100000000"); }
 t ^= t2;
 if (t < 0) { t += (1 * "0x100000000"); }
 if (t > (1 * "0xFFFFFFFF")) { t -= (1 * "0x100000000"); }
 t2 = (tadd >> 5) & (1 * "0x07FFFFFF");
 if (t2 < 0) { t2 += (1 * "0x100000000"); }
 if (t2 > (1 * "0xFFFFFFFF")) { t2 -= (1 * "0x100000000"); }
 t2 += s3;
 if (t2 < 0) { t2 += (1 * "0x100000000"); }
 if (t2 > (1 * "0xFFFFFFFF")) { t2 -= (1 * "0x100000000"); }
 t ^= t2;
 if (t < 0) { t += (1 * "0x100000000"); }
 if (t > (1 * "0xFFFFFFFF")) { t -= (1 * "0x100000000"); }
 tval += t;
 if (tval < 0) { tval += (1 * "0x100000000"); }
 if (tval > (1 * "0xFFFFFFFF")) { tval -= (1 * "0x100000000"); }
 l --;
}
hout = DecToHex(tadd,8,2) + DecToHex(tval,8,2);
return hout;
}

function Sample(n){
var f=document.PokemonForm;
var i=0;
var j=0;
var D=f.RDNA;
var As=f.RA;
var Bs=f.RB;
var Cs=f.RC;
var Ds=f.RD;
var abcd=" ";
var tlog=" ";
tlog="";
if(-2<n && n<20){
if(n==-1){tlog="Toutes les Locations\r\n";}
for(i=0; i<20; i++){
 if(n==-1 || i==n){tlog+="location "+i+":"+D[i].value+"\r\n";}
}
}
if(n>19){
if(n==32){tlog="ABCD Structure\r\n";}
abcd=f.ABCD.value;
if(n==32){tlog+="Ordre des Sctructures:"+abcd+"\r\n";}
for(j=0;j<4;j++){
 t=abcd.substring(j,j+1);
 if(t=="A"){
if(n==32){tlog+="\r\n";}
if((19<n && n<23)||n==32){
for(i=0; i<3; i++){
 if(n==32 || i==n-20){tlog+="A Structure "+i+":"+As[i].value+"\r\n";}
}
}
 }
 if(t=="B"){
if(n==32){tlog+="\r\n";}
if(n==32 || (22<n && n<26)){
for(i=0; i<3; i++){
 if(n==32 || i==n-23){tlog+="B Structure "+i+":"+Bs[i].value+"\r\n";}
}
}
 }
 if(t=="C"){
if(n==32){tlog+="\r\n";}
if(n==32 || (25<n && n<29)){
for(i=0; i<3; i++){
 if(n==32 || i==n-26){tlog+="C Structure "+i+":"+Cs[i].value+"\r\n";}
}
}
 }
 if(t=="D"){
if(n==32){tlog+="\r\n";}
if(n==32 || (28<n && n<32)){
for(i=0; i<3; i++){
 if(n==32 || i==n-29){tlog+="D Structure "+i+":"+Ds[i].value+"\r\n";}
}
}
 }
}
if(n==32){tlog+="\r\nVérification de somme:"+f.CS.value+"\r\n";}
}
f.LogC.value=tlog;
}

function UnownID(P,W){
// Function by kpdavatar@netbroadcaster.com
// Version 0.00 02/03/2004 05:15 PM CST
var S = 0;
var U = 0;
var UC = "A";
S=Math.floor(P%4);
S+=(Math.floor(P/256)%4)*4;
S+=(Math.floor(P/65536)%4)*16;
S+=(Math.floor(P/16777216)%4)*64;
U = Math.floor(S % 28);
if(W==0){ return U; }
if(W==1){
 if(U==0){UC="A";}
 if(U==1){UC="B";}
 if(U==2){UC="C";}
 if(U==3){UC="D";}
 if(U==4){UC="E";}
 if(U==5){UC="F";}
 if(U==6){UC="G";}
 if(U==7){UC="H";}
 if(U==8){UC="I";}
 if(U==9){UC="J";}
 if(U==10){UC="K";}
 if(U==11){UC="L";}
 if(U==12){UC="M";}
 if(U==13){UC="N";}
 if(U==14){UC="O";}
 if(U==15){UC="P";}
 if(U==16){UC="Q";}
 if(U==17){UC="R";}
 if(U==18){UC="S";}
 if(U==19){UC="T";}
 if(U==20){UC="U";}
 if(U==21){UC="V";}
 if(U==22){UC="W";}
 if(U==23){UC="X";}
 if(U==24){UC="Y";}
 if(U==25){UC="Z";}
 if(U==26){UC="!";}
 if(U==27){UC="?";}
 return UC;
}
if(W==3){return S;}
}

function FillAll(){
var f=document.PokemonForm;
var P=f.Species;
var Pvalue=P.options[P.selectedIndex].value;
var U=f.Unown;
var Utext=U.options[U.selectedIndex].text;
var G=f.PGender;
var N=f.Nature;
var D=f.RDNA;
var As=f.RA;
var Bs=f.RB;
var Cs=f.RC;
var Ds=f.RD;
var BA0=" ";
var BA1=" ";
var BA2=" ";
var BB0=" ";
var BB1=" ";
var BB2=" ";
var BC0=" ";
var BC1=" ";
var BC2=" ";
var BD0=" ";
var BD1=" ";
var BD2=" ";
var tt=" ";
var ts=" ";
var tg=0;
var gt=0;
var tn=0;
var tpid=0;
var tid=0;
var xk=0;
var r=0;
var r1=0;
var S=" ";
var addr=0;
var cs=0;
var i=0;
xk = 0;
r=1*f.STID.value;
if(r<0||r>65565){r=Math.round(Math.random()*65535);}
f.STID.value=r;
r=1*f.TID.value
if(r<0||r>65565){r=Math.round(Math.random()*65535);}
f.TID.value=r;
tid=(f.STID.value*65536)+(1*f.TID.value);
if(f.RPID.checked){
if(f.Shiny.checked){
 i=0;
 gt=Gtest();
 for(i=0;i<65536;i++){
 r=Math.round(Math.random()*65535);
 xk=(r*65536)+(r^(Math.round(Math.random()*7)));
 if(xk<0){xk+=(1*"0x100000000");}
 tpid=xk^tid;
 if(tpid<0){tpid+=(1*"0x100000000");}
 tg=Math.floor(tpid%256);
 if(tg<0){tg+=256;}
 tn=Math.floor(tpid%25);
 if(tn<0){tn+=25;}
 if(tg>gt && G.selectedIndex==1 && N.selectedIndex==tn){
  if(Pvalue==201){
   if(UnownID(tpid,1)==Utext){i=65537;}
  }else{
   i=65537;
  }
 }
 if(tg<=gt && G.selectedIndex==0 && N.selectedIndex==tn){
  if(Pvalue==201){
   if(UnownID(tpid,1)==Utext){i=65537;}
  }else{
   i=65537;
  }
 }
 }
}else{
 i=0;
 gt=Gtest();
 for(i=0;i<65536;i++){
 tpid=(Math.round(Math.random()*65536)*Math.round(Math.random()*65536))+Math.round(Math.random()*65512);
 if(tpid<0){tpid+=(1*"0x100000000");}
 tn=Math.floor(tpid%25);
 if(tpid<0){tpid+=(1*"0x100000000");}
 tpid+=f.Nature.selectedIndex;
 if(tpid<0){tpid+=(1*"0x100000000");}
 tg=Math.floor(tpid%256);
 if(tg<0){tg+=256;}
 tn=Math.floor(tpid%25);
 if(tn<0){tn+=25;}
 if(tg>gt && G.selectedIndex==1 && N.selectedIndex==tn){
  if(Pvalue==201){
   if(UnownID(tpid,1)==Utext){i=65537;}
  }else{
   i=65537;
  }
 }
 if(tg<=gt && G.selectedIndex==0 && N.selectedIndex==tn){
  if(Pvalue==201){
   if(UnownID(tpid,1)==Utext){i=65537;}
  }else{
   i=65537;
  }
 }
 }
 xk=tid^tpid;
}
if(i<65538){f.PID.value="try again"; f.Code.value="try again"; return;}else{f.PID.value=tpid;}
}else{
 tpid=f.PID.value*1;
 tn=Math.floor(tpid%25);
 if(tn<0){tn+=25;}
 N.selectedIndex=tn;
 tg=Math.floor(tpid%256);
 if(tg<0){tg+=256;}
 gt=Gtest();
 if(tg>gt){tg=1;}else{tg=0;}
 G.selectedIndex==tg;
 i=Math.floor(tpid%65536);
 r=(1*f.TID.value)^i;
 i=Math.floor(tpid/65536);
 r1=(1*f.STID.value)^i;
 xk=r^r1;
 if(xk<8){f.Shiny.checked=true;}else{f.Shiny.checked=false;}
 xk=tid^tpid;
 ts=Pvalue;
 if(ts=="201"){
 r1=UnownID(tpid,0);
 U.options[r1].selected=true;
 }
}
r1=xk;
if(r1<0){r1+=1*"0x100000000";}
if(r1>(1*"0xFFFFFFFF")){r1-=1*"0x100000000";}
xk=r1;
tg=Math.floor(tpid%256);
gt=Gtest();
if(tg>gt){tg=1;}else{tg=0;}
G.selectedIndex=tg;
f.PID.value=tpid;
f.XKey.value=DecToHex(xk,8);
ts=DecToHex(tpid,8);
D[0].value=ts;
ts=DecToHex(tid,8);
D[1].value=ts;
if(f.EFlag.checked){f.PName.value="Oeuf";}
if(f.PName.value==""){f.PName.value="HACK";}
ts=StrToPoke(f.PName.value,10);
tt=ts.substr(6,2);
tt+=ts.substr(4,2);
tt+=ts.substr(2,2);
tt+=ts.substr(0,2);
D[2].value=tt;
tt=ts.substr(14,2);
tt+=ts.substr(12,2);
tt+=ts.substr(10,2);
tt+=ts.substr(8,2);
D[3].value=tt;
tt=f.PFont.value;
// 0201 Japanese
// 0202 USA
// 0203 French
// 0204 Italian
// 0205 German
// 0206
// 0207 Spanish
tt+=ts.substr(18,2);
tt+=ts.substr(16,2);
D[4].value=tt;
if(f.TName.value==""){f.TName.value="Noone";}
ts=StrToPoke(f.TName.value,7);
tt=ts.substr(6,2);
tt+=ts.substr(4,2);
tt+=ts.substr(2,2);
tt+=ts.substr(0,2);
D[5].value=tt;
r=0;
if(f.Circle.checked){r+=1;}
if(f.Square.checked){r+=2;}
if(f.Triangle.checked){r+=4;}
if(f.Heart.checked){r+=8;}
tt=DecToHex(r,2);
tt+=ts.substr(12,2);
tt+=ts.substr(10,2);
tt+=ts.substr(8,2);
D[6].value=tt;
BA0="0"+f.Held.options[f.Held.selectedIndex].value+DecToHex(Pvalue,4);
As[0].value=BA0;
cs=1*Pvalue;
r=1*("0x0"+f.Held.options[f.Held.selectedIndex].value);
cs+=r;
r=xk^(1*("0x"+BA0));
if(r<0){r+=1*"0x100000000";}
if(r>(1*"0xFFFFFFFF")){r-=1*"0x100000000";}
BA0=DecToHex(r,8);
r1=f.Exp.value;
if(r1<0){f.Exp.value=0;}
S=PokeDex(f.Species.options[f.Species.selectedIndex].value);
r=FI(S,21);
if(r1>r){r1=r;}
BA1=DecToHex(f.Exp.value,8);
As[1].value=BA1;
cs+=f.Exp.value%65536;
cs+=Math.floor(f.Exp.value/65536);
r=xk^(1*("0x"+BA1));
if(r<0){r+=1*"0x100000000";}
if(r>(1*"0xFFFFFFFF")){r-=1*"0x100000000";}
BA1=DecToHex(r,8);
r=f.M1UPP.selectedIndex*1;
if(f.Move2.selectedIndex!=0){r+=f.M2UPP.selectedIndex*4;}
if(f.Move3.selectedIndex!=0){r+=f.M3UPP.selectedIndex*16;}
if(f.Move4.selectedIndex!=0){r+=f.M4UPP.selectedIndex*64;}
r1=f.Happy.value;
if(r1<0){f.Happy.value=0;}
if(r1>255){f.Happy.value=255;}
r+=f.Happy.value*256;
As[2].value=DecToHex(r,8);
cs+=r%65536;
cs+=Math.floor(r/65536);
BA2=DecToHex(r,8);
r=xk^(1*("0x"+BA2));
if(r<0){r+=1*"0x100000000";}
if(r>(1*"0xFFFFFFFF")){r-=1*"0x100000000";}
BA2=DecToHex(r,8);
BB0=DecToHex(f.Move2.options[f.Move2.selectedIndex].value,4)+DecToHex(f.Move1.options[f.Move1.selectedIndex].value,4);
Bs[0].value=BB0;
cs+=1*(f.Move1.options[f.Move1.selectedIndex].value);
cs+=1*(f.Move2.options[f.Move2.selectedIndex].value);
r=xk^(1*("0x"+BB0));
if(r<0){r+=1*"0x100000000";}
if(r>(1*"0xFFFFFFFF")){r-=1*"0x100000000";}
BB0=DecToHex(r,8);
BB1=DecToHex(f.Move4.options[f.Move4.selectedIndex].value,4)+DecToHex(f.Move3.options[f.Move3.selectedIndex].value,4);
Bs[1].value=BB1;
cs+=1*(f.Move3.options[f.Move3.selectedIndex].value);
cs+=1*(f.Move4.options[f.Move4.selectedIndex].value);
r=xk^(1*("0x"+BB1));
if(r<0){r+=1*"0x100000000";}
if(r>(1*"0xFFFFFFFF")){r-=1*"0x100000000";}
BB1=DecToHex(r,8);
r1=f.M1PP.value;
if(r1<0){f.M1PP.value=0;}
if(r1>99){f.M1PP.value=99;}
r1=f.M2PP.value;
if(r1<0){f.M2PP.value=0;}
if(r1>99){f.M2PP.value=99;}
r1=f.M3PP.value;
if(r1<0){f.M3PP.value=0;}
if(r1>99){f.M3PP.value=99;}
r1=f.M4PP.value;
if(r1<0){f.M4PP.value=0;}
if(r1>99){f.M4PP.value=99;}
if(f.Move4.selectedIndex!=0){BB2=DecToHex(f.M4PP.value,2);}else{BB2="00";}
if(f.Move3.selectedIndex!=0){BB2+=DecToHex(f.M3PP.value,2);}else{BB2+="00";}
if(f.Move2.selectedIndex!=0){BB2+=DecToHex(f.M2PP.value,2);}else{BB2+="00";}
BB2+=DecToHex(f.M1PP.value,2);
Bs[2].value=BB2;
cs+=(1*("0x"+BB2))%65536;
cs+=Math.floor((1*("0x"+BB2))/65536);
r=xk^(1*("0x"+BB2));
if(r<0){r+=1*"0x100000000";}
if(r>(1*"0xFFFFFFFF")){r-=1*"0x100000000";}
BB2=DecToHex(r,8);
BC0=DecToHex(f.SpeEff.value,2);
BC0+=DecToHex(f.DefEff.value,2);
BC0+=DecToHex(f.AtkEff.value,2);
BC0+=DecToHex(f.HPEff.value,2);
Cs[0].value=BC0;
cs+=(1*("0x"+BC0))%65536;
cs+=Math.floor((1*("0x"+BC0))/65536);
r=xk^(1*("0x"+BC0));
if(r<0){r+=1*"0x100000000";}
if(r>(1*"0xFFFFFFFF")){r-=1*"0x100000000";}
BC0=DecToHex(r,8);
r=f.Beauty.value;
if(r<0){r=0;}
if(r>255){r=255;}
f.Beauty.value=r;
BC1=DecToHex(f.Beauty.value,2);
r=f.Cool.value;
if(r<0){r=0;}
if(r>255){r=255;}
f.Cool.value=r;
BC1+=DecToHex(f.Cool.value,2);
BC1+=DecToHex(f.SpDEff.value,2);
BC1+=DecToHex(f.SpAEff.value,2);
Cs[1].value=BC1;
cs+=(1*("0x"+BC1))%65536;
cs+=Math.floor((1*("0x"+BC1))/65536);
r=xk^(1*("0x"+BC1));
if(r<0){r+=1*"0x100000000";}
if(r>(1*"0xFFFFFFFF")){r-=1*"0x100000000";}
BC1=DecToHex(r,8);
r=f.Luster.value;
if(r<0){r=0;}
if(r>255){r=255;}
f.Luster.value=r;
BC2=DecToHex(f.Luster.value,2);
r=f.Tough.value;
if(r<0){r=0;}
if(r>255){r=255;}
f.Tough.value=r;
BC2+=DecToHex(f.Tough.value,2);
r=f.Smart.value;
if(r<0){r=0;}
if(r>255){r=255;}
f.Smart.value=r;
BC2+=DecToHex(f.Smart.value,2);
r=f.Cute.value;
if(r<0){r=0;}
if(r>255){r=255;}
f.Cute.value=r;
BC2+=DecToHex(f.Cute.value,2);
Cs[2].value=BC2;
cs+=(1*("0x"+BC2))%65536;
cs+=Math.floor((1*("0x"+BC2))/65536);
r=xk^(1*("0x"+BC2));
if(r<0){r+=1*"0x100000000";}
if(r>(1*"0xFFFFFFFF")){r-=1*"0x100000000";}
BC2=DecToHex(r,8);
r1=f.Lvl.value;
if(r1<0){f.Lvl.value=0;}
if(r1>100){f.Lvl.value=100;}
r1=parseInt(1*("0x"+f.Loc[f.Loc.selectedIndex].value),10)
r=(f.Ball.selectedIndex+1)*134217728+(f.Lvl.value)*65536+(r1)*256;
if(f.Pokerus.selectedIndex==1){r+=1;}
if(f.Pokerus.selectedIndex==2){r+=16;}
if(f.TGender.selectedIndex==1){r+=1*"0x80000000";}
r1=f.OTFlag.selectedIndex;
r+=r1*8388608;
BD0=DecToHex(r,8);
Ds[0].value=BD0;
cs+=(1*("0x"+BD0))%65536;
cs+=Math.floor((1*("0x"+BD0))/65536);
r=xk^(1*("0x"+BD0));
if(r<0){r+=1*"0x100000000";}
if(r>(1*"0xFFFFFFFF")){r-=1*"0x100000000";}
BD0=DecToHex(r,8);
r=(f.SpDDV.selectedIndex)*33554432;
r+=(f.SpADV.selectedIndex)*1048576;
r+=(f.SpeDV.selectedIndex)*32768;
r+=(f.DefDV.selectedIndex)*1024;
r+=(f.AtkDV.selectedIndex)*32;
r+=(f.HPDV.selectedIndex)*1;
if(f.EFlag.checked){r+=1073741824;}
if(f.Ability.selectedIndex==1){r+=2147483648;}
BD1=DecToHex(r,8);
Ds[1].value=BD1;
cs+=(1*("0x"+BD1))%65536;
cs+=Math.floor((1*("0x"+BD1))/65536);
r=xk^(1*("0x"+BD1));
if(r<0){r+=1*"0x100000000";}
if(r>(1*"0xFFFFFFFF")){r-=1*"0x100000000";}
BD1=DecToHex(r,8);
r=f.RCool.selectedIndex;
r+=(f.RBeauty.selectedIndex)*8;
r+=(f.RCute.selectedIndex)*64;
r+=(f.RSmart.selectedIndex)*512;
r+=(f.RTough.selectedIndex)*4096;
if(f.RChampion.checked){r+=32768;}
if(f.RB50.checked){r+=65536;}
if(f.RB100.checked){r+=131072;}
if(f.RSketch.checked){r+=262144;}
if(f.RHardWorker.checked){r+=524288;}
if(f.RS0.checked){r+=1048576;}
if(f.RS1.checked){r+=2097152;}
if(f.RS2.checked){r+=4194304;}
if(f.RS3.checked){r+=8388608;}
if(f.RS4.checked){r+=16777216;}
if(f.RS5.checked){r+=33554432;}
if(f.RS6.checked){r+=67108864;}
if(f.AltP.checked){r+=2147483648;}
BD2=DecToHex(r,8);
Ds[2].value=BD2;
cs+=(1*("0x"+BD2))%65536;
cs+=Math.floor((1*("0x"+BD2))/65536);
r=xk^(1*("0x"+BD2));
if(r<0){r+=1*"0x100000000";}
if(r>(1*"0xFFFFFFFF")){r-=1*"0x100000000";}
BD2=DecToHex(r,8);
cs=Math.floor(cs%65536);
f.CS.value=DecToHex(cs,4);
ts="0000"+DecToHex(cs,4);
D[7].value=ts;
S=SetABCD();
for (var i=0; i<4;i++){
r=i*3+8;
if(S.substr(i,1)=="A"){
D[r].value=BA0;
r+=1;
D[r].value=BA1;
r+=1;
D[r].value=BA2;
}
if(S.substr(i,1)=="B"){
D[r].value=BB0;
r+=1;
D[r].value=BB1;
r+=1;
D[r].value=BB2;
}
if(S.substr(i,1)=="C"){
D[r].value=BC0;
r+=1;
D[r].value=BC1;
r+=1;
D[r].value=BC2;
}
if(S.substr(i,1)=="D"){
D[r].value=BD0;
r+=1;
D[r].value=BD1;
r+=1;
D[r].value=BD2;
}
}
tt=SetDNA();
}

function ec(addr,dat,s,r){
var dh=" "; var dl=" "; var ah=" "; var al=" ";
var a=0;
var A0=" "; var A1=" "; var A2=" ";
var tt=" ";
tt="";
if(s==32){
if(r==0){tt=addr+":"+dat;}
if(r==1){
 al=addr.substring(1,8);
 A1="2"+al;
 tt=GAEncrypt(A1,dat,"1");
}
if(r==2){
 ah=addr.substring(1,2);
 al=addr.substring(3,8);
 A1="04"+ah+al;
 tt=GAEncrypt(A1,dat,"3");
 tt=tt.substring(0,8)+" "+tt.substring(8,16);
}
if(r==3||r==5){
 al=addr.substring(1,8);
 A1="8"+al;
 dl=dat.substring(4,8);
 tt=A1+" "+dl+"\r\n";
 a=(1*("0x"+addr))+2;
 A0=DecToHex(a,8);
 al=A0.substring(1,8);
 A1="8"+al;
 dh=dat.substring(0,4);
 tt+=A1+" "+dh;
}}
if(s==16){
if(r==0){tt=addr+":"+dat;}
if(r==1){
 al=addr.substring(1,8);
 A1="1"+al;
 A2="0000"+dat;
 tt=GAEncrypt(A1,A2,"1");
}
if(r==2){
 ah=addr.substring(1,2);
 al=addr.substring(3,8);
 A1="02"+ah+al;
 A2="0000"+dat;
 tt=GAEncrypt(A1,A2,"3");
 tt=tt.substring(0,8)+" "+tt.substring(8,16);
}
if(r==3||r==5){
 al=addr.substring(1,8);
 A1="8"+al;
 tt=A1+" "+dat;
}}
if(s==8){
if(r==0){tt=addr+":"+dat;}
if(r==1){
 al=addr.substring(1,8);
 A1="0"+al;
 A2="000000"+dat;
 tt=GAEncrypt(A1,A2,"1");
}
if(r==2){
 ah=addr.substring(1,2);
 al=addr.substring(3,8);
 A1="00"+ah+al;
 A2="000000"+dat;
 tt=GAEncrypt(A1,A2,"3");
 tt=tt.substring(0,8)+" "+tt.substring(8,16);
}
if(r==3||r==5){
 al=addr.substring(1,8);
 A1="3"+al;
 tt=A1+" 00"+dat;
}}
return tt;
}

function codeout(n){
var d=document;
var f=d.PokemonForm;
var addr=0;
var tt=" ";
var t=" ";
var r=0;
var L="\r\n";
var D=f.RDNA;
var tcode="";
var tlog=" ";
var i=0;
var i2=0;
var BA0=" ";
var BA1=" ";
var BA2=" ";
t=FillAll();
if(n==-1){
 r=0;
 for (i=0; i<6; i++){
  if(f.RCode[i].checked){
   r=i;
   i=7;
  }
 }
}else{
r=n;
}
f.LogC.value="Code";
tlog="Code Chargé\r\n";
tCode="";
t="";
if(r<4||r==5){
i=f.Game.selectedIndex;
if(i==0){t="(U/UK) Ruby"+L;}
if(i==1){t="(U/UK) Sapphire"+L;}
if(i==2){t="(F) Rubis"+L;}
if(i==3){t="(F) Saphir"+L;}
if(i==4){t="(G) Rubin"+L;}
if(i==5){t="(G) Saphir"+L;}
if(i==6){t="(S) Rubi"+L;}
if(i==7){t="(S) Zafiro"+L;}
if(i==8){t="(I) Rubino"+L;}
if(i==9){t="(I) Zaffiro"+L;}
if(i==10){t="(E) Ruby"+L;}
if(i==11){t="(E) Sapphire"+L;}
if(i==12){t="(J) Ruby"+L;}
if(i==13){t="(J) Sapphire"+L;}
if(i==14){t="(J) Fire Red"+L;}
if(i==15){t="(J) Leaf Green"+L;}
if(i==16){t="(U) Red Fire v1.0"+L;}
if(i==17){t="(U) Green Leaf v1.0"+L;}
if(i==18){t="(J) Emerald"+L;}
if(i==19){t="(U) Red Fire v1.1"+L;}
if(i==20){t="(U) Green Leaf v1.1"+L;}
if(i==21){t="(S) Rojo Fuego"+L;}
if(i==22){t="(S) Verde Hoja"+L;}
if(i==23){t="(G) Blattgrune Edition"+L;}
if(i==24){t="(G) Feuerrote Edition"+L;}
if(i==25){t="(F) Rouge Feu"+L;}
if(i==26){t="(F) Vert Feuille"+L;}
if(i==27){t="(I) Versione Rosso Fuoco"+L;}
if(i==28){t="(I) Versione Verde Foglia"+L;}
if(i==29){t="(U/FR) Emeraude"+L;}
if(f.MCode.checked){
if(i>13 && i<16 && r==0){t+="Anti DMA(must be on) GameShark v1"+L+"0D6333465BE368CB"+L;}
if(i>15 && i<18 && r==0){t+="Anti DMA(must be on) GameShark v1"+L+"20AAA133853F98EB"+L;}
if(i==18 && r==0){t+="Anti DMA(must be on) GameShark v1"+L+"8182D513D9CC1064"+L;}
if(i>18 && i<21 && r==0){t+="Anti DMA(must be on) GameShark v1"+L+"08CEC818DE923E83"+L;}
if(i>20 && i<23 && r==0){t+="Anti DMA(must be on) GameShark v1"+L+"C16A4EA4CA210A5C"+L;}
if(i>22 && i<25 && r==0){t+="Anti DMA(must be on) GameShark v1"+L+"5A8E401F123286BB"+L;}
if(i>24 && i<27 && r==0){t+="Anti DMA(must be on) GameShark v1"+L+"7744C4A7176BB522"+L;}
if(i>26 && i<29 && r==0){t+="Anti DMA(must be on) GameShark v1"+L+"B2C57874904ABEBE"+L;}
if(i==29 && r==0){t+="Anti DMA(must be on) GameShark v1"+L+"E1F2DD6004576E50"+L;}
if(r>0){t+="(m)"+L;}
if(i==0 && r==1){t+="9E6AC862823AB7A8"+L+"46B7D9E4A709E9E1"+L+L;}
if(i==1 && r==1){t+="9E6AC862823AB7A8"+L+"8365F8FA817CF3E9"+L+L;}
if(i==2 && r==1){t+="683C7E7A0102EC9F"+L+"DF9D42B90AAFD621"+L+L;}
if(i==3 && r==1){t+="683C7E7A0102EC9F"+L+"1CA30DA43F2C9EED"+L+L;}
if(i==4 && r==1){t+="9CC58A9036224243"+L+"9ECADB3BFBDD4712"+L+L;}
if(i==5 && r==1){t+="9CC58A9036224243"+L+"67DCACBE05C3BA0E"+L+L;}
if(i==6 && r==1){t+="E63DA7BD161720E3"+L+"9EE2F297F924AEF6"+L+L;}
if(i==7 && r==1){t+="E63DA7BD161720E3"+L+"2A0954429AF614DC"+L+L;}
if(i==8 && r==1){t+="9CC58A9036224243"+L+"B571CB0DFF0D0CA4"+L+L;}
if(i==9 && r==1){t+="9CC58A9036224243"+L+"2DB32A9BB94B6340"+L+L;}
if(i==10 && r==1){t+="FBC85C6B793937A1"+L+"46B7D9E4A709E9E1"+L+L;}
if(i==11 && r==1){t+="FBC85C6B793937A1"+L+"8365F8FA817CF3E9"+L+L;}
if(i==12 && r==1){t+="6E93895CC2679628"+L+"02BD3075C9E2B4CE"+L+L;}
if(i==13 && r==1){t+="6E93895CC2679628"+L+"03514D3E7157DA35"+L+L;}
if(i==14 && r==1){t+="78A0B2AE45CB4E65"+L+"423E91A1A46AEFBA"+L;
t+="Anti DMA (Must Be On)"+L+"0D6333465BE368CB"+L+L;}
if(i==15 && r==1){t+="78A0B2AE45CB4E65"+L+"DA3DFA98CB6A3E6E"+L;
t+="Anti DMA (Must Be On)"+L+"0D6333465BE368CB"+L+L;}
if(i==16 && r==1){t+="78A0B2AE45CB4E65"+L+"3C1BD432E365EC14"+L;
t+="Anti DMA (Must Be On)"+L+"20AAA133853F98EB"+L+L;}
if(i==17 && r==1){t+="78A0B2AE45CB4E65"+L+"4D2BB04F34651E54"+L;
t+="Anti DMA (Must Be On)"+L+"20AAA133853F98EB"+L+L;}
if(i==18 && r==1){t+="CADD22F0ADF77526"+L+"6626FE4B34EB0C5C"+L;
t+="Anti DMA (Must Be On)"+L+"8182D513D9CC1064"+L+L;}
if(i==19 && r==1){t+="388E455EF1D8A012"+L+"3C1BD432E365EC14"+L;
t+="Anti DMA (Must Be On)"+L+"08CEC818DE923E83"+L+L;}
if(i==20 && r==1){t+="388E455EF1D8A012"+L+"4D2BB04F34651E54"+L;
t+="Anti DMA (Must Be On)"+L+"08CEC818DE923E83"+L+L;}
if(i==21 && r==1){t+="CADD22F0ADF77526"+L+"DB1CCA88E093B834"+L;
t+="Anti DMA (Must Be On)"+L+"C16A4EA4CA210A5C"+L+L;}
if(i==22 && r==1){t+="CADD22F0ADF77526"+L+"D6BB988DE3709329"+L;
t+="Anti DMA (Must Be On)"+L+"C16A4EA4CA210A5C"+L+L;}
if(i==23 && r==1){t+="A6E15278DFA09AB7"+L+"21631F6FD70B7220"+L;
t+="Anti DMA (Must Be On)"+L+"5A8E401F123286BB"+L+L;}
if(i==24 && r==1){t+="A6E15278DFA09AB7"+L+"EC29BAC6E7EB2C8B"+L;
t+="Anti DMA (Must Be On)"+L+"5A8E401F123286BB"+L+L;}
if(i==25 && r==1){t+="CADD22F0ADF77526"+L+"B0B22CF03865C3DE"+L;
t+="Anti DMA (Must Be On)"+L+"7744C4A7176BB522"+L+L;}
if(i==26 && r==1){t+="CADD22F0ADF77526"+L+"A3BA42C2EB1050DF"+L;
t+="Anti DMA (Must Be On)"+L+"7744C4A7176BB522"+L+L;}
if(i==27 && r==1){t+="A6E15278DFA09AB7"+L+"96A8EC170D4714B6"+L;
t+="Anti DMA (Must Be On)"+L+"B2C57874904ABEBE"+L+L;}
if(i==28 && r==1){t+="A6E15278DFA09AB7"+L+"DA661FCD9D61C27D"+L;
t+="Anti DMA (Must Be On)"+L+"B2C57874904ABEBE"+L+L;}
if(i==29 && r==1){t+="78A0B2AE45CB4E65"+L+"3C1BD432E365EC14"+L;
t+="Anti DMA (Must Be On)"+L+"E1F2DD6004576E50"+L+L;}
if(i==0 && r==2){t+="DE00AAFD 2EBD05D0"+L+"530823D9 16558191"+L+L;}
if(i==1 && r==2){t+="DE00AAFD 2EBD05D0"+L+"B4564EFE 23F44BF2"+L+L;}
if(i==2 && r==2){t+="F57C7BCB ADC632B9"+L+"90A6E9C3 2D8D03E3"+L+L;}
if(i==3 && r==2){t+="F57C7BCB ADC632B9"+L+"A43FB15C 1E8ECF5D"+L+L;}
if(i==4 && r==2){t+="5E263E14 AD8EF97D"+L+"851B05E0 594B5D88"+L+L;}
if(i==5 && r==2){t+="5E263E14 AD8EF97D"+L+"41C1BF4B 17EE5233"+L+L;}
if(i==6 && r==2){t+="33E6A427 056936FC"+L+"E87BA897 4FFD3634"+L+L;}
if(i==7 && r==2){t+="33E6A427 056936FC"+L+"B02EF1DB D06782F2"+L+L;}
if(i==8 && r==2){t+="5E263E14 AD8EF97D"+L+"93A1C658 8DD5F1D0"+L+L;}
if(i==9 && r==2){t+="5E263E14 AD8EF97D"+L+"F5288E7B 33220035"+L+L;}
if(i==10 && r==2){t+="8CF9C3C8 FD548197"+L+"530823D9 16558191"+L+L;}
if(i==11 && r==2){t+="8CF9C3C8 FD548197"+L+"B4564EFE 23F44BF2"+L+L;}
if(i==12 && r==2){t+="CD361343 4CF2A2BF"+L+"1660CD84 4D5251F4"+L+L;}
if(i==13 && r==2){t+="CD361343 4CF2A2BF"+L+"65C7640E 2099B840"+L+L;}
if(i==14 && r==2){t+="72BC6DFB E9CA5465"+L+"F0826040 FE465C57"+L;
t+="Anti DMA (Must Be On)"+L+"80C2CE72 6E8398D4"+L;
t+="78DA95DF 44018CB4"+L+L;}
if(i==15 && r==2){t+="72BC6DFB E9CA5465"+L+"2FD2DBC6 552BC912"+L;
t+="Anti DMA (Must Be On)"+L+"80C2CE72 6E8398D4"+L;
t+="78DA95DF 44018CB4"+L+L;}
if(i==16 && r==2){t+="72BC6DFB E9CA5465"+L+"A47FB2DC 1AF3CA86"+L;
t+="Anti DMA (Must Be On)"+L+"8D671FD9 6F6BEFF2"+L;
t+="78DA95DF 44018CB4"+L+L;}
if(i==17 && r==2){t+="72BC6DFB E9CA5465"+L+"56671F3A 6F4F4D6B"+L;
t+="Anti DMA (Must Be On)"+L+"8D671FD9 6F6BEFF2"+L;
t+="78DA95DF 44018CB4"+L+L;}
if(i==18 && r==2){t+="D8BAE4D9 4864DCE5"+L+"0CD39E3A BD6E41B1"+L;
t+="Anti DMA (Must Be On)"+L+"6ED6DA14 686DF10E"+L;
t+="1C7B3231 B494738C"+L+L;}
if(i==19 && r==2){t+="E6A003D6 8110DDD5"+L+"A47FB2DC 1AF3CA86"+L;
t+="Anti DMA (Must Be On)"+L+"24C35E88 037C3033"+L;
t+="78DA95DF 44018CB4"+L+L;}
if(i==20 && r==2){t+="E6A003D6 8110DDD5"+L+"56671F3A 6F4F4D6B"+L;
t+="Anti DMA (Must Be On)"+L+"24C35E88 037C3033"+L;
t+="78DA95DF 44018CB4"+L+L;}
if(i==21 && r==2){t+="D8BAE4D9 4864DCE5"+L+"4879A617 AE7683D9"+L;
t+="Anti DMA (Must Be On)"+L+"61181D0E ABC43CBE"+L;
t+="78DA95DF 44018CB4"+L+L;}
if(i==22 && r==2){t+="D8BAE4D9 4864DCE5"+L+"CB89E5ED 0ADBAF91"+L;
t+="Anti DMA (Must Be On)"+L+"61181D0E ABC43CBE"+L;
t+="78DA95DF 44018CB4"+L+L;}
if(i==23 && r==2){t+="DFC87987 BBA21C13"+L+"66A64C7D C1365507"+L;
t+="Anti DMA (Must Be On)"+L+"A269812A 7C8BB4D9"+L;
t+="78DA95DF 44018CB4"+L+L;}
if(i==24 && r==2){t+="DFC87987 BBA21C13"+L+"CEBF8DCD FD0A2E01"+L;
t+="Anti DMA (Must Be On)"+L+"A269812A 7C8BB4D9"+L;
t+="78DA95DF 44018CB4"+L+L;}
if(i==25 && r==2){t+="D8BAE4D9 4864DCE5"+L+"0B40BD4C 6F70EA2C"+L;
t+="Anti DMA (Must Be On)"+L+"115D14A2 58B9B5BF"+L;
t+="78DA95DF 44018CB4"+L+L;}
if(i==26 && r==2){t+="D8BAE4D9 4864DCE5"+L+"FB41D9B3 3A1BF27D"+L;
t+="Anti DMA (Must Be On)"+L+"115D14A2 58B9B5BF"+L;
t+="78DA95DF 44018CB4"+L+L;}
if(i==27 && r==2){t+="DFC87987 BBA21C13"+L+"8378FDD4 5ABC5853"+L;
t+="Anti DMA (Must Be On)"+L+"1C83801E D2A043BF"+L;
t+="78DA95DF 44018CB4"+L+L;}
if(i==28 && r==2){t+="DFC87987 BBA21C13"+L+"518E0AB2 E182C852"+L;
t+="Anti DMA (Must Be On)"+L+"1C83801E D2A043BF"+L;
t+="78DA95DF 44018CB4"+L+L;}
if(i==29 && r==2){t+="D8BAE4D9 4864DCE5"+L+"A86CDBA5 19BA49B3"+L;
t+="Anti DMA (Must Be On)"+L+"B2809E31 3CEF5320"+L;
t+="1C7B3231 B494738C"+L+L;
t+="(m) FR + Anti DMA"+L;
t+="D8BAE4d9 4864DCE5"+L;
t+="A7308156 808311D9"+L;
t+="A57E2EdE A5AFF3E4"+L;
t+="1C7B3231 B494738C"+L+L;}
if(i==0 && (r==3 || r==5)){t+="0000B138 000A"+L+"1000042C 0007"+L+L;}
if(i==1 && (r==3 || r==5)){t+="000056D0 000A"+L+"1000042C 0007"+L+L;}
if(i==2 && (r==3 || r==5)){t+="0000ABFA 000A"+L+"10000564 0007"+L+L;}
if(i==3 && (r==3 || r==5)){t+="0000F97B 000A"+L+"10000564 0007"+L+L;}
if(i==4 && (r==3 || r==5)){t+="00000A78 000A"+L+"10000564 0007"+L+L;}
if(i==5 && (r==3 || r==5)){t+="0000E1F8 000A"+L+"10000564 0007"+L+L;}
if(i==6 && (r==3 || r==5)){t+="000045A1 000A"+L+"1000055C 0007"+L+L;}
if(i==7 && (r==3 || r==5)){t+="00001E2C 000A"+L+"1000055C 0007"+L+L;}
if(i==8 && (r==3 || r==5)){t+="00000018 000A"+L+"1000055C 0007"+L+L;}
if(i==9 && (r==3 || r==5)){t+="00005D09 000A"+L+"1000055C 0007"+L+L;}
if(i==10 && (r==3 || r==5)){t+="00007d44 000A"+L+"1000042C 0007"+L+L;}
if(i==11 && (r==3 || r==5)){t+="00000b86 000A"+L+"1000042C 0007"+L+L;}
if(i==12 && (r==3 || r==5)){t+="00004798 000A"+L+"10000434 0007"+L+L;}
if(i==13 && (r==3 || r==5)){t+="00002B1F 000A"+L+"10000434 0007"+L+L;}
if(i==14 && (r==3 || r==5)){t+="000077CA 000A"+L+"1004448C 0007"+L+"83005040 61A1"+L+"83005042 0A35"+L+L;}
if(i==15 && (r==3 || r==5)){t+="0000BE99 000A"+L+"1004448C 0007"+L+"83005040 61A1"+L+"83005042 0A35"+L+L;}
if(i==16 && (r==3 || r==5)){t+="0000295F 000A"+L+"10044EC8 0007"+L+"83005000 61A1"+L+"83005002 0A35"+L+L;}
if(i==17 && (r==3 || r==5)){t+="000038DA 000A"+L+"10044EC8 0007"+L+"83005000 61A1"+L+"83005002 0A35"+L+L;}
if(i==18 && (r==3 || r==5)){t+="0000961F 000A"+L+"1006F050 0007"+L+"83005ae0 61A1"+L+"83005ae2 0A35"+L+L;}
if(i==19 && (r==3 || r==5)){t+="0000???? 000A"+L+"10044EDC 0007"+L+"83005000 61A1"+L+"83005002 0A35"+L+L;}
if(i==20 && (r==3 || r==5)){t+="0000???? 000A"+L+"10044EDC 0007"+L+"83005000 61A1"+L+"83005002 0A35"+L+L;}
if(i==21 && (r==3 || r==5)){t+="00002937 000A"+L+"10044EA0 0007"+L+"83004F50 61A1"+L+"83004F52 0A35"+L+L;}
if(i==22 && (r==3 || r==5)){t+="000048B2 000A"+L+"10044EA0 0007"+L+"83004F50 61A1"+L+"83004F52 0A35"+L+L;}
if(i==23 && (r==3 || r==5)){t+="0000???? 000A"+L+"10044DCC 0007"+L+"83004F50 61A1"+L+"83004F52 0A35"+L+L;}
if(i==24 && (r==3 || r==5)){t+="0000???? 000A"+L+"10044DCC 0007"+L+"83004F50 61A1"+L+"83004F52 0A35"+L+L;}
if(i==25 && (r==3 || r==5)){t+="0000???? 000A"+L+"10044E8C 0007"+L+"83004F50 61A1"+L+"83004F52 0A35"+L+L;}
if(i==26 && (r==3 || r==5)){t+="0000???? 000A"+L+"10044E8C 0007"+L+"83004F50 61A1"+L+"83004F52 0A35"+L+L;}
if(i==27 && (r==3 || r==5)){t+="0000???? 000A"+L+"10044DB8 0007"+L+"83004F50 61A1"+L+"83004F52 0A35"+L+L;}
if(i==28 && (r==3 || r==5)){t+="000045A6 000A"+L+"10044DB8 0007"+L+"83004F50 61A1"+L+"83004F52 0A35"+L+L;}
if(i==29 && (r==3 || r==5)){t+="00006FA7 000A"+L+"1006F5CC 0007"+L+"83005D80 61A6"+L+"83005D82 0A35"+L+"(conseillé de prendre aussi celui sur la page des codes de pokasmax.ifrance.com/codes.php"+L;}
tcode+=t;
}}
if(r<4||r==5){
if(f.CTN.checked){
tcode+="Code changement du nom du dresseur dans le jeu: "+f.TName.value+"\r\n";
if(f.Game.selectedIndex<12){BA1="02024EA4";}
if(f.Game.selectedIndex>11&&f.Game.selectedIndex<14){BA1="02024C04";}
if(f.Game.selectedIndex>13&&f.Game.selectedIndex<16){BA1="020244E8";}
if(f.Game.selectedIndex>15&&f.Game.selectedIndex<18){BA1="02024588";}
if(f.Game.selectedIndex==18){BA1="020246F8";}
if(f.Game.selectedIndex>18&&f.Game.selectedIndex<29){BA1="02024588";}
if(f.Game.selectedIndex==29){BA1="02024A54";}
BA2=D[5].value;
tt=ec(BA1,BA2,32,r);
tcode+=tt+"\r\n";
if(f.Game.selectedIndex<12){BA1="02024EA8";}
if(f.Game.selectedIndex>11&&f.Game.selectedIndex<14){BA1="02024C08";}
if(f.Game.selectedIndex>13&&f.Game.selectedIndex<16){BA1="020244EC";}
if(f.Game.selectedIndex>15&&f.Game.selectedIndex<18){BA1="0202458C";}
if(f.Game.selectedIndex==18){BA1="020246FC";}
if(f.Game.selectedIndex>18&&f.Game.selectedIndex<29){BA1="0202458C";}
if(f.Game.selectedIndex==29){BA1="02024A58";}
BA2=D[6].value;
BA2="FF"+BA2.substring(2,8);
tt=ec(BA1,BA2,32,r);
tcode+=tt+"\r\n";
}
if(f.CTG.checked){
BA0="Garcon";
if(f.TGender.selectedIndex==1){BA0="Fille";}
tcode+="\r\nCode changement du sexe du dresseur dans le jeu: "+BA0+"\r\n";
if(f.Game.selectedIndex<12){BA1="02024EAC";}
if(f.Game.selectedIndex>11&&f.Game.selectedIndex<14){BA1="02024C0C";}
if(f.Game.selectedIndex>13&&f.Game.selectedIndex<16){BA1="020244F0";}
if(f.Game.selectedIndex>15&&f.Game.selectedIndex<18){BA1="02024590";}
if(f.Game.selectedIndex==18){BA1="02024700";}
if(f.Game.selectedIndex>18&&f.Game.selectedIndex<29){BA1="02024590";}
if(f.Game.selectedIndex==29){BA1="02024A5C";}
BA2=DecToHex(f.TGender.selectedIndex,2);
tt=ec(BA1,BA2,8,r);
tcode+=tt+"\r\n";
}
if(f.CTID.checked){
tcode+="\r\nCode changement ID du dresseur dans le jeu: "+f.TID.value+"\r\n";
if(f.Game.selectedIndex<12){BA1="02024EAE";}
if(f.Game.selectedIndex>11&&f.Game.selectedIndex<14){BA1="02024C0E";}
if(f.Game.selectedIndex>13&&f.Game.selectedIndex<16){BA1="020244F2";}
if(f.Game.selectedIndex>15&&f.Game.selectedIndex<18){BA1="02024592";}
if(f.Game.selectedIndex==18){BA1="02024702";}
if(f.Game.selectedIndex>18&&f.Game.selectedIndex<29){BA1="02024592";}
if(f.Game.selectedIndex==29){BA1="02024A5E";}
BA2=D[1].value.substring(4,8);
tt=ec(BA1,BA2,16,r);
tcode+=tt+"\r\n";
}
if(f.CTSID.checked){
tcode+="\r\nCode changement ID Secret du dresseur dans le jeu: "+f.STID.value+"\r\n";
if(f.Game.selectedIndex<12){BA1="02024EB0";}
if(f.Game.selectedIndex>11&&f.Game.selectedIndex<14){BA1="02024C10";}
if(f.Game.selectedIndex>13&&f.Game.selectedIndex<16){BA1="020244F4";}
if(f.Game.selectedIndex>15&&f.Game.selectedIndex<18){BA1="02024594";}
if(f.Game.selectedIndex==18){BA1="02024704";}
if(f.Game.selectedIndex>18&&f.Game.selectedIndex<29){BA1="02024594";}
if(f.Game.selectedIndex==29){BA1="02024A60";}
BA2=D[1].value.substring(0,4);
tt=ec(BA1,BA2,16,r);
tcode+=tt+"\r\n";
}
if(f.COPN.checked){
tcode+="\r\nCode du changement de nom pkmn: "+f.PName.value+"\r\n";
tcode+="Boite:"+(f.Box.selectedIndex+1)+" Slot:"+(f.Spot.selectedIndex+1)+"\r\n";
if(f.Game.selectedIndex<12){addr=(1*"0x020300A4")+(f.Box.selectedIndex)*2400+(f.Spot.selectedIndex)*80;}
if(f.Game.selectedIndex>11&&f.Game.selectedIndex<14){addr=(1*"0x0202FDC0")+(f.Box.selectedIndex)*2400+(f.Spot.selectedIndex)*80;}
if(f.Game.selectedIndex>13&&f.Game.selectedIndex<16){addr=(1*"0x02029250")+(f.Box.selectedIndex)*2400+(f.Spot.selectedIndex)*80;}
if(f.Game.selectedIndex>15&&f.Game.selectedIndex<18){addr=(1*"0x02029318")+(f.Box.selectedIndex)*2400+(f.Spot.selectedIndex)*80;}
if(f.Game.selectedIndex==18){addr=(1*"0x020294B0")+(f.Box.selectedIndex)*2400+(f.Spot.selectedIndex)*80;}
if(f.Game.selectedIndex>18&&f.Game.selectedIndex<29){addr=(1*"0x02029318")+(f.Box.selectedIndex)*2400+(f.Spot.selectedIndex)*80;}
if(f.Game.selectedIndex==29){addr=(1*"0x0202980C")+(f.Box.selectedIndex)*2400+(f.Spot.selectedIndex)*80;}
addr+=8;
BA1=DecToHex(addr,8);
BA2=D[2].value;
tt=ec(BA1,BA2,32,r);
tcode+=tt+"\r\n";
addr+=4;
BA1=DecToHex(addr,8);
BA2=D[3].value;
tt=ec(BA1,BA2,32,r);
tcode+=tt+"\r\n";
addr+=4;
BA1=DecToHex(addr,8);
BA2=D[4].value.substring(4,8);
tt=ec(BA1,BA2,16,r);
tcode+=tt+"\r\n";
}
if(f.FCo.checked){
tcode+="Code pour changer la Police:"+f.PFont.value+"\r\n";
tcode+="Boite:"+(f.Box.selectedIndex+1)+" Slot:"+(f.Spot.selectedIndex+1)+"\r\n";
if(f.Game.selectedIndex<12){addr=(1*"0x020300A4")+(f.Box.selectedIndex)*2400+(f.Spot.selectedIndex)*80;}
if(f.Game.selectedIndex>11&&f.Game.selectedIndex<14){addr=(1*"0x0202FDC0")+(f.Box.selectedIndex)*2400+(f.Spot.selectedIndex)*80;}
if(f.Game.selectedIndex>13&&f.Game.selectedIndex<16){addr=(1*"0x02029250")+(f.Box.selectedIndex)*2400+(f.Spot.selectedIndex)*80;}
if(f.Game.selectedIndex>15&&f.Game.selectedIndex<18){addr=(1*"0x02029318")+(f.Box.selectedIndex)*2400+(f.Spot.selectedIndex)*80;}
if(f.Game.selectedIndex==18){addr=(1*"0x020294B0")+(f.Box.selectedIndex)*2400+(f.Spot.selectedIndex)*80;}
if(f.Game.selectedIndex>18&&f.Game.selectedIndex<29){addr=(1*"0x02029318")+(f.Box.selectedIndex)*2400+(f.Spot.selectedIndex)*80;}
if(f.Game.selectedIndex==29){addr=(1*"0x0202980C")+(f.Box.selectedIndex)*2400+(f.Spot.selectedIndex)*80;}
addr+=18;
BA1=DecToHex(addr,8);
BA2=f.PFont.value;
tt=ec(BA1,BA2,16,r);
tcode+=tt+"\r\n";
}
if(f.MIcode.checked&&(f.Game.selectedIndex<14||f.Game.selectedIndex==18||f.Game.selectedIndex==29)){
tcode+="\r\nCode de l'ile Mirage pour ce Pokémon:\r\n";
if(f.Game.selectedIndex<12){BA1="02026ABC";}
if(f.Game.selectedIndex>11&&f.Game.selectedIndex<14){BA1="0202681C";}
if(f.Game.selectedIndex==18){BA1="02026A88";}
if(f.Game.selectedIndex==29){BA1="02026DE4";}
BA2=D[0].value.substring(4,8);
tt=ec(BA1,BA2,16,r);
tcode+=tt+"\r\n";
}
tlog+="Boite:"+(f.Box.selectedIndex+1)+" Slot:"+(f.Spot.selectedIndex+1)+"\r\n";
if(f.Game.selectedIndex<12){addr=(1*"0x020300A4")+(f.Box.selectedIndex)*2400+(f.Spot.selectedIndex)*80;}
if(f.Game.selectedIndex>11&&f.Game.selectedIndex<14){addr=(1*"0x0202FDC0")+(f.Box.selectedIndex)*2400+(f.Spot.selectedIndex)*80;}
if(f.Game.selectedIndex>13&&f.Game.selectedIndex<16){addr=(1*"0x02029250")+(f.Box.selectedIndex)*2400+(f.Spot.selectedIndex)*80;}
if(f.Game.selectedIndex>15&&f.Game.selectedIndex<18){addr=(1*"0x02029318")+(f.Box.selectedIndex)*2400+(f.Spot.selectedIndex)*80;}
if(f.Game.selectedIndex==18){addr=(1*"0x020294B0")+(f.Box.selectedIndex)*2400+(f.Spot.selectedIndex)*80;}
if(f.Game.selectedIndex>18&&f.Game.selectedIndex<29){addr=(1*"0x02029318")+(f.Box.selectedIndex)*2400+(f.Spot.selectedIndex)*80;}
if(f.Game.selectedIndex==29){addr=(1*"0x0202980C")+(f.Box.selectedIndex)*2400+(f.Spot.selectedIndex)*80;}
tlog+="Addresse:"+DecToHex(addr,8)+"\r\n";
i=f.Species.options[f.Species.selectedIndex].value;
tt=PokeDex(i);
t=FI(tt,"~",3);
tcode+="\r\nPokemon: "+t+" "+f.PName.value+"\r\n";
if(f.EFlag.checked){
if(f.Happy.value<6){tcode+="Il va éclore!\r\n";}
if(f.Happy.value<11&&f.Happy.value>5){tcode+="Il bouge! - baissez encore un peu plus le bonheur\r\n";}
if(f.Happy.value<41&&f.Happy.value>10){tcode+="Qu'est-ce qui va sortir de l'Oeuf? - baissé un peu le niveau de bonheur pour aller plus vite\r\n";}
if(f.Happy.value>40){tcode+="Cet Oeuf va mettre du temps à éclore - baisser le niveau de bonheur\r\n";}
}
tcode+="Boite:"+(f.Box.selectedIndex+1)+" Slot:"+(f.Spot.selectedIndex+1)+"\r\n";
if(r==5){
BA1=DecToHex(addr,8);
tt="5"+BA1.substring(1,8)+" 0028";
tcode+=tt+"\r\n";
BA2=f.DNA.value;
for(i=0; i<13; i++){
i2=i*12;
BA0=BA2.substring(i2,i2+12);
tt=BA0.substring(0,8)+" "+BA0.substring(8,12);
tcode+=tt+"\r\n";
tlog+="Location "+i+":"+tt+"\r\n";
}
BA0=BA2.substring(156,160);
tt=BA0.substring(0,4)+"0000 0000";
tcode+=tt+"\r\n";
tlog+="Location 13:"+tt+"\r\n";
}else{
for(i=0; i<20; i++){
t= D[i].value;
BA1=DecToHex(addr,8);
tt=ec(BA1,t,32,r);
tcode+=tt+"\r\n";
tlog+="Location "+i+":"+t+"\r\n";
addr+=4;
}}
if(f.RS0.checked || f.RS1.checked || f.RS2.checked || f.RS3.checked || f.RS4.checked || f.RS5.checked || f.RS6.checked){
 tcode+="\r\nCode Rubans:\r\n";
}
if(f.RS0.checked){
addr="02028844";
if(f.Game.selectedIndex<12){addr="02028844";}
if(f.Game.selectedIndex>11&&f.Game.selectedIndex<14){addr="020285A4";}
if(f.Game.selectedIndex>13&&f.Game.selectedIndex<16){addr="02024FD8";}
if(f.Game.selectedIndex>15&&f.Game.selectedIndex<18){addr="02025078";}
if(f.Game.selectedIndex==18){addr="0202884C";}
if(f.Game.selectedIndex>18&&f.Game.selectedIndex<29){addr="02025078";}
if(f.Game.selectedIndex==29){addr="02028BA8";}
BA2=DecToHex(f.S0M.selectedIndex,2);
tt=ec(addr,BA2,8,r);
tcode+=tt+"\r\n";
}
if(f.RS1.checked){
addr="02028845";
if(f.Game.selectedIndex<12){addr="02028845";}
if(f.Game.selectedIndex>11&&f.Game.selectedIndex<14){addr="020285A5";}
if(f.Game.selectedIndex>13&&f.Game.selectedIndex<16){addr="02024FD9";}
if(f.Game.selectedIndex>15&&f.Game.selectedIndex<18){addr="02025079";}
if(f.Game.selectedIndex==18){addr="0202884D";}
if(f.Game.selectedIndex>18&&f.Game.selectedIndex<29){addr="02025079";}
if(f.Game.selectedIndex==29){addr="02028BA9";}
BA2=DecToHex(f.S1M.selectedIndex,2);
tt=ec(addr,BA2,8,r);
tcode+=tt+"\r\n";
}
if(f.RS2.checked){
addr="02028846";
if(f.Game.selectedIndex<12){addr="02028846";}
if(f.Game.selectedIndex>11&&f.Game.selectedIndex<14){addr="020285A6";}
if(f.Game.selectedIndex>13&&f.Game.selectedIndex<16){addr="02024FDA";}
if(f.Game.selectedIndex>15&&f.Game.selectedIndex<18){addr="0202507A";}
if(f.Game.selectedIndex==18){addr="0202884D";}
if(f.Game.selectedIndex>18&&f.Game.selectedIndex<29){addr="0202507A";}
if(f.Game.selectedIndex==29){addr="02028BAA";}
BA2=DecToHex(f.S2M.selectedIndex,2);
tt=ec(addr,BA2,8,r);
tcode+=tt+"\r\n";
}
if(f.RS3.checked){
addr="02028847";
if(f.Game.selectedIndex<12){addr="02028847";}
if(f.Game.selectedIndex>11&&f.Game.selectedIndex<14){addr="020285A7";}
if(f.Game.selectedIndex>13&&f.Game.selectedIndex<16){addr="02024FDB";}
if(f.Game.selectedIndex>15&&f.Game.selectedIndex<18){addr="0202507B";}
if(f.Game.selectedIndex==18){addr="0202884E";}
if(f.Game.selectedIndex>18&&f.Game.selectedIndex<29){addr="0202507B";}
if(f.Game.selectedIndex==29){addr="02028BAB";}
BA2=DecToHex(f.S3M.selectedIndex,2);
tt=ec(addr,BA2,8,r);
tcode+=tt+"\r\n";
}
if(f.RS4.checked){
addr="02028848";
if(f.Game.selectedIndex<12){addr="02028848";}
if(f.Game.selectedIndex>11&&f.Game.selectedIndex<14){addr="020285A8";}
if(f.Game.selectedIndex>13&&f.Game.selectedIndex<16){addr="02024FDC";}
if(f.Game.selectedIndex>15&&f.Game.selectedIndex<18){addr="0202507C";}
if(f.Game.selectedIndex==18){addr="0202884F";}
if(f.Game.selectedIndex>18&&f.Game.selectedIndex<29){addr="0202507C";}
if(f.Game.selectedIndex==29){addr="02028BAC";}
BA2=DecToHex(f.S4M.selectedIndex,2);
tt=ec(addr,BA2,8,r);
tcode+=tt+"\r\n";
}
if(f.RS5.checked){
addr="02028849";
if(f.Game.selectedIndex<12){addr="02028849";}
if(f.Game.selectedIndex>11&&f.Game.selectedIndex<14){addr="020285A9";}
if(f.Game.selectedIndex>13&&f.Game.selectedIndex<16){addr="02024FDD";}
if(f.Game.selectedIndex>15&&f.Game.selectedIndex<18){addr="0202507D";}
if(f.Game.selectedIndex==18){addr="02028850";}
if(f.Game.selectedIndex>18&&f.Game.selectedIndex<29){addr="0202507D";}
if(f.Game.selectedIndex==29){addr="02028BAD";}
BA2=DecToHex(f.S5M.selectedIndex,2);
tt=ec(addr,BA2,8,r);
tcode+=tt+"\r\n";
}
if(f.RS6.checked){
addr="0202884A";
if(f.Game.selectedIndex<12){addr="0202884A";}
if(f.Game.selectedIndex>11&&f.Game.selectedIndex<14){addr="020285AA";}
if(f.Game.selectedIndex>13&&f.Game.selectedIndex<16){addr="02024FDE";}
if(f.Game.selectedIndex>15&&f.Game.selectedIndex<18){addr="0202507E";}
if(f.Game.selectedIndex==18){addr="02028851";}
if(f.Game.selectedIndex>18&&f.Game.selectedIndex<29){addr="0202507E";}
if(f.Game.selectedIndex==29){addr="02028BAE";}
BA2=DecToHex(f.S6M.selectedIndex,2);
tt=ec(addr,BA2,8,r);
tcode+=tt+"\r\n";
}
}else{
tcode=f.DNA.value;
}
f.Code.value=tcode;
f.LogC.value=tlog+" fini.";
}

function IsCode(C){
var e=0;
e=0;
if(C=="0"){e=1;}
if(C=="1"){e=1;}
if(C=="2"){e=1;}
if(C=="3"){e=1;}
if(C=="4"){e=1;}
if(C=="5"){e=1;}
if(C=="6"){e=1;}
if(C=="7"){e=1;}
if(C=="8"){e=1;}
if(C=="9"){e=1;}
if(C=="a"){e=1;}
if(C=="b"){e=1;}
if(C=="c"){e=1;}
if(C=="d"){e=1;}
if(C=="e"){e=1;}
if(C=="f"){e=1;}
if(C=="A"){e=1;}
if(C=="B"){e=1;}
if(C=="C"){e=1;}
if(C=="D"){e=1;}
if(C=="E"){e=1;}
if(C=="F"){e=1;}
if(C.charCodeAt(0)==13){e=2;}
if(C.charCodeAt(0)==10){e=2;}
if(C==" "){e=2;}
if(C==":"){e=2;}
return e;
}

function codein(){
var f=document.PokemonForm;
var t=" ";
var tt=" ";
var r=0;
var tcode=" ";
var tlog=" ";
var i=0; var j=0; var n=0;
var w=0; var x=0; var y=0; var z=0;
var ao=0;
var tf=0;
var a=" "; var v=" ";
var cb=0;
var c=f.RCode;
var D=f.RDNA;
tcode=f.Code.value;
f.LogC.value="Scan pour l'Adresse\r\n";
r=0; j=0; n=0; t="";
tt="";
tlog="";
a=" ";
v=" ";
tf=0; ao=0; cb=0;
tlog="Code Extraction\r\n";
for(i=0;(tcode.length)>=i;i++){
 t=tcode.substring(i,i+1);
 if(IsCode(t)==1){
  tt+=t;
  n+=1;
  if(n>11 && cb==0){
   t=tt.substring(0,4);
   if(t=="8203"||t=="8202"||t=="5202"||t=="5203"){
    if(r==0){
     if(t=="8203"||t=="8202"){
     tlog+="CB/GSv4+Type8 Codes:\r\n";
     c[0].checked = false;
     c[1].checked = false;
     c[2].checked = false;
     c[3].checked = true;
     c[4].checked = false;
     c[5].checked = false;
     tf=4;}
     if(t=="5202"||t=="5203"){
     tlog+="CB/GSv4+Type5 Codes:\r\n";
     c[0].checked = false;
     c[1].checked = false;
     c[2].checked = false;
     c[3].checked = false;
     c[4].checked = false;
     c[5].checked = true;
     tf=6;}
     a="0"+tt.substring(1,8);
     z=Math.floor((1*("0x"+a))-Math.floor(1*"0x020300A4",10),10);
     x=z/80;
     w=Math.floor(z/80);
     y=x-w;
     if(y==0){
      f.LogC.Value+="Rubis/Saphir International Trouvé\r\n";
      tlog+="Rubis/Saphir International trouvé\r\n";
      f.Game.selectedIndex=0;
      ao=z;
     }
     z=Math.floor((1*("0x"+a))-Math.floor(1*"0x0202FDC0",10),10);
     x=z/80;
     w=Math.floor(z/80);
     y=x-w;
     if(y==0){
      f.LogC.Value+="Rubis/Saphir JP trouvé\r\n";
      tlog+="Rubis/Saphir JP trouvé\r\n";
      f.Game.selectedIndex=12;
      ao=z;
     }
     z=Math.floor((1*("0x"+a))-Math.floor(1*"0x02029250",10),10);
     x=z/80;
     w=Math.floor(z/80);
     y=x-w;
     if(y==0){
      f.LogC.Value+="Rogue Feu/Vert Feuille JP trouvé\r\n";
      tlog+="Rogue Feu/Vert Feuille JP trouvé\r\n";
      f.Game.selectedIndex=14;
      ao=z;
     }
     z=Math.floor((1*("0x"+a))-Math.floor(1*"0x02029318",10),10);
     x=z/80;
     w=Math.floor(z/80);
     y=x-w;
     if(y==0){
      f.LogC.Value+="Rogue Feu/Vert Feuille International trouvé\r\n";
      tlog+="Rogue Feu/Vert Feuille International trouvé\r\n";
      f.Game.selectedIndex=16;
      ao=z;
     }
     z=Math.floor((1*("0x"+a))-Math.floor(1*"0x020294B0",10),10);
     x=z/80;
     w=Math.floor(z/80);
     y=x-w;
     if(y==0){
      f.LogC.Value+="Emeraude JP trouvé\r\n";
      tlog+="Emeraude JP trouvé\r\n";
      f.Game.selectedIndex=18;
      ao=z;
     }
     z=Math.floor((1*("0x"+a))-Math.floor(1*"0x0202980C",10),10);
     x=z/80;
     w=Math.floor(z/80);
     y=x-w;
     if(y==0){
      f.LogC.Value+="US Emeraude trouvé\r\n";
      tlog+="Emeraude US trouvé\r\n";
      f.Game.selectedIndex=29;
      ao=z;
     }
     x=Math.floor((Math.floor(ao%2400,10)/80),10);
     if(x<0 || x>29){
      f.LogC.Value="Scan pour l'Adresse";
      j=0;     
     }else{
      y=Math.floor((ao-x)/2400);
      if(y<0 || y>13){
       f.LogC.Value="Scan pour l'Adresse";
       j=0;
      }else{
       f.LogC.Value="Location de code trouvé 0:\r\nScan pour le code";
       f.Box.selectedIndex=y;
       f.Spot.selectedIndex=x;
       tlog+="Box:"+(y+1)+" Spot:"+(x+1)+"\r\n";
       tlog+="Addr:"+a+"\r\n";
       j=1;
      }
     }
    }
    if(j==1){
     if(t=="8203"||t=="8202"){v=tt.substring(8,12); cb=8;}
     if(t=="5202"||t=="5203"){v=""; cb=5;}
    }
    n=0;
   }
  }
  if(n>11 && cb==8){
   a=tt.substring(8,12);
   v=a+v;
   D[r].value=v;
   tlog+="Location "+r+":"+v+"\r\n";
   r+=1;
   cb=0;
   n=0;
  }
  if(n>11 && cb==5){
   v+=tt;
   tlog+=tt+"\r\n";
   r+=1;
   n=0;
  }
  if(n>15 && cb==0){
   if(tf<4){f.LogC.Value="Scan pour la Police"+r+"\r\n";}
   t=tt.substring(0,4);
   if(t=="0203"||t=="0202"){
    if(r==0){
     tlog+="VBA Codes:\r\n";
     c[0].checked = true;
     c[1].checked = false;
     c[2].checked = false;
     c[3].checked = false;
     c[4].checked = false;
     c[5].checked = false;
     tf=0;
    }
    a=tt.substring(0,8);
    v=tt.substring(8,16);
    j=1;
   }else{
    t=GAD(tt,"1");
    a=t.substring(0,4);
    if(a=="2203"||a=="2202"){
     if(r==0){
      tlog+="AR v1 Codes:\r\n";
      c[0].checked = false;
      c[1].checked = true;
      c[2].checked = false;
      c[3].checked = false;
      c[4].checked = false;
      c[5].checked = false;
     tf=2;
     }
     a="0"+t.substring(1,8);
     v=t.substring(8,16);
     j=1;
    }else{
     t=GAD(tt,"3");
     a=t.substring(0,4);
     if(a=="0423"||a=="0422"){
      if(r==0){
       tlog+="AR v3 Codes:\r\n";
       c[0].checked = false;
       c[1].checked = false;
       c[2].checked = true;
       c[3].checked = false;
       c[4].checked = false;
       c[5].checked = false;
    tf=3;
      }
      a="020"+t.substring(3,8);
      v=t.substring(8,16);
      j=1;
     }else{
      f.LogC.Value="scan pour le 80-Bytes";
      j=2;
     tf=5;
      if(n>159){
       tlog+="80-Bytes Found:\r\n";
       c[0].checked = false;
       c[1].checked = false;
       c[2].checked = false;
       c[3].checked = false;
       c[4].checked = true;
       c[5].checked = false;
      f.DNA.value=tt;
       for(r=0;r<20;r++){
        D[r].value=tt.substr((r*8+6),2)+tt.substr((r*8+4),2)+tt.substr((r*8+2),2)+tt.substr((r*8),2);
        tlog+=tt.substr((r*8),2)+tt.substr((r*8+2),2)+tt.substr((r*8+4),2)+tt.substr((r*8+6),2)+"\r\n";
       }
       f.Box.selectedIndex=0;
       f.Spot.selectedIndex=0;
       j=0;
      }
     }
    }
   }
   if(j==1){
    if(r==0){
     z=Math.floor((1*("0x"+a))-Math.floor(1*"0x020300A4",10),10);
     x=z/80;
     w=Math.floor(z/80);
     y=x-w;
     if(y==0){
      f.LogC.Value+="Found International Ruby/Sapphire Code\r\n";
      tlog+="International Rubis/Saphir trouvé\r\n";
      f.Game.selectedIndex=0;
      ao=z;
     }
     z=Math.floor((1*("0x"+a))-Math.floor(1*"0x0202FDC0",10),10);
     x=z/80;
     w=Math.floor(z/80);
     y=x-w;
     if(y==0){
      f.LogC.Value+="Found Japanese Ruby/Sapphire Code\r\n";
      tlog+="Rubis/Saphir JP trouvé\r\n";
      f.Game.selectedIndex=12;
      ao=z;
     }
     z=Math.floor((1*("0x"+a))-Math.floor(1*"0x02029250",10),10);
     x=z/80;
     w=Math.floor(z/80);
     y=x-w;
     if(y==0){
      f.LogC.Value+="Found Japanese Fire/Leaf Code\r\n";
      tlog+="International Rouge Feu/Vert Feuille JP trouvé\r\n";
      f.Game.selectedIndex=14;
      ao=z;
      }
     z=Math.floor((1*("0x"+a))-Math.floor(1*"0x02029318",10),10);
     x=z/80;
     w=Math.floor(z/80);
     y=x-w;
     if(y==0){
      f.LogC.Value+="Found International Fire/Leaf Code\r\n";
      tlog+="International Rouge Feu/Vert Feuille trouvé\r\n";
      f.Game.selectedIndex=16;
      ao=z;
      }
     z=Math.floor((1*("0x"+a))-Math.floor(1*"0x020294B0",10),10);
     x=z/80;
     w=Math.floor(z/80);
     y=x-w;
     if(y==0){
      f.LogC.Value+="Found Japanese Emerald Code\r\n";
      tlog+="Emeraude JP trouvé\r\n";
      f.Game.selectedIndex=18;
      ao=z;
      }
     z=Math.floor((1*("0x"+a))-Math.floor(1*"0x0202980C",10),10);
     x=z/80;
     w=Math.floor(z/80);
     y=x-w;
     if(y==0){
      f.LogC.Value+="Found USA Emerald Code\r\n";
      tlog+="Emeraude International trouvé\r\n";
      f.Game.selectedIndex=29;
      ao=z;
      }
      x=Math.floor((Math.floor(ao%2400,10)/80),10);
     if(x<0 || x>29){
      f.LogC.Value="Scan pour l'Adresse";
      j=0;     
     }else{
      y=Math.floor((ao-x)/2400);
      if(y<0 || y>13){
       f.LogC.Value="Svan pour l'Adresse";
       j=0;
      }else{
       f.LogC.Value="Found Code Sample 0:\r\nScanning for Code";
       f.Box.selectedIndex=y;
       f.Spot.selectedIndex=x;
       tlog+="Boite:"+(y+1)+" Slot:"+(x+1)+"\r\n";
       tlog+="Addresse:"+a+"\r\n";
       j=1;
      }
     }
    }
    if(j==1){
     if(r<20){
      D[r].value=v;
      tlog+="Location modifié "+r+":"+v+"\r\n";
      r+=1;
     }
    }
   }
   if(j<2){
    tt="";
    j=0;
    n=0;
   }
  }
 }else{
  if(IsCode(t)==2){
   if(n<8){n=0; tt="";}
  }else{
   n=0;
   tt="";
  }
 }
}
if(cb==5){
 if(r==14){r=20;}
 if((v.length)<160){
  r=1;
 }else{
  f.DNA.value=v;
  tt=v;
  for(r=0;r<20;r++){
   D[r].value=tt.substr((r*8+6),2)+tt.substr((r*8+4),2)+tt.substr((r*8+2),2)+tt.substr((r*8),2);
   tlog+=tt.substr((r*8),2)+tt.substr((r*8+2),2)+tt.substr((r*8+4),2)+tt.substr((r*8+6),2)+"\r\n";
  }
 }
}
if(r<20){tlog+="Erreur: Code Incomplet Trouvé.\r\n";}
tlog=SetAll(tlog);
f.LogC.value=tlog+" fini.";
}

function NewDex(){
var f=document.PokemonForm;
var t=" ";
var x=0;
var i=0;
var pgn=0;
var pdex=" ";
pgn=f.Species.options[f.Species.selectedIndex].value;
if(pgn<1){pgn=1;}
pdex=PokeDex(pgn);
i=f.Dex.selectedIndex;
if(i==0){t=FI(pdex,"~",1); x=parseInt(t,10);}
if(i==1){t=FI(pdex,"~",2); x=parseInt(t,10);}
if(i==2){x=pgn;}
f.PNum.value=x;
return x;
}

function NewPoke(){
var f=document.PokemonForm;
var t=" ";
var u=" ";
var v=" ";
var x=0;
var i=0;
var pgn=0;
var pdex=" ";
pgn=f.Species.options[f.Species.selectedIndex].value;
if(pgn<1){pgn=Math.floor(Math.random()*386)+1; f.Species.selectedIndex=pgn;}
t=f.DirNom.value;
if(f.Shiny.checked){t=f.DirShi.value;}
u="";
if(pgn==201){u=f.Unown.options[f.Unown.selectedIndex].value;}
if(f.LZ.checked){
 v="000"+pgn;
 x=v.length;
 v=v.substring((x-3),x);
}else{
 v=pgn;
}
document.PokePic.src=t+v+u+f.FilExt.value;
pdex=PokeDex(pgn);
i=f.Dex.selectedIndex;
if(i==0){t=FI(pdex,"~",1); x=parseInt(t,10);}
if(i==1){t=FI(pdex,"~",2); x=parseInt(t,10);}
if(i==2){x=pgn;}
f.PNum.value=x;
t=FI(pdex,"~",18);
if(t.length>2){
 u=FI(t,"/",1);
 f.Type2.selectedIndex=parseInt(u,10);
 t=t.substring(0,(t.length-u.length-1));
 f.Type1.selectedIndex=parseInt(t,10);
}else{
 f.Type1.selectedIndex=parseInt(t,10);
 f.Type2.selectedIndex=17;
}
t=SetGender();
i=HPower();
i=SetAb();
}

function SetAll(tlog){
var d=document;
var f=d.PokemonForm;
var G=f.PGender;
var ga=0;
var x=0;
var t=" ";
var dna=" ";
var D=f.RDNA;
dna=SetDNA();
ga=parseInt(1*("0x"+D[0].value),10);
f.PID.value=ga;
x=(1*("0x"+D[1].value))%65536;
if(x<1){x=0;}
f.TID.value=parseInt(x,10);
x=(1*("0x"+D[1].value))/65536;
if(x<1){x=0;}
f.STID.value=parseInt(x,10);
f.PName.value=PToS(dna.substring(16,36),10);
t=D[4].value;
f.PFont.value=t.substring(0,4);
f.TName.value=PToS(dna.substring(40,54),7);
t=Marks((1*("0x"+dna.substring(55,56))));
t=SetNature();
t=SetXKey();
t=SetShiny();
t=SetABCD();
t=SetUnown();
t=FindABCD(t);
t="";
t=FindCS(t);
tlog+=t;
t=SetStructure();
ga=Math.floor(ga%256);
gt=Gtest();
if(ga>gt){ga=1;}else{ga=0;}
G.selectedIndex=ga;
t=SetGender();
return tlog;
}

function SetStructure(){
var f=document.PokemonForm;
var As=f.RA;
var Bs=f.RB;
var Cs=f.RC;
var Ds=f.RD;
var t=" ";
var i=0;
var a0=" ";
var a1=" ";
var a2=" ";
var b0=" ";
var b1=" ";
var b2=" ";
var c0=" ";
var c1=" ";
var c2=" ";
var d0=" ";
var d1=" ";
var d2=" ";
a0=1*("0x"+As[0].value);
a1=1*("0x"+As[1].value);
a2=1*("0x"+As[2].value);
b0=1*("0x"+Bs[0].value);
b1=1*("0x"+Bs[1].value);
b2=1*("0x"+Bs[2].value);
c0=1*("0x"+Cs[0].value);
c1=1*("0x"+Cs[1].value);
c2=1*("0x"+Cs[2].value);
d0=1*("0x"+Ds[0].value);
d1=1*("0x"+Ds[1].value);
d2=1*("0x"+Ds[2].value);
if(f.P1O.selectedIndex!=0){
f.P1O.selectedIndex=0;
i=NPO();}
i=Math.floor(a0%65536)-1;
if(i>251){i-=25;}
f.Species.selectedIndex=i;
if(f.Isort.selectedIndex!=0){
f.Isort.selectedIndex=0;
i=NIO();}
i=Math.floor(a0/65536);
f.Held.selectedIndex=ItemDex(DecToHex(i,3),1);
f.ItemDesc.value=ItemDex(DecToHex(i,3),2);
f.Exp.value=a1;
i=Math.floor(a2%4);
f.M1UPP.selectedIndex=i;
i=Math.floor((a2/4)%4);
f.M2UPP.selectedIndex=i;
i=Math.floor((a2/16)%4);
f.M3UPP.selectedIndex=i;
i=Math.floor((a2/64)%4);
f.M4UPP.selectedIndex=i;
i=Math.floor((a2/256)%256);
f.Happy.value=i;
if(f.M1O.selectedIndex!=0){
f.M1O.selectedIndex=0;
i=NMO('1')}
i=Math.floor(b0%65536)-1;
f.Move1.selectedIndex=i;
if(f.M2O.selectedIndex!=0){
f.M2O.selectedIndex=0;
i=NMO('2')}
i=Math.floor(b0/65536);
f.Move2.selectedIndex=i;
if(f.M3O.selectedIndex!=0){
f.M3O.selectedIndex=0;
i=NMO('3')}
i=Math.floor(b1%65536);
f.Move3.selectedIndex=i;
if(f.M4O.selectedIndex!=0){
f.M4O.selectedIndex=0;
i=NMO('4')}
i=Math.floor(b1/65536);
f.Move4.selectedIndex=i;
i=Math.floor(b2%256);
f.M1PP.value=i;
i=Math.floor((b2/256)%256);
f.M2PP.value=i;
i=Math.floor((b2/65536)%256);
f.M3PP.value=i;
i=Math.floor((b2/16777216)%256);
f.M4PP.value=i;
i=Math.floor(c0%256);
f.HPEff.value=i;
i=Math.floor((c0/256)%256);
f.AtkEff.value=i;
i=Math.floor((c0/65536)%256);
f.DefEff.value=i;
i=Math.floor((c0/16777216)%256);
f.SpeEff.value=i;
i=Math.floor(c1%256);
f.SpAEff.value=i;
i=Math.floor((c1/256)%256);
f.SpDEff.value=i;
i=Math.floor((c1/65536)%256);
f.Cool.value=i;
i=Math.floor((c1/16777216)%256);
f.Beauty.value=i;
i=Math.floor(c2%256);
f.Cute.value=i;
i=Math.floor((c2/256)%256);
f.Smart.value=i;
i=Math.floor((c2/65536)%256);
f.Tough.value=i;
i=Math.floor((c2/16777216)%256);
f.Luster.value=i;
i=Math.floor(d0%256);
if(i==0){f.Pokerus.selectedIndex=0;}
if(i>0&&i<16){f.Pokerus.selectedIndex=1;}
if(i>=16){f.Pokerus.selectedIndex=2;}
if(f.Lsort.selectedIndex!=0){
f.Lsort.selectedIndex=0;
i=NLO(); }
i=Math.floor((d0/256)%256);
f.Loc.selectedIndex=i;
i=Math.floor((d0/65536)%256)&"0x7F";
f.Lvl.value=i;
i=Math.floor((d0/8388608))%16;
f.OTFlag.selectedIndex=i;
i=Math.floor((d0/134217728)%16)-1;
if(i<0){i=3;}
f.Ball.selectedIndex=i;
i=Math.floor((d0/2147483648))%2;
f.TGender.selectedIndex=i;
i=Math.floor(d1%32);
f.HPDV.selectedIndex=i;
i=Math.floor((d1/32)%32);
f.AtkDV.selectedIndex=i
i=Math.floor((d1/1024)%32);
f.DefDV.selectedIndex=i
i=Math.floor((d1/32768)%32);
f.SpeDV.selectedIndex=i
i=Math.floor((d1/1048576)%32);
f.SpADV.selectedIndex=i
i=Math.floor((d1/33554432)%32);
f.SpDDV.selectedIndex=i
i=Math.floor((d1/1073741824)%2);
if(i==0){f.EFlag.checked=false;}else{f.EFlag.checked=true;}
i=Math.floor((d1/2147483648))%2;
f.Ability.selectedIndex=i;
i=Math.floor(d2%8);
f.RCool.selectedIndex=i;
i=Math.floor((d2/8)%8);
f.RBeauty.selectedIndex=i;
i=Math.floor((d2/64)%8);
f.RCute.selectedIndex=i;
i=Math.floor((d2/512)%8);
f.RSmart.selectedIndex=i;
i=Math.floor((d2/4096)%8);
f.RTough.selectedIndex=i;
i=Math.floor((d2/32768)%2);
if(i!=0){f.RChampion.checked=true;}else{f.RChampion.checked=false;}
i=Math.floor((d2/65536)%2);
if(i!=0){f.RB50.checked=true;}else{f.RB50.checked=false;}
i=Math.floor((d2/131072)%2);
if(i!=0){f.RB100.checked=true;}else{f.RB100.checked=false;}
i=Math.floor((d2/262144)%2);
if(i!=0){f.RSketch.checked=true;}else{f.RSketch.checked=false;}
i=Math.floor((d2/524288)%2);
if(i!=0){f.RHardWorker.checked=true;}else{f.RHardWorker.checked=false;}
i=Math.floor((d2/1048576)%2);
if(i!=0){f.RS0.checked=true;}else{f.RS0.checked=false;}
i=Math.floor((d2/2097152)%2);
if(i!=0){f.RS1.checked=true;}else{f.RS1.checked=false;}
i=Math.floor((d2/4194304)%2);
if(i!=0){f.RS2.checked=true;}else{f.RS2.checked=false;}
i=Math.floor((d2/8388608)%2);
if(i!=0){f.RS3.checked=true;}else{f.RS3.checked=false;}
i=Math.floor((d2/16777216)%2);
if(i!=0){
 f.RS4.checked=true;
 if(f.OTFlag.selectedIndex==15){f.S4M.selectedIndex=44;}
}else{f.RS4.checked=false;}
i=Math.floor((d2/33554432)%2);
if(i!=0){f.RS5.checked=true;}else{f.RS5.checked=false;}
i=Math.floor((d2/67108864)%2);
if(i!=0){f.RS6.checked=true;}else{f.RS6.checked=false;}
i=Math.floor((d2/2147483648)%2);
if(i!=0){f.AltP.checked=true;}else{f.AltP.checked=false;}
t=NewPoke();
i=NMove('5');
return "Hi";
}

function SetShiny(){
var f=document.PokemonForm;
var X=f.XKey;
var wh=0;
var wl=0;
var dw=0;
var t=" ";
var i=0;
dw=1*("0x"+X.value);
wh=Math.floor(dw/65536);
wl=Math.floor(dw%65536);
i=wl^wh;
if(i<0){i+=1*("0x100000000")};
if(i<8){
 f.Shiny.checked=true;
 t="Shiney";
}else{
 f.Shiny.checked=false;
 t="Normal";
}
return t;
}

function FindCS(tl){
var f=document.PokemonForm;
var As=f.RA;
var Bs=f.RB;
var Cs=f.RC;
var Ds=f.RD;
var cs=0;
var dw=0;
var i=0;
var tlog=" ";
tlog=f.RDNA[7].value;
f.CS.value=tlog.substring(4,8);
tlog=tl;
cs=0;
for(i=0;i<3;i++){
dw=1*("0x"+As[i].value);
cs+=Math.floor(dw/65536);
cs+=Math.floor(dw%65536);
}
for(i=0;i<3;i++){
dw=1*("0x"+Bs[i].value);
cs+=Math.floor(dw/65536);
cs+=Math.floor(dw%65536);
}
for(i=0;i<3;i++){
dw=1*("0x"+Cs[i].value);
cs+=Math.floor(dw/65536);
cs+=Math.floor(dw%65536);
}
for(i=0;i<3;i++){
dw=1*("0x"+Ds[i].value);
cs+=Math.floor(dw/65536);
cs+=Math.floor(dw%65536);
}
cs=cs&(1*"0xFFFF");
i=1*("0x"+f.CS.value);
if(i!=cs){
tlog+="Mauv.Oeuf => Erreur de somme:"+DecToHex(cs,4)+"\r\n";
}else{
tlog+="Vérification de somme:"+DecToHex(cs,4)+"\r\n";
}
return tlog;
}

function FindABCD(tl){
var f=document.PokemonForm;
var As=f.RA;
var Bs=f.RB;
var Cs=f.RC;
var Ds=f.RD;
var D=f.RDNA;
var xk=0;
var t0=" ";
var t1=" ";
var t2=" ";
var t=" ";
var i=0;
var abcd=" ";
var a0=" ";
var a1=" ";
var a2=" ";
var b0=" ";
var b1=" ";
var b2=" ";
var c0=" ";
var c1=" ";
var c2=" ";
var d0=" ";
var d1=" ";
var d2=" ";
var tlog=" ";
tlog=tl;
abcd=f.ABCD.value;
tlog+=abcd+"\r\n";
xk=parseInt(1*("0x"+f.XKey.value),10);
for(i=0;i<4;i++){
 if(i==0){
  t0=D[8].value;
  t1=D[9].value;
  t2=D[10].value;
 }
 if(i==1){
  t0=D[11].value;
  t1=D[12].value;
  t2=D[13].value;
 }
 if(i==2){
  t0=D[14].value;
  t1=D[15].value;
  t2=D[16].value;
 }
 if(i==3){
  t0=D[17].value;
  t1=D[18].value;
  t2=D[19].value;
 }
 t=abcd.substring(i,i+1);
 if(t=="A"){
 a0=t0;
 a1=t1;
 a2=t2;
 }
 if(t=="B"){
 b0=t0;
 b1=t1;
 b2=t2;
 }
 if(t=="C"){
 c0=t0;
 c1=t1;
 c2=t2;
 }
 if(t=="D"){
 d0=t0;
 d1=t1;
 d2=t2;
 }
}
i=Math.floor(xk^(1*("0x"+a0)));
if(i<0){i+=1*"0x100000000";}
As[0].value=DecToHex(i,8);
i=Math.floor(xk^(1*("0x"+a1)));
if(i<0){i+=1*"0x100000000";}
As[1].value=DecToHex(i,8);
i=Math.floor(xk^(1*("0x"+a2)));
if(i<0){i+=1*"0x100000000";}
As[2].value=DecToHex(i,8);
i=Math.floor(xk^(1*("0x"+b0)));
if(i<0){i+=1*"0x100000000";}
Bs[0].value=DecToHex(i,8);
i=Math.floor(xk^(1*("0x"+b1)));
if(i<0){i+=1*"0x100000000";}
Bs[1].value=DecToHex(i,8);
i=Math.floor(xk^(1*("0x"+b2)));
if(i<0){i+=1*"0x100000000";}
Bs[2].value=DecToHex(i,8);
i=Math.floor(xk^(1*("0x"+c0)));
if(i<0){i+=1*"0x100000000";}
Cs[0].value=DecToHex(i,8);
i=Math.floor(xk^(1*("0x"+c1)));
if(i<0){i+=1*"0x100000000";}
Cs[1].value=DecToHex(i,8);
i=Math.floor(xk^(1*("0x"+c2)));
if(i<0){i+=1*"0x100000000";}
Cs[2].value=DecToHex(i,8);
i=Math.floor(xk^(1*("0x"+d0)));
if(i<0){i+=1*"0x100000000";}
Ds[0].value=DecToHex(i,8);
i=Math.floor(xk^(1*("0x"+d1)));
if(i<0){i+=1*"0x100000000";}
Ds[1].value=DecToHex(i,8);
i=Math.floor(xk^(1*("0x"+d2)));
if(i<0){i+=1*"0x100000000";}
Ds[2].value=DecToHex(i,8);
return tlog;
}

function SetXKey(){
var f=document.PokemonForm;
var D=f.RDNA;
var X=f.XKey;
var tid=0;
var pid=0;
var xk=0;
var t=" ";
pid=parseInt(1*("0x"+D[0].value),10);
tid=parseInt(1*("0x"+D[1].value),10);
xk=Math.floor(pid^tid);
if(xk<0){xk+=1*"0x100000000";}
t=DecToHex(xk,8);
X.value=t;
return t;
}

function SetUnown(){
var f=document.PokemonForm;
var D=f.RDNA;
var U=f.Unown;
var pid=0;
var s=0;
var t=" ";
var US=" ";
pid=parseInt(1*("0x"+D[0].value),10);
s=Math.floor(pid%4);
s+=(Math.floor(pid/256)%4)*4;
s+=(Math.floor(pid/65536)%4)*16;
s+=(Math.floor(pid/16777216)%4)*64;
t = Math.floor(s % 28);
if(t==0){US="A";}
if(t==1){US="B";}
if(t==2){US="C";}
if(t==3){US="D";}
if(t==4){US="E";}
if(t==5){US="F";}
if(t==6){US="G";}
if(t==7){US="H";}
if(t==8){US="I";}
if(t==9){US="J";}
if(t==10){US="K";}
if(t==11){US="L";}
if(t==12){US="M";}
if(t==13){US="N";}
if(t==14){US="O";}
if(t==15){US="P";}
if(t==16){US="Q";}
if(t==17){US="R";}
if(t==18){US="S";}
if(t==19){US="T";}
if(t==20){US="U";}
if(t==21){US="V";}
if(t==22){US="W";}
if(t==23){US="X";}
if(t==24){US="Y";}
if(t==25){US="Z";}
if(t==26){US="!";}
if(t==27){US="?";}
U.selectedIndex=t;
return US;
}

function SetABCD(){
var f=document.PokemonForm;
var A=f.ABCD;
var n=0;
var t=" ";
n=Math.floor(f.PID.value%24);
if(n==0){t="ABCD";}
if(n==1){t="ABDC";}
if(n==2){t="ACBD";}
if(n==3){t="ACDB";}
if(n==4){t="ADBC";}
if(n==5){t="ADCB";}
if(n==6){t="BACD";}
if(n==7){t="BADC";}
if(n==8){t="BCAD";}
if(n==9){t="BCDA";}
if(n==10){t="BDAC";}
if(n==11){t="BDCA";}
if(n==12){t="CABD";}
if(n==13){t="CADB";}
if(n==14){t="CBAD";}
if(n==15){t="CBDA";}
if(n==16){t="CDAB";}
if(n==17){t="CDBA";}
if(n==18){t="DABC";}
if(n==19){t="DACB";}
if(n==20){t="DBAC";}
if(n==21){t="DBCA";}
if(n==22){t="DCAB";}
if(n==23){t="DCBA";}
A.value=t;
return t;
}

function SetNature(){
var f=document.PokemonForm;
var pid=0;
var D=f.RDNA;
var N=f.Nature;
var n=0;
pid=parseInt(1*("0x"+D[0].value),10);
n=Math.floor(pid%25);
N.selectedIndex=n;
return n;
}

function SetDNA(){
var f=document.PokemonForm;
var t=" ";
var tt=" ";
var i=0;
var D=f.RDNA;
tt="";
for(i=0;20>i;i++){
 t=D[i].value;
 tt+=t.substring(6,8);
 tt+=t.substring(4,6);
 tt+=t.substring(2,4);
 tt+=t.substring(0,2);
}
f.DNA.value=tt;
return tt;
}

function SetGender(){
var f=document.PokemonForm;
var G=f.PGender;
var pdex=" ";
var pgn=0;
var o=0;
pgn=f.Species.options[f.Species.selectedIndex].value;
pdex=PokeDex(pgn);
x=FI(pdex,"~",20);
o=G.selectedIndex;
G.options.length=0;
if(x==-1){
 G.options[0] = new Option("Aucun","0",true);
 G.options[1] = new Option("Aucun","1");
}
if(x==100){
 G.options[0] = new Option("male","0",true);
 G.options[1] = new Option("male","1");
}
if(x==0){
 G.options[0] = new Option("male","0",true);
 G.options[1] = new Option("male","1");
}
if(x!=-1&&x!=100&&x!=0){
 G.options[0] = new Option("femelle","0",true);
 G.options[1] = new Option("male","1");
}
G.options.length=2;
G.selectedIndex=o;
return o;
}

function Marks(m){
var d=document;
var f=d.PokemonForm;
var c=" ";
var t=0;
t=0;
if((m&1)==1){
f.Circle.checked=true;
}else{
f.Circle.checked=false;
}
if((m&2)==2){
f.Square.checked=true;
}else{
f.Square.checked=false;
}
if((m&4)==4){
f.Triangle.checked=true;
}else{
f.Triangle.checked=false;
}
if((m&8)==8){
f.Heart.checked=true;
}else{
f.Heart.checked=false;
}
t=m;
c=DecToHex(t,1);
return c;
}

function PToS(I,L){
var s=" ";
var t=" ";
var cc=" ";
var c=" ";
var m=0;
s=I;
t="";
m=L;
for(var i=0;i<m;i+=1){
 if (i>=s.length){
  cc="";
 }else{
  c=s.substr(i*2,2);
  c=c.toUpperCase();
  if(c=="FF"){
   cc="";
   i=m+1;
  }else{
   cc=PokeToChar(c);
  }
 }
 t+=cc;
}
return t;
}

function StrToPoke(I,L){
var s=" ";
var t=" ";
var cc=" ";
var c=" ";
var m=0;
var d=document.PokemonForm;
s=I;
t="";
m=L+1;
for(var i=0;i<=m;i++){
 if (i>=s.length){
  cc="FF";
  }else{
  c=s.substr(i,1);
  if(c=="#"){
   cc=s.substr(i+1,2);
   i+=2;
   m+=2;
  }else{
   cc=CharToPoke(c);
  }
 }
  t+=cc;
}
return t;
}

function CharToPoke(c){
var t=" ";
t="00";
if(c==" "){t="00";}
// ~ poke'mon
if(c=="~"){t="1B";}
if(c=="0"){t="A1";}
if(c=="1"){t="A2";}
if(c=="2"){t="A3";}
if(c=="3"){t="A4";}
if(c=="4"){t="A5";}
if(c=="5"){t="A6";}
if(c=="6"){t="A7";}
if(c=="7"){t="A8";}
if(c=="8"){t="A9";}
if(c=="9"){t="AA";}
if(c=="!"){t="AB";}
if(c=="?"){t="AC";}
if(c=="."){t="AD";}
if(c=="-"){t="AE";}
// _ center dot
if(c=="_"){t="AF";}
// = double dot
if(c=="="){t="B0";}
if(c==':'){t="B1";}
// : START double Quote
if(c=='"'){t="B2";}
if(c==";"){t="B3";}
// ; START single Quote
if(c=="'"){t="B4";}
// < male symbol
// > female symbol
if(c=="<"){t="B5";}
if(c==">"){t="B6";}
// $ pokemoney
if(c=="$"){t="B7";}
if(c==","){t="B8";}
// * times sympol
if(c=="*"){t="B9";}
if(c=="/"){t="BA";}
if(c=="A"){t="BB";}
if(c=="B"){t="BC";}
if(c=="C"){t="BD";}
if(c=="D"){t="BE";}
if(c=="E"){t="BF";}
if(c=="F"){t="C0";}
if(c=="G"){t="C1";}
if(c=="H"){t="C2";}
if(c=="I"){t="C3";}
if(c=="J"){t="C4";}
if(c=="K"){t="C5";}
if(c=="L"){t="C6";}
if(c=="M"){t="C7";}
if(c=="N"){t="C8";}
if(c=="O"){t="C9";}
if(c=="P"){t="CA";}
if(c=="Q"){t="CB";}
if(c=="R"){t="CC";}
if(c=="S"){t="CD";}
if(c=="T"){t="CE";}
if(c=="U"){t="CF";}
if(c=="V"){t="D0";}
if(c=="W"){t="D1";}
if(c=="X"){t="D2";}
if(c=="Y"){t="D3";}
if(c=="Z"){t="D4";}
if(c=="a"){t="D5";}
if(c=="b"){t="D6";}
if(c=="c"){t="D7";}
if(c=="d"){t="D8";}
if(c=="e"){t="D9";}
if(c=="f"){t="DA";}
if(c=="g"){t="DB";}
if(c=="h"){t="DC";}
if(c=="i"){t="DD";}
if(c=="j"){t="DE";}
if(c=="k"){t="DF";}
if(c=="l"){t="E0";}
if(c=="m"){t="E1";}
if(c=="n"){t="E2";}
if(c=="o"){t="E3";}
if(c=="p"){t="E4";}
if(c=="q"){t="E5";}
if(c=="r"){t="E6";}
if(c=="s"){t="E7";}
if(c=="t"){t="E8";}
if(c=="u"){t="E9";}
if(c=="v"){t="EA";}
if(c=="w"){t="EB";}
if(c=="x"){t="EC";}
if(c=="y"){t="ED";}
if(c=="z"){t="EE";}
return t;
}

function PokeToChar(i){
var t=" ";
var c=" ";
c=i.toUpperCase();
t="#"+c;
if(c=="00"){t=" ";}
if(c=="A1"){t="0";}
if(c=="A2"){t="1";}
if(c=="A3"){t="2";}
if(c=="A4"){t="3";}
if(c=="A5"){t="4";}
if(c=="A6"){t="5";}
if(c=="A7"){t="6";}
if(c=="A8"){t="7";}
if(c=="A9"){t="8";}
if(c=="AA"){t="9";}
if(c=="AB"){t="!";}
if(c=="AC"){t="?";}
if(c=="AD"){t=".";}
if(c=="AE"){t="-";}
if(c=='B1'){t=":";}
if(c=="B3"){t=";";}
// $ pokemoney
if(c=="B7"){t="$";}
if(c=="B8"){t=",";}
// * times sympol
if(c=="B9"){t="*";}
if(c=="BA"){t="/";}
if(c=="BB"){t="A";}
if(c=="BC"){t="B";}
if(c=="BD"){t="C";}
if(c=="BE"){t="D";}
if(c=="BF"){t="E";}
if(c=="C0"){t="F";}
if(c=="C1"){t="G";}
if(c=="C2"){t="H";}
if(c=="C3"){t="I";}
if(c=="C4"){t="J";}
if(c=="C5"){t="K";}
if(c=="C6"){t="L";}
if(c=="C7"){t="M";}
if(c=="C8"){t="N";}
if(c=="C9"){t="O";}
if(c=="CA"){t="P";}
if(c=="CB"){t="Q";}
if(c=="CC"){t="R";}
if(c=="CD"){t="S";}
if(c=="CE"){t="T";}
if(c=="CF"){t="U";}
if(c=="D0"){t="V";}
if(c=="D1"){t="W";}
if(c=="D2"){t="X";}
if(c=="D3"){t="Y";}
if(c=="D4"){t="Z";}
if(c=="D5"){t="a";}
if(c=="D6"){t="b";}
if(c=="D7"){t="c";}
if(c=="D8"){t="d";}
if(c=="D9"){t="e";}
if(c=="DA"){t="f";}
if(c=="DB"){t="g";}
if(c=="DC"){t="h";}
if(c=="DD"){t="i";}
if(c=="DE"){t="j";}
if(c=="DF"){t="k";}
if(c=="E0"){t="l";}
if(c=="E1"){t="m";}
if(c=="E2"){t="n";}
if(c=="E3"){t="o";}
if(c=="E4"){t="p";}
if(c=="E5"){t="q";}
if(c=="E6"){t="r";}
if(c=="E7"){t="s";}
if(c=="E8"){t="t";}
if(c=="E9"){t="u";}
if(c=="EA"){t="v";}
if(c=="EB"){t="w";}
if(c=="EC"){t="x";}
if(c=="ED"){t="y";}
if(c=="EE"){t="z";}
return t;
}

function NMO(n){
var f=document.PokemonForm;
var M1=f.Move1; var M2=f.Move2; var M3=f.Move3; var M4=f.Move4;
var ln=" "; var o=0; var l=0; var m=0; var w=0; var t=" ";
var tn=0; var tname=" ";
f.LogC.value+="Tri d'attaques : "+n+"\r\n";
if(n=='1'){o=f.M1O.selectedIndex;}
if(n=='2'){o=f.M2O.selectedIndex;}
if(n=='3'){o=f.M3O.selectedIndex;}
if(n=='4'){o=f.M4O.selectedIndex;}
// Alpha
if(o==1){
ln="~71~51~151~332~177~97~314~133~246~292~312~274~310~213~62~140~112~226~251~187";
ln+="~117~20~44~307~299~59~335~34~125~198~155~340~280~145~61~339~331~347~293~268";
ln+="~204~128~4~109~93~132~160~176~322~178~68~343~152~238~242~306~174~15~111~194";
ln+="~197~91~50~291~146~353~24~104~38~3~337~349~82~225~138~65~223~89~121~52";
ln+="~227~283~203~284~153~326~245~263~185~252~313~206~297~126~7~83~90~175~172~53";
ln+="~148~260~19~116~264~266~193~338~218~31~210~154~248~202~137~320~45~74~288~12";
ln+="~16~258~106~114~29~215~257~270~136~237~30~32~336~308~56~63~158~304~95~301";
ln+="~58~8~333~196~286~275~334~231~26~2~134~282~348~141~73~43~122~113~199~142";
ln+="~67~295~183~277~345~222~212~96~72~25~5~224~262~232~319~309~118~208~102~170";
ln+="~107~243~119~54~296~236~234~341~300~189~330~267~302~101~171~190~316~200~315~220";
ln+="~6~64~195~80~42~305~139~40~342~77~1~181~217~182~60~244~94~354~149~228";
ln+="~98~99~240~229~75~13~105~278~115~287~156~216~279~179~46~350~157~249~88~317";
ln+="~272~27~205~221~219~328~28~201~184~10~103~290~69~120~247~325~356~159~329~351";
ln+="~324~318~47~166~285~130~143~327~303~21~163~79~214~124~188~265~123~108~289~173";
ln+="~135~76~49~209~169~131~191~255~180~150~147~211~254~23~70~81~165~78~66~164";
ln+="~241~162~276~48~57~207~256~186~230~129~14~235~33~294~39~36~269~298~100~168";
ln+="~37~87~86~85~9~84~321~259~92~144~161~271~167~41~239~253~11~22~233~344";
ln+="~55~352~346~323~127~311~250~18~261~17~273~110~35~281~192~-1~";}
// ???
if(o==2){ln="~174~-1~";}
// Fighting
if(o==3){
ln="~292~280~339~68~238~197~24~223~264~136~26~2~67~183~279~179~249~27~69~327";
ln+="~66~276~167~233~-1~";}
// Flying
if(o==4){ln="~332~177~314~340~65~297~19~16~119~64~143~17~-1~";}
// Poison
if(o==5){ln="~51~151~305~139~40~342~77~124~188~123~92~-1~";}
// Ground
if(o==6){ln="~125~198~155~91~89~90~222~341~300~189~328~28~191~-1~";}
// Rock
if(o==7){ln="~246~350~157~88~317~205~201~-1~";}
// Bug
if(o==8){ln="~210~141~224~42~324~318~169~81~294~41~-1~";}
// Ghost
if(o==9){ln="~310~109~194~288~122~101~171~247~325~180~-1~";}
// Steel
if(o==10){ln="~353~334~231~232~319~309~211~-1~";}
// Fire
if(o==11){ln="~307~299~52~284~126~7~83~172~53~257~315~221~241~261~-1~";}
// Water
if(o==12){ln="~145~61~128~152~291~308~56~330~190~240~57~55~352~346~323~127~250~110~-1";}
// Grass
if(o==13){ln="~71~312~331~178~338~202~320~275~348~73~345~72~302~80~75~79~76~147~78~235~22~-1~";}
// Electric
if(o==14){ln="~268~351~209~87~86~85~9~84~344~192~-1~";}
// Psychic
if(o==15){
ln="~97~133~112~347~93~322~138~326~248~95~286~134~113~295~277~96~243~296~60~94";
ln+="~354~149~115~156~272~285~100~271~-1";}
// Ice
if(o==16){ln="~62~59~258~114~301~58~8~333~196~54~181~329~-1~";}
// Dragon
if(o==17){ln="~337~349~82~225~200~239~-1~";}
// Dark
if(o==18){ln="~251~44~242~185~313~260~282~262~228~289~269~168~259~-1~";}
// Normal
if(o==19){
ln="~274~213~140~226~187~117~20~335~34~293~204~4~132~160~176~343~306~15~111~50";
ln+="~146~104~38~3~121~227~283~203~153~245~263~252~206~175~148~116~266~193~218~31";
ln+="~154~137~45~74~12~106~29~215~270~237~30~32~336~63~158~304~43~199~142~212";
ln+="~25~5~118~208~102~170~107~236~234~267~316~220~6~195~1~217~182~244~98~99";
ln+="~229~13~105~278~287~216~46~219~184~10~103~290~120~159~47~166~130~303~21~163";
ln+="~214~265~108~173~135~49~131~255~150~254~23~70~165~164~162~48~207~256~186~230";
ln+="~129~14~33~39~36~298~37~321~144~161~253~11~311~18~273~35~281~-1~";}
// TMs/HMs
if(o==20){
ln="~264~337~352~347~46~92~258~339~331~237~241~269~58~59~63~113~182~240~202~219";
ln+="~218~76~231~85~87~89~216~91~94~325~280~104~115~351~53~188~201~126~317~332";
ln+="~259~263~290~156~213~168~211~285~289~315~15~19~57~70~148~249~127~291~-1~";}
// vs 2 Moves
if(o==21){
ln="~51~314~59~145~89~284~153~45~258~114~257~304~196~43~222~300~330~195~181~240";
ln+="~75~13~157~201~120~81~241~57~230~129~39~298~239~253~323~-1~";}
// Cool
if(o==22){
ln="~332~97~112~280~331~322~238~306~15~197~146~24~104~337~349~82~225~65~223~326";
ln+="~245~206~116~31~210~12~136~30~32~336~63~304~231~348~43~183~224~232~309~200";
ln+="~64~42~98~99~229~75~13~179~46~351~143~327~163~76~49~209~131~211~66~129";
ln+="~100~87~86~85~9~84~239~233~17~192~-1~";}
// Beauty
if(o==23){
ln="~62~299~59~61~339~178~291~52~284~153~126~7~83~148~74~258~114~215~257~5";
ln+="~6~301~58~8~196~113~277~345~212~96~243~54~236~234~267~315~195~80~181~60";
ln+="~219~120~329~324~318~147~241~57~14~294~161~352~323~250~261~-1~";}
// Cute
if(o==24){
ln="~133~274~213~226~187~335~340~145~204~343~111~227~263~252~175~218~45~102~107~300";
ln+="~189~182~287~156~216~272~28~47~303~214~173~150~207~186~230~39~298~321~253~55";
ln+="~346~273~281~-1~";}
// Smart
if(o==25){
ln="~71~51~312~310~347~293~268~109~93~194~91~50~138~185~313~260~19~193~248~202";
ln+="~16~270~237~95~286~275~134~282~141~73~199~295~72~319~170~119~296~302~101~316";
ln+="~305~139~40~342~77~244~94~149~228~105~115~317~328~103~290~247~325~285~79~265";
ln+="~108~289~191~81~78~164~48~235~269~92~271~311~18~-1~";}
// Tough
if(o==26){
ln="~151~246~292~117~20~44~34~128~132~68~152~242~174~38~3~89~283~203~90~264";
ln+="~154~137~288~106~29~334~2~122~67~222~262~341~330~1~240~279~350~157~249~88";
ln+="~205~201~184~10~69~130~21~124~188~123~255~180~254~23~70~276~256~33~36~168";
ln+="~37~259~11~127~35~-1~";}
l=0;
m=0;
w=0;
if(n=='1'){M1.options.lenght=0;}
if(n=='2'){
M2.options.lenght=0;
M2.options[m]= new Option("Pas d'attaque","0",true);
m+=1;
}
if(n=='3'){
M3.options.lenght=0;
M3.options[m]= new Option("Pas d'attaque","0",true);
m+=1;
}
if(n=='4'){
M4.options.lenght=0;
M4.options[m]= new Option("Pas d'attaque","0",true);
m+=1;
}
while(l==0){
w+=1;
if(o==0){
 if(w>354){w=-1;}
 t=parseInt(w,10);
}else{
 t=FI(ln,"~",w);
}
if(t=="-1"){
 if(n=='1'){
  M1.options.length=m;
  M1.selectedIndex=0;
 }
 if(n=='2'){
  M2.options.length=m;
  M2.selectedIndex=0;
 }
 if(n=='3'){
  M3.options.length=m;
  M3.selectedIndex=0;
 }
 if(n=='4'){
  M4.options.length=m;
  M4.selectedIndex=0;
 }
 t=NMove(n);
 l=1;
}else{
 tn=1*t;
 tname=MoveDex(tn,1);
 if(n=='0' && m==1){
  M1.options[m]= new Option(tname,t,true);
 }else{
  if(n=='1'){M1.options[m] = new Option(tname,t);}
  if(n=='2'){M2.options[m] = new Option(tname,t);}
  if(n=='3'){M3.options[m] = new Option(tname,t);}
  if(n=='4'){M4.options[m] = new Option(tname,t);}
 }
 m+=1;
}}
f.LogC.value+="Fin du tri\r\n";
return t;
}

function NPO(){
var f=document.PokemonForm;
var P1=f.Species;
var ln=" "; var o=0; var l=0; var m=0; var w=0; var t=" "; var t2=" ";
var tn=0; var tname=" ";
f.LogC.value+="Tri par pokemon\r\n";
o=f.P1O.selectedIndex;
// Alpha
if(o==1){
ln="~63~376~142~384~190~65~359~181~390~24~59~168~391~382~144~184~350~395~318~378";
ln+="~323~153~292~15~398~182~69~9~282~242~307~1~12~344~345~340~330~293~385~10";
ln+="~251~113~6~4~5~152~411~170~373~319~36~35~173~91~281~326~222~389~327~169";
ln+="~159~104~155~316~225~410~87~50~132~85~84~232~148~149~147~96~51~206~362~361";
ln+="~294~133~23~125~337~101~239~244~196~102~103~372~83~22~328~160~180~136~334~205";
ln+="~162~394~92~94~74~203~347~207~44~42~118~55~76~375~210~75~88~405~278~58";
ln+="~352~367~130~336~93~214~107~106~237~250~163~187~116~229~228~374~97~174~387~2";
ln+="~39~409~135~189~124~140~141~64~14~115~317~230~99~393~109~98~404~383~171~131";
ln+="~246~407~408~166~165~108~388~289~296~295~371~297~249~348~325~68~67~66~240~219";
ln+="~129~126~81~82~335~338~56~226~179~183~105~284~312~355~357~356~154~52~400~399";
ln+="~11~151~150~287~329~241~354~200~146~122~283~89~198~177~34~31~29~32~30~33";
ln+="~301~38~302~164~320~339~299~224~43~138~139~95~46~47~310~53~231~172~18~17";
ln+="~16~25~221~204~127~353~186~60~61~62~77~286~137~233~57~54~247~195~156~211";
ln+="~26~243~392~78~20~19~406~402~401~403~381~223~112~111~363~322~397~27~28~279";
ln+="~212~123~117~119~342~298~86~161~379~331~303~396~90~300~306~213~377~291~227~188";
ln+="~315~366~364~80~199~79~218~235~238~215~143~346~209~349~21~341~167~308~351~7";
ln+="~234~121~120~208~185~245~192~191~311~358~368~285~305~220~304~114~128~216~72~73";
ln+="~175~176~280~321~158~332~277~369~157~248~236~197~201~217~134~49~48~3~333~71";
ln+="~365~45~386~100~37~313~314~343~8~13~70~110~324~370~40~309~202~194~290~360";
ln+="~178~193~380~145~288~41~-1~";}
// Fighting
if(o==2){ln="~282~307~281~336~214~107~106~237~68~67~66~335~56~357~356~62~57~236~-1~";}
// Flying
if(o==3){
ln="~142~359~144~292~12~6~169~225~85~84~149~83~22~207~42~130~250~163~187~189";
ln+="~166~165~249~226~312~146~198~177~302~164~310~18~17~16~406~397~123~227";
ln+="~188~21~358~305~304~176~369~309~178~193~145~41~-1~";}
// Poison
if(o==4){
ln="~24~168~15~69~1~169~294~23~92~94~44~42~88~367~93~2~14~109~89~34";
ln+="~31~29~32~30~33~43~211~363~379~167~368~72~73~49~48~3~71~45~13~70";
ln+="~110~41~-1~";}
// Ground
if(o==5){
ln="~318~323~340~319~334~74~207~76~75~246~284~34~31~301~339~95~221~247~195~112";
ln+="~111~208~285~220~333~324~194~-1~";}
// Rock
if(o==6){
ln="~142~384~390~391~382~222~389~74~76~75~140~141~383~246~388~348~219~320";
ln+="~138~139~95~247~401~381~112~111~213~349~185~248~-1~";}
// Bug
if(o==7){
ln="~390~168~391~292~15~12~293~10~294~205~214~387~14~166~165~312~11~301~302~46";
ln+="~47~204~127~212~123~303~213~291~167~311~49~48~386~13~290~193~-1~";}
// Ghost
if(o==8){ln="~378~362~361~92~94~93~200~322~303~377~-1~";}
// Steel
if(o==9){ln="~384~382~398~205~409~383~81~82~355~400~399~403~212~227~208~-1~";}
// Fire
if(o==10){
ln="~59~282~340~6~4~5~281~155~244~136~58~250~229~228~240~219~126~146~38~339";
ln+="~77~156~78~218~280~321~157~37~-1~";}
// Water
if(o==11){
ln="~184~323~9~330~170~373~91~326~222~327~159~87~328~160~118~55~375~130~116~374";
ln+="~140~141~230~99~98~404~171~131~296~295~297~325~129~226~183~284~329~283~224~138";
ln+="~139~310~186~60~61~62~54~195~211~381~223~117~119~342~86~331~90~80~199~79";
ln+="~341~7~121~120~245~311~285~72~73~158~134~313~314~343~8~324~309~194~-1~";}
// Grass
if(o==12){
ln="~153~182~69~307~1~344~345~251~152~389~102~103~44~278~187~2~189~388~296~295~297";
ln+="~154~299~43~46~47~363~279~298~300~306~188~192~191~114~277~369~3~71~45~70~-1~";}
// Electric
if(o==13){ln="~181~170~125~337~101~239~180~135~171~81~82~338~179~354~172~25~353~26~243~100~145~-1~";}
// Psychic
if(o==14){
ln="~63~65~318~398~251~411~319~410~96~196~102~103~394~203~352~97~409~124~64~393";
ln+="~407~408~249~348~357~356~400~399~151~150~122~177~392~80~199~79~238~349~351~121";
ln+="~201~202~360~178~-1~";}
// Ice
if(o==15){ln="~144~91~225~87~347~124~131~221~402~342~238~215~346~341~220~343~-1~";}
// Dragon
if(o==16){ln="~359~395~148~149~147~334~230~407~408~406~397~396~333~-1~";}
// Dark
if(o==17){ln="~376~345~330~327~229~228~287~198~299~286~322~331~300~215~248~197~-1~";}
// Normal
if(o==18){
ln="~190~350~242~385~113~36~35~173~316~132~85~84~206~133~372~83~22~162~203~210";
ln+="~163~174~39~115~317~108~289~371~52~241~164~53~18~17~16~137~233~20~19~161";
ln+="~315~366~364~235~143~209~21~308~234~358~305~304~128~216~175~176~217~365~370~40";
ln+="~380~288~-1~";}
// Hoen
if(o==19){
ln="~277~278~279~280~281~282~283~284~285~286~287~288~289~290~291~292~293~294~295~296";
ln+="~297~298~299~300~304~305~309~310~392~393~394~311~312~306~307~364~365~366~63~64";
ln+="~65~301~302~303~370~371~372~335~336~118~119~129~130~350~183~184~74~75~76~320";
ln+="~315~316~41~42~169~72~73~322~355~382~383~384~66~67~68~356~357~337~338~353";
ln+="~354~81~82~100~101~386~387~43~44~45~182~84~85~363~367~368~330~331~313~314";
ln+="~339~340~218~219~321~88~89~109~110~351~352~27~28~308~227~332~333~334~344~345";
ln+="~358~359~380~379~348~349~323~324~326~327~318~319~388~389~390~391~174~39~40~328";
ln+="~329~385~120~121~317~377~378~361~362~369~411~376~37~38~172~25~26~54~55~360";
ln+="~202~177~178~203~231~232~127~214~111~112~346~347~341~342~343~373~374~375~381~222";
ln+="~170~171~325~116~117~230~395~396~397~398~399~400~401~402~403~407~408~404~405~406~-1~";}
// Kanto/National
if(o==20||o==21){
ln="~1~2~3~4~5~6~7~8~9~10~11~12~13~14~15~16~17~18~19~20";
ln+="~21~22~23~24~25~26~27~28~29~30~31~32~33~34~35~36~37~38~39~40";
ln+="~41~42~43~44~45~46~47~48~49~50~51~52~53~54~55~56~57~58~59~60";
ln+="~61~62~63~64~65~66~67~68~69~70~71~72~73~74~75~76~77~78~79~80";
ln+="~81~82~83~84~85~86~87~88~89~90~91~92~93~94~95~96~97~98~99~100";
ln+="~101~102~103~104~105~106~107~108~109~110~111~112~113~114~115~116~117~118~119~120";
ln+="~121~122~123~124~125~126~127~128~129~130~131~132~133~134~135~136~137~138~139~140";
ln+="~141~142~143~144~145~146~147~148~149~150~151~152~153~154~155~156~157~158~159~160";
ln+="~161~162~163~164~165~166~167~168~169~170~171~172~173~174~175~176~177~178~179~180";
ln+="~181~182~183~184~185~186~187~188~189~190~191~192~193~194~195~196~197~198~199~200";
ln+="~201~202~203~204~205~206~207~208~209~210~211~212~213~214~215~216~217~218~219~220";
ln+="~221~222~223~224~225~226~227~228~229~230~231~232~233~234~235~236~237~238~239~240";
ln+="~241~242~243~244~245~246~247~248~249~250~251";
if(o==20){ln+="~-1~";}
if(o==21){
ln+="277~278~279~280~281~282~283~284~285~286~287~288~289~290~291~292~293~294~295~296";
ln+="~297~298~299~300~304~305~309~310~392~393~394~311~312~306~307~364~365~366~301~302";
ln+="~303~370~371~372~335~336~350~320~315~316~322~355~382~383~384~356~357~337~338~353";
ln+="~354~386~387~363~367~368~330~331~313~314~339~340~321~351~352~308~332~333~334~344";
ln+="~345~358~359~380~379~348~349~323~324~326~327~318~319~388~389~390~391~328~329~385";
ln+="~317~377~378~361~362~369~411~376~360~346~347~341~342~343~373~374~375~381~325~395";
ln+="~396~397~398~399~400~401~402~403~407~408~404~405~406~409~410~-1~";}}
l=0;
m=0;
w=0;
P1.options.lenght=0;
while(l==0){
 w+=1;
 if(o==0){
  if(w==252){w+=25;}
  if(w>411){w=-1;}
  t=parseInt(w,10);
 }else{
  t=FI(ln,"~",w);
 }
 if(t=="-1"){
  P1.options.length=m;
  P1.selectedIndex=0;
  t=NewPoke();
  l=1;
 }else{
  tn=1*t;
  t2=PokeDex(tn);
  tname=FI(t2,"~",3);
  if(m==0){
   P1.options[m]= new Option(tname,t,true);
  }else{
   P1.options[m]= new Option(tname,t);
  }
  m+=1;
 }
}
f.LogC.value+="Fin du tri\r\n";
return t;
}

function NIO(){
var f=document.PokemonForm;
var H1=f.Held;
var ln=" "; var o=0; var l=0; var m=0; var w=0; var t=" "; var t2=" ";
var tname=" ";
f.LogC.value+="Tri par objet\r\n";
o=f.Isort.selectedIndex;
if(o==0){
// Num
ln="~000~001~002~003~004~005~006~007~008~009~00A~00B~00C~00D~00E~00F~010~011~012~013~014";
ln+="~015~016~017~018~019~01A~01B~01C~01D~01E~01F~020~021~022~023~024~025~026~027~028";
ln+="~029~02A~02B~02C~02D~02E~02F~030~031~032~033~03F~040~041~042~043~044~045~046~047";
ln+="~049~04A~04B~04C~04D~04E~04F~050~051~053~054~055~056~05D~05E~05F~060~061~062~067";
ln+="~068~06A~06B~06C~06D~06E~06F~079~07A~07B~07C~07D~07E~07F~080~081~082~083~084~085";
ln+="~086~087~088~089~08A~08B~08C~08D~08E~08F~090~091~092~093~094~095~096~097~098~099";
ln+="~09A~09B~09C~09D~09E~09F~0A0~0A1~0A2~0A3~0A4~0A5~0A6~0A7~0A8~0A9~0AA~0AB~0AC~0AD";
ln+="~0AE~0AF~0B3~0B4~0B5~0B6~0B7~0B8~0B9~0BA~0BB~0BC~0BD~0BE~0BF~0C0~0C1~0C2~0C3~0C4";
ln+="~0C5~0C6~0C7~0C8~0C9~0CA~0CB~0CC~0CD~0CE~0CF~0D0~0D1~0D2~0D3~0D4~0D5~0D6~0D7~0D8";
ln+="~0D9~0DA~0DB~0DC~0DD~0DE~0DF~0E0~0E1~0FE~0FF~100~101~102~103~104~105~106~107~108";
ln+="~109~10A~10C~10D~10E~10F~110~111~112~113~114~115~116~117~118~119~11A~11B~11C~11D";
ln+="~11E~11F~120~121~122~123~124~125~126~127~128~129~12A~12B~12C~12D~12E~12F~130~131";
ln+="~132~133~134~135~136~137~138~139~13A~13B~13C~13D~13E~13F~140~141~142~143~144~145";
ln+="~146~147~148~149~14A~14B~14C~14D~14E~14F~150~151~152~153~154~155~156~157~158~159";
ln+="~15A~15D~15E~15F~160~161~162~163~164~165~166~167~168~169~16A~16B~16C~16D~16E~16F";
ln+="~170~171~172~173~174~175~176~177~178~1F4~1F5~1F6~1F7~1F8~1F9~1FA~1FB~1FC~1FD~1FE~1FF~200";
ln+="~201~202~203~204~205~206~207~208~209~20A~20B~20C~20D~20E~20F~210~211~212~213~214";
ln+="~215~216~217~218~219~21A~21B~21C~21D~21E~21F~220~221~222~223~224~225~226~227~228";
ln+="~229~22A~22B~22C~22D~22E~22F~230~231~232~233~234~235~236~237~238~239~23A~23B~23C";
ln+="~23D~23E~23F~240~241~242~243~244~245~246~247~248~249~24A~24B~24C~24D~24E~24F~250";
ln+="~251~-1~";}
// Alpha
if(o==1){
ln="~000~110~092~0BD~00E~0AC~089";
ln+="~011~10F~07F~0A7~02C~068~06B~0CF~02A~0CE~027~115~0FF~031~095~0B3~00F~043~042~0D7";
ln+="~085~086~0BA~11F~0BE~104~10A~09F~0C1~0C0~120~10D~04A~007~0D8~0C9~082~0A6~024~01E";
ln+="~01F~0AF~113~055~022~0C3~0B6~083~08F~05F~051~0C4~01A~017~013~0A9~07B~117~107~003";
ln+="~101~033~09D~049~07A~0CC~020~06F~153~154~155~156~157~158~159~15A~09C~03F~015~093";
ln+="~010~041~105~09A~0BB~0AD~026~0DD~062~0C8~01C~08A~112~0A8~0CA~0C5~0DE~08D~00B~103";
ln+="~0B5~0D0~091~0A0~001~025~023~014~054~019~07C~0B9~0C7~0DF~118~0CD~01D~05E~0D1~096";
ln+="~008~006~0D4~0A2~06E~106~08B~079~0A4~012~06A~087~08C~0AB~098~100~0D3~004~050~111";
ln+="~099~00D~047~045~00C~040~09B~0B7~0A1~044~088~094~029~114~0FE~030~009~056~084~021";
ln+="~018~119~11A~11B~11C~11E~109~02D~005~0AA~116~0C6~0DC~080~0D2~0DB~02E~02F~0D9~0BC";
ln+="~08E~0C2~01B~0CB~10E~0B8~0BF~0D5~0A3~06D~06C~0AE~0E1~11D~05D~016~053~108~09E~0E0";
ln+="~060~00A~067~121~122~123~124~125~126~127~128~129~12A~12B~12C~12D~12E~12F~130~131";
ln+="~132~133~134~135~136~137~138~139~13A~13B~13C~13D~13E~13F~140~141~142~143~144~145";
ln+="~146~147~148~149~14A~14B~14C~14D~14E~14F~150~151~152~081~0D6~002~0DA~10C~061~0A5";
ln+="~07E~097~02B~0B4~090~07D~04E~04B~04C~04F~04D~028~102~032~046~";
ln+="~201~217~1FE~21E~205~1FA~212~200~202~204~206~208~20A~20C~20E~210~1FF~21C~223~21B";
ln+="~21D~21A~1F5~20F~220~1F7~214~216~1F4~21F~1F9~1FD~20B~209~222~203~1F8~20D~215~1F6";
ln+="~213~1FC~207~211~219~1FB~221~218~173~16A~16D~168~160~163~165~164~161~166~16E~174";
ln+="~172~15D~162~15E~170~175~176~15F~167~171~16C~169~16F~16B~177~178~-1~";}
// Ball
if(o==2){
ln="~000~001~002~003~004~005~006~007~008~009~00A~00B~00C~-1~";}
// Berry
if(o==3){
ln="~000~092~0AC~089~0A7~095~085~086~09F~0A6~0AF~08F~0A9~09D~09C~093~09A~0AD~08A~0A8~08D";
ln+="~091~0A0~096~0A2~08B~0A4~087~08C~0AB~098~099~09B~0A1~088~094~0AA~08E~0A3~0AE~09E";
ln+="~0A5~097~090~-1~";}
// Key
if(o==4){
ln="~000~201~217~1FE~21E~205~1FA~212~200~202~204~206~208~20A~20C~20E~210~1FF~21C~223~21B";
ln+="~21D~21A~1F5~20F~220~1F7~214~216~1F4~21F~1F9~1FD~20B~209~222~203~1F8~20D~215~1F6";
ln+="~213~1FC~207~211~219~1FB~221~218~173~16A~16D~168~160~163~165~164~161~166~16E~174";
ln+="~172~15D~162~15E~170~175~176~15F~167~171~16C~169~16F~16B~110~10F~115~11F~104~10A";
ln+="~120~10D~113~117~107~105~112~103~118~106~111~114~119~11A~11B~11C~11E~109~116~10E";
ln+="~11D~108~10C~177~178~224~225~226~227~228~229~22A~22B~22C~22D~22E~22F~230~231~232";
ln+="~233~234~235~236~237~238~239~23A~23B~23C~23D~23E~23F~240~241~242~243~244~245~246";
ln+="~247~248~249~24A~24B~24C~24D~24E~24F~250~251~-1~";}
// Hold
if(o==5){
ln="~000~0BD~0CF~0CE~0FF~0B3~0D7~0BA~0BE~0C1~0C0~0D8~0C9~0C3~0B6~0C4~101~0CC~0BB~0DD~0C8";
ln+="~0CA~0C5~0DE~0B5~0D0~0B9~0C7~0DF~0CD~0D1~0D4~100~0D3~0B7~0FE~0C6~0DC~0D2~0DB~0D9";
ln+="~0BC~0C2~0CB~0B8~0BF~0D5~0E1~0E0~0D6~0DA~0B4~102~-1~";}
// TM
if(o==6){
ln="~000~121~122~123~124~125~126~127~128~129~12A~12B~12C~12D~12E~12F~130~131~132~133~134";
ln+="~135~136~137~138~139~13A~13B~13C~13D~13E~13F~140~141~142~143~144~145~146~147~148";
ln+="~149~14A~14B~14C~14D~14E~14F~150~151~152~153~154~155~156~157~158~159~15A~-1~";}
// Disc
if(o==7){
ln="~216~217~218~219~21A~21B~21C~21D~21E~21F~220~221~222~223~224~225~226~227~228~229";
ln+="~22A~22B~22C~22D~22E~22F~230~231~232~233~234~235~236~237~238~239~23A~23B~23C~23D";
ln+="~23E~23F~240~241~242~243~244~245~246~247~248~249~24A~24B~24C~24D~24E~24F~250~251~-1~";}
l=0;
m=0;
w=0;
H1.options.lenght=0;
while(l==0){
 w+=1;
 t=FI(ln,"~",w);
 if(t=="-1"){
  H1.options.length=m;
  H1.selectedIndex=0;
  t=ItemC();
  l=1;
 }else{
  tname=ItemDex(t,3);
  if(m==0){
   H1.options[m]= new Option(tname,t,true);
  }else{
   H1.options[m]= new Option(tname,t);
  }
  m+=1;
 }
}
f.LogC.value+="Fin du tri\r\n";
return t;
}

function NLO(){
var f=document.PokemonForm;
var H1=f.Loc;
var ln=" "; var o=0; var l=0; var m=0; var w=0; var t=" "; var t2=" ";
var tname=" ";
f.LogC.value+="Par Locations\r\n";
o=f.Lsort.selectedIndex;
// Num
if(o==0){
ln="~00~01~02~03~04~05~06~07~08~09~0A~0B~0C~0D~0E~0F";
ln+="~10~11~12~13~14~15~16~17~18~19~1A~1B~1C~1D~1E~1F";
ln+="~20~21~22~23~24~25~26~27~28~29~2A~2B~2C~2D~2E~2F";
ln+="~30~31~32~33~34~35~36~37~38~39~3A~3B~3C~3D~3E~3F";
ln+="~40~41~42~43~44~45~46~47~48~49~4A~4B~4C~4D~4E~4F";
ln+="~50~51~52~53~54~55~56~57~58~59~5A~5B~5C~5D~5E~5F";
ln+="~60~61~62~63~64~65~66~67~68~69~6A~6B~6C~6D~6E~6F";
ln+="~70~71~72~73~74~75~76~77~78~69~7A~7B~7C~7D~7E~7F";
ln+="~80~81~82~83~84~85~86~87~88~89~8A~8B~8C~8D~8E~8F";
ln+="~90~91~92~93~94~95~96~97~98~99~9A~9B~9C~9D~9E~9F";
ln+="~A0~A1~A2~A3~A4~A5~A6~A7~A8~A9~AA~AB~AC~AD~AE~AF";
ln+="~B0~B1~B2~B3~B4~B5~B6~B7~B8~B9~BA~BB~BC~BD~BE~BF";
ln+="~C0~C1~C2~C3~C4~C5~C6~C7~C8~C9~CA~CB~CC~CD~CE~CF";
ln+="~D0~D1~D2~D3~D4~D5~D6~D7~D8~D9~DA~DB~DC~DD~DE~DF";
ln+="~E0~E1~E2~E3~E4~E5~E6~E7~E8~E9~EA~EB~EC~ED~EE~EF";
ln+="~F0~F1~F2~F3~F4~F5~F6~F7~F8~F9~FA~FB~FC~FD~FE~FF";
ln+="~-1~";}
// Ruby/Sapphire
if(o==1){
ln="~00~01~02~03~04~05~06~07~08~09~0A~0B~0C~0D~0E~0F";
ln+="~10~11~12~13~14~15~16~17~18~19~1A~1B~1C~1D~1E~1F";
ln+="~20~21~22~23~24~25~26~27~28~29~2A~2B~2C~2D~2E~2F";
ln+="~30~31~32~33~34~35~36~37~38~39~3A~3B~3C~3D~3E~3F";
ln+="~40~41~42~43~44~45~46~47~48~49~4A~4B~4C~4D~4E~4F";
ln+="~50~51~52~53~54~55~56~57~FE~FF~-1~";}
// Emerald
if(o==2){
ln="~00~01~02~03~04~05~06~07~08~09~0A~0B~0C~0D~0E~0F";
ln+="~10~11~12~13~14~15~16~17~18~19~1A~1B~1C~1D~1E~1F";
ln+="~20~21~22~23~24~25~26~27~28~29~2A~2B~2C~2D~2E~2F";
ln+="~30~31~32~33~34~35~36~37~38~39~3A~3B~3C~3D~3E~3F";
ln+="~40~41~42~43~44~45~46~47~48~49~4A~4B~4C~4D~4E~4F";
ln+="~50~51~52~53~54~55~56~57";
ln+="~C5~C6~C7~C8~C9~CA~CB~CC~CD~CE~CF";
ln+="~D0~D1~D2~D3~D4~FE~FF~-1~";}
// Fire/Green
if(o==3){
ln="~58~59~5A~5B~5C~5D~5E~5F";
ln+="~60~61~62~63~64~65~66~67~68~69~6A~6B~6C~6D~6E~6F";
ln+="~70~71~72~73~74~75~76~77~78~69~7A~7B~7C~7D~7E~7F";
ln+="~80~81~82~83~84~85~86~87~88~89~8A~8B~8C~8D~8E~8F";
ln+="~90~91~92~93~94~95~96~97~98~99~9A~9B~9C~9D~9E~9F";
ln+="~A0~A1~A2~A3~A4~A5~A6~A7~A8~A9~AA~AB~AC~AD~AE~AF";
ln+="~B0~B1~B2~B3~B4~B5~B6~B7~B8~B9~BA~BB~BC~BD~BE~BF";
ln+="~C0~C1~C2~C3~C4~FE~FF~-1~";}
// Colosseum
if(o==4){
ln="~00~01~02~03~04~05~06~07~08~09~0A~0B~0C~0D~0E~0F";
ln+="~10~11~12~13~14~15~16~17~18~19~1A~1B~1C~1D~1E~1F";
ln+="~20~21~22~23~24~25~26~27~28~29~2A~2B~2C~2D~2E~2F";
ln+="~30~31~32~33~34~35~36~37~38~39~3A~3B~3C~3D~3E~3F";
ln+="~40~41~42~43~44~45~46~47~48~49~4A~4B~4C~4D~4E~4F";
ln+="~50~51~52~53~54~55~56~57~58~59~5A~5B~5C~5D~5E~5F";
ln+="~60~61~62~63~64~65~66~67~68~69~6A~6B~6C~6D~6E~6F";
ln+="~70~71~72~73~74~75~76~77~78~69~7A~7B~7C~7D~7E~7F";
ln+="~80~81~82~83~84~85~86~87~88~89~8A~8B~8C~8D~8E~8F";
ln+="~FE~FF";
ln+="~-1~";}
// XD
if(o==5){
ln="~00~09~10~0A~0B";
ln+="~40~41~42~43~44~45~46~47~49~4A~4B~4C~4D";
ln+="~50~51~54~55~57~58~5A~5B~5C~5E";
ln+="~64~6B~6D~6E~6F~77~8F~99";
ln+="~A2~A4~FE~FF~-1~";}
l=0;
m=0;
w=0;
H1.options.lenght=0;
while(l==0){
 w+=1;
 t=FI(ln,"~",w);
 if(t=="-1"){
  H1.options.length=m;
  H1.selectedIndex=0;
  l=1;
 }else{
  tname=LocDex(t,o);
  if(m==0){
   H1.options[m]= new Option(tname,t,true);
  }else{
   H1.options[m]= new Option(tname,t);
  }
  m+=1;
 }
}
f.LogC.value+="Done Sorting\r\n";
return t;
}

// end -->
