/*COPYRIGHT ANDREW POVER 2009+*/
/*COPY THIS CODE AND WE WILL TAKE LEGAL ACTION TO THE HIGHEST EXTENT OF THE LAW*/


coursexp=new Array()

coursexp[0]=86.5 // Gnome Stronghold 

coursexp[1]=540 // Penquin Agility Course

coursexp[2]=153.2 // Barbarian Outpost

coursexp[3]=580 // Ape Atoll 

coursexp[4]=571.4 // Wilderness 

coursexp[5]=540 // Werewolf 

coursexp[6]=380 // Bandos Throne Room

coursexp[7]=2750 // Dorgesh-Khaan (Ropes)

coursexp[8]=15 // Catch Toy Mouse

coursexp[9]=240 // Brimhaven Agility Arena - 1 Ticket

coursexp[10]=2480 // Brimhaven Agility Arena - 10 Tickets

coursexp[11]=6500 // Brimhaven Agility Arena - 25 Tickets

coursexp[12]=28000 // Brimhaven Agility Arena - 100 Tickets

coursexp[13]=320000 // Brimhaven Agility Arena - 1000 Tickets

coursexp[14]=264 // Brimhaven Agility Arena - 1 Ticket (Karamja Gloves 2)

coursexp[15]=2728 // Brimhaven Agility Arena - 10 Tickets (Karamja Gloves 2)

coursexp[16]=7150 // Brimhaven Agility Arena - 25 Tickets (Karamja Gloves 2)

coursexp[17]=30800 // Brimhaven Agility Arena - 100 Tickets (Karamja Gloves 2)

coursexp[18]=352000 // Brimhaven Agility Arena - 1000 Tickets (Karamja Gloves 2)

coursexp[19]=5 // Barbarian Fishing - Leaping Trout

coursexp[20]=6 // Barbarian Fishing - Leaping Salmon

coursexp[21]=7 // Barbarian Fishing - Leaping Sturgeon

coursexp[22]=1014 // Agility Pyramid

coursexp[23]=7.5 // Yanille dungeon pipe

coursexp[24]=1429 // dorgesh long+grapple

coursexp[25]=22 // dorgesh long+grapple

coursexp[26]=20 //yanillebars

coursexp[27]=5.5 //yanillerubble



lvlxp=new Array()

lvlxp[0]=0

lvlxp[1]=1

lvlxp[2]=83

lvlxp[3]=174

lvlxp[4]=276

lvlxp[5]=388

lvlxp[6]=512

lvlxp[7]=650

lvlxp[8]=801

lvlxp[9]=969

lvlxp[10]=1154

lvlxp[11]=1358

lvlxp[12]=1584

lvlxp[13]=1833

lvlxp[14]=2107

lvlxp[15]=2411

lvlxp[16]=2746

lvlxp[17]=3115

lvlxp[18]=3523

lvlxp[19]=3973

lvlxp[20]=4470

lvlxp[21]=5018

lvlxp[22]=5624

lvlxp[23]=6291

lvlxp[24]=7028

lvlxp[25]=7842

lvlxp[26]=8740

lvlxp[27]=9730

lvlxp[28]=10824

lvlxp[29]=12031

lvlxp[30]=13363

lvlxp[31]=14833

lvlxp[32]=16456

lvlxp[33]=18247

lvlxp[34]=20224

lvlxp[35]=22406

lvlxp[36]=24815

lvlxp[37]=27473

lvlxp[38]=30408

lvlxp[39]=33648

lvlxp[40]=37224

lvlxp[41]=41171

lvlxp[42]=45529

lvlxp[43]=50339

lvlxp[44]=55649

lvlxp[45]=61512

lvlxp[46]=67983

lvlxp[47]=75127

lvlxp[48]=83014

lvlxp[49]=91721

lvlxp[50]=101333

lvlxp[51]=111945

lvlxp[52]=123660

lvlxp[53]=136594

lvlxp[54]=150872

lvlxp[55]=166636

lvlxp[56]=184040

lvlxp[57]=203254

lvlxp[58]=224466

lvlxp[59]=247886

lvlxp[60]=273742

lvlxp[61]=302288

lvlxp[62]=333804

lvlxp[63]=368599

lvlxp[64]=407015

lvlxp[65]=449428

lvlxp[66]=496254

lvlxp[67]=547953

lvlxp[68]=605032

lvlxp[69]=668051

lvlxp[70]=737627

lvlxp[71]=814445

lvlxp[72]=899257

lvlxp[73]=992895

lvlxp[74]=1096278

lvlxp[75]=1210421

lvlxp[76]=1336443

lvlxp[77]=1475581

lvlxp[78]=1629200

lvlxp[79]=1798808

lvlxp[80]=1986068

lvlxp[81]=2192818

lvlxp[82]=2421087

lvlxp[83]=2673114

lvlxp[84]=2951373

lvlxp[85]=3258594

lvlxp[86]=3597792

lvlxp[87]=3972294

lvlxp[88]=4385776

lvlxp[89]=4842295

lvlxp[90]=5346332

lvlxp[91]=5902831

lvlxp[92]=6517253

lvlxp[93]=7195629

lvlxp[94]=7944614

lvlxp[95]=8771558

lvlxp[96]=9684577

lvlxp[97]=10692629

lvlxp[98]=11805606

lvlxp[99]=13034431;

function calc(Dlvl,Cxp){var xpdif=lvlxp[Dlvl]-Cxp

var x=0

var number=0

while (x<50){number=xpdif/coursexp[x]

if(number.length!=1){number=Math.ceil(number*Math.pow(10,0))/Math.pow(10,0)}

if (x==0){document.output.gnome.value=number
doimg(1, "imageone");
}

if (x==1){document.output.penguin.value=number;
doimg(30, "imagesixteen");
}

if (x==2){document.output.barbarian.value=number;
doimg(35, "imageeighteen");
}

if (x==3){document.output.ape.value=number
doimg(48, "imagetwentyone");
}

if (x==4){document.output.wilderness.value=number
doimg(52, "imagetwentytwo");
}

if (x==5){document.output.werewolf.value=number
doimg(60, "imagetwentyfour");
}

if (x==6){document.output.bandos.value=number
doimg(60, "imagetwentyfive");
}

if (x==7){document.output.dorgeshdbllong.value=number
doimg(70, "imagetwentyeight");
}

if (x==8){document.output.toymouse.value=number
doimg(1, "imagetwo");
}

if (x==9){document.output.ticket1.value=number
doimg(1, "imagethree");
}

if (x==10){document.output.tickets10.value=number
doimg(1, "imagefour");
}

if (x==11){document.output.tickets25.value=number
doimg(1, "imagefive");
}

if (x==12){document.output.tickets100.value=number
doimg(1, "imagesix");
}

if (x==13){document.output.tickets1000.value=number
doimg(1, "imageseven");
}

if (x==14){document.output.gloves1ticket.value=number
doimg(12, "imageeight");
}

if (x==15){document.output.gloves10tickets.value=number
doimg(12, "imagenine");
}

if (x==16){document.output.gloves25tickets.value=number
doimg(12, "imageten");
}

if (x==17){document.output.gloves100tickets.value=number
doimg(12, "imageeleven");
}

if (x==18){document.output.gloves1000tickets.value=number
doimg(12, "imagetwelve");
}

if (x==19){document.output.leapingtrout.value=number
doimg(15, "imagethirteen");
}

if (x==20){document.output.leapingsalmon.value=number
doimg(30, "imageseventeen");
}

if (x==21){document.output.leapingstergeon.value=number
doimg(45, "imagetwenty");
}

if (x==22){document.output.agilitypyramid.value=number
doimg(30, "imagefifteen");
}

if (x==23){document.output.yanillepipe.value=number
doimg(29, "imagefourteen");
}

if (x==24){document.output.dorgeshlong.value=number
doimg(70, "imagetwentyseven");
}

if (x==25){document.output.yanilleledge.value=number
doimg(40, "imagenineteen");
}

if (x==26){document.output.yanillebars.value=number
doimg(57, "imagetwentythree");
}

if (x==27){document.output.yanillerubbish.value=number
doimg(67, "imagetwenty26");
}

x++

}}
