var aryHiScores = new Array(100);

aryHiScores[1] = 'JUAN M ROMAN  110015    4181ALL19-dec-2005mailto:jroman1975@hotmail.com';
aryHiScores[2] = 'JUAN M ROMAN   94495    4235ALL15-dec-2005mailto:jroman1975@hotmail.com';
aryHiScores[3] = 'JUAN M ROMAN   86130    4190ALL10-dec-2005mailto:jroman1975@hotmail.com';
aryHiScores[4] = 'Arty Noonzen   80130    3327 9924-jan-2003mailto:arty@dom.natm.ru';
aryHiScores[5] = 'O melhor....   75800    2983ALL18-jul-2003mailto:vitorpitt@globo.com';
aryHiScores[6] = 'Ashesh Patel   61365    3381ALL17-jun-2003mailto:ashesh74@yahoo.com';
aryHiScores[7] = 'JUAN M ROMAN   56815    4200ALL 4-dec-2005mailto:jroman1975@hotmail.com';
aryHiScores[8] = 'Lubega Gerad   54535    4144ALL 7-feb-2009mailto:lubgera@yahoo.com';
aryHiScores[9] = 'JUAN M ROMAN   54130    4094ALL 3-dec-2005mailto:jroman1975@hotmail.com';
aryHiScores[10] = 'Sandeep        53315    3515ALL16-jun-2003mailto:ashesh74@yahoo.com';
aryHiScores[11] = 'lubega gerad   52270    4075ALL18-dec-2007mailto:lubgera@yahoo.com';
aryHiScores[12] = 'lubega gerad   52180    4112ALL25-dec-2007mailto:lubgera@yahoo.com';
aryHiScores[13] = 'eashtiyak sh   52130    3386ALL11-jul-2003mailto:eash2002@yahoo.com';
aryHiScores[14] = 'Cranomenon     52010    3375ALL15-mar-2003';
aryHiScores[15] = 'Arty Noonzen   51175    3156ALL21-jan-2003mailto:arty@dom.natm.ru';
aryHiScores[16] = 'lubega gerad   51010    4011ALL 9-dec-2007mailto:lubgera@yahoo.com';
aryHiScores[17] = 'lubega gerad   50945    4180ALL12-dec-2007mailto:lubgera@yahoo.com';
aryHiScores[18] = 'ahto tera      50770    3727ALL24-oct-2005mailto:ahto.tera@mail.ee';
aryHiScores[19] = 'lubega gerad   50685    4164ALL11-dec-2007mailto:lubgera@yahoo.com';
aryHiScores[20] = 'lubega gerad   50665    4108ALL24-dec-2007mailto:lubgera@yahoo.com';
aryHiScores[21] = 'lubega gerad   50605    4074ALL19-dec-2007mailto:lubgera@yahoo.com';
aryHiScores[22] = 'lubega gerad   50605    4048ALL 8-dec-2007mailto:lubgera@yahoo.com';
aryHiScores[23] = 'lubega gerad   50550    4051ALL26-nov-2007mailto:lubgera@yahoo.com';
aryHiScores[24] = 'lubega gerad   50545    3993ALL 1-dec-2007mailto:lubgera@yahoo.com';
aryHiScores[25] = 'lubega gerad   50535    4136ALL23-dec-2007mailto:lubgera@yahoo.com';
aryHiScores[26] = 'lubega gerad   50480    4089ALL11-dec-2007mailto:lubgera@yahoo.com';
aryHiScores[27] = 'JAM            50465    3726ALL27-feb-2003mailto:jhunter337@yahoo.com';
aryHiScores[28] = 'lubega gerad   50405    4064ALL20-dec-2007mailto:lubgera@yahoo.com';
aryHiScores[29] = 'lubega gerad   50375    4129ALL27-jan-2008mailto:lubgera@yahoo.com';
aryHiScores[30] = 'lubega gerad   50370    4040ALL15-dec-2007mailto:lubgera@yahoo.com';
aryHiScores[31] = 'lubega gerad   50360    4110ALL11-dec-2007mailto:lubgera@yahoo.com';
aryHiScores[32] = 'lubega gerad   50310    4197ALL13-dec-2007mailto:lubgera@yahoo.com';
aryHiScores[33] = 'Ashesh Patel   50255    3403 9714-jun-2003mailto:ashesh74@yahoo.com';
aryHiScores[34] = 'JUAN M ROMAN   50075    4032100 2-dec-2005mailto:jroman1975@hotmail.com';
aryHiScores[35] = 'JUAN M ROMAN   50070    3983ALL13-nov-2005mailto:jroman1975@hotmail.com';
aryHiScores[36] = 'lubega gerad   50055    4104ALL12-dec-2007mailto:lubgera@yahoo.com';
aryHiScores[37] = 'lubega gerad   49820    3981ALL25-may-2007mailto:lubgera@yahoo.com';
aryHiScores[38] = 'lubega gerad   49800    3923ALL12-jun-2007mailto:lubgera@yahoo.com';
aryHiScores[39] = 'Ashesh Patel   49770    3412ALL13-jun-2003mailto:ashesh74@yahoo.com';
aryHiScores[40] = 'Arunkumar.nk   49605    3584ALL 5-dec-2005mailto:arunkumar_n_k@rediffmail.com';
aryHiScores[41] = 'Ntakadzeni     49600    3741ALL18-oct-2003mailto:ragadzar@yahoo.com';
aryHiScores[42] = 'Ashesh Patel   49595    3451ALL14-jun-2003mailto:ashesh74@yahoo.com';
aryHiScores[43] = 'UNCLE DAVEY    49585    3353ALL10-jun-2003mailto:duttons1@farmersweekly.net';
aryHiScores[44] = 'lugega gerad   49460    3811 9625-nov-2007mailto:lubgera@yahoo.com';
aryHiScores[45] = 'lubega gerad   49430    3815 9728-nov-2007mailto:lubgera@yahoo.com';
aryHiScores[46] = 'lubega gerad   49385    3895 97 8-dec-2007mailto:lubgera@yahoo.com';
aryHiScores[47] = 'lubega gerad   49350    3935ALL13-jun-2007mailto:lubgera@yahoo.com';
aryHiScores[48] = 'ashesh         49250    336810014-jun-2003mailto:ashesh74@yahoo.com';
aryHiScores[49] = 'lubega gerad   49215    3953ALL13-jun-2007mailto:lubgera@yahoo.com';
aryHiScores[50] = 'lubega gerad   49200    4040ALL 9-dec-2007mailto:lubgera@yahoo.com';
aryHiScores[51] = 'Cranomenon     49195    3527ALL22-feb-2003';
aryHiScores[52] = 'Ashesh Patel   49165    3487 9612-jun-2003mailto:ashesh74@yahoo.com';
aryHiScores[53] = 'Ashesh Patel   49165    344310014-jun-2003mailto:ashesh74@yahoo.com';
aryHiScores[54] = 'ü chicano ü    49120    3039ALL17-jan-2003mailto:chicano_k@hotmail.com';
aryHiScores[55] = 'Sandeep        49095    3374ALL14-jun-2003mailto:ashesh74@yahoo.com';
aryHiScores[56] = 'Ashesh Patel   49065    3193ALL 9-jun-2003mailto:ashesh74@yahoo.com';
aryHiScores[57] = 'Arty Noonzen   49025    2826ALL18-jan-2003mailto:arty@dom.natm.ru';
aryHiScores[58] = 'ChRiS          49015    3390ALL14-jan-2003';
aryHiScores[59] = 'Arty Noonzen   49005    3222ALL 2-feb-2003mailto:arty@dom.natm.ru';
aryHiScores[60] = 'ZI - TUF       48950    3138ALL21-jul-2004mailto:marcosjgb75@bol.com.br';
aryHiScores[61] = 'Cranomenon     48920    3240 9719-feb-2003';
aryHiScores[62] = 'Ronald         48760    3726 9717-oct-2003mailto:ragadzar@yahoo.com';
aryHiScores[63] = ' sandeep       48750    3399ALL12-jun-2003mailto:ashesh74@yahoo.com';
aryHiScores[64] = 'lubega gerad   48720    4022 9511-dec-2007mailto:lubgera@yahoo.com';
aryHiScores[65] = 'Arty           48715    3119ALL 2-feb-2003mailto:arty@dom.natm.ru';
aryHiScores[66] = 'GALOIS         48705    3548ALL16-oct-2004mailto:thematrix@quicknet.nl';
aryHiScores[67] = 'Ragadza NR     48685    3922ALL16-oct-2003mailto:ragadzar@yahoo.com';
aryHiScores[68] = 'Isabel         48670    3411ALL 9-oct-2003mailto:muffelschaf@tiscali.de';
aryHiScores[69] = 'Arty Noonzen   48655    3039 9619-jan-2003mailto:arty@dom.natm.ru';
aryHiScores[70] = 'JAM            48625    3540 9525-feb-2003mailto:jhunter337@yahoo.com';
aryHiScores[71] = 'Cranomenon     48610    3184ALL18-feb-2003';
aryHiScores[72] = 'Ashesh         48570    3203100 8-jun-2003mailto:ashesh74@yahoo.com';
aryHiScores[73] = 'Arunkumar.nk   48550    3610ALL 5-dec-2005mailto:arunkumar_n_k@rediffmail.com';
aryHiScores[74] = 'Ntakadzeni     48515    3780ALL16-oct-2003mailto:ragadzar@yahoo.com';
aryHiScores[75] = 'UNCLE DAVEY    48400    3174 9610-jun-2003mailto:duttons1@farmersweekly.net';
aryHiScores[76] = 'MARAC          48310    3649ALL18-jul-2003mailto:markoarzo@volja.net';
aryHiScores[77] = '111111111111   48290    3468ALL 6-jul-2003mailto:markoarzo@volja.net';
aryHiScores[78] = 'Ashesh Patel   48275    3207ALL10-jun-2003mailto:ashesh74@yahoo.com';
aryHiScores[79] = 'lubega gerad   48255    3775 92 8-dec-2007mailto:lubgera@yahoo.com';
aryHiScores[80] = 'ashesh         48250    3414 9816-jun-2003mailto:ashesh74@yahoo.com';
aryHiScores[81] = 'Ashesh         48245    3411 9612-jun-2003mailto:ashesh74@yahoo.com';
aryHiScores[82] = 'Arunkumar.nk   48235    348210028-nov-2005mailto:arunkumar_n_k@rediffmail.com';
aryHiScores[83] = 'Ashesh         48210    3143ALL 5-jun-2003mailto:ashesh74@yahoo.com';
aryHiScores[84] = 'JUAN M ROMAN   48150    3704 9513-nov-2005mailto:jroman1975@hotmail.com';
aryHiScores[85] = 'FICELLE        48140    350510016-oct-2004mailto:thematrix@quicknet.nl';
aryHiScores[86] = 'JUAN M ROMAN   48105    3726 99 3-nov-2005mailto:jroman1975@hotmail.com';
aryHiScores[87] = 'stand show     48095    3535ALL30-may-2003mailto:marcosjgb75@bol.com.br';
aryHiScores[88] = 'SOU FERA!!!!   48070    2548 9917-jul-2003mailto:vitorpitt@globo.com';
aryHiScores[89] = 'Cranomenon     48030    2964 9714-feb-2003';
aryHiScores[90] = 'Arty Noonzen   48015    3077ALL26-jan-2003mailto:arty@dom.natm.ru';
aryHiScores[91] = 'EASHTIYAK      48000    3108ALL 3-jul-2003mailto:eash2002@yahoo.com';
aryHiScores[92] = '               47960    3492 9913-jun-2003mailto:ashesh74@yahoo.com';
aryHiScores[93] = 'eash           47930    3111 98 8-jul-2003mailto:eash2002@yahoo.com';
aryHiScores[94] = 'AC             47920    3043ALL 6-mar-2004mailto:AbeJyankee@hotmail.com';
aryHiScores[95] = 'LILIANA        47855    3571ALL25-dec-2005mailto:rowle2001@yahoo.com.ar';
aryHiScores[96] = 'Jordon         47855    2903ALL10-jan-2003http://members.aol.com/jordonw/tab/home.html';
aryHiScores[97] = 'ahto tera      47770    3502 9423-oct-2005mailto:ahto.tera@mail.ee';
aryHiScores[98] = 'han-han.,..    47715    2930 9929-jun-2003mailto:vitorpitt@globo.com';
aryHiScores[99] = 'ashesh         47710    3252100 7-jun-2003mailto:ashesh74@yahoo.com';
aryHiScores[100] = 'Arunkumar.nk   47590    3424 98 3-dec-2005mailto:arunkumar_n_k@rediffmail.com';

function ReplaceSmilies(strInput)
{
  // built new string
  var strResult = '';

  //replaces special characters with <img> tags
  for (i=0; i <= strInput.length; i++)
  {
    // get one character
    strChar = strInput.substr(i, 1);

    // check for special characters
    if (strChar == 'Ç') {strChar = '<img border=0 src="copyright.gif"> '}; //ascii 128
    if (strChar == 'ü') {strChar = '<img border=0 src="smile.gif"> '};     //ascii 129
    if (strChar == 'é') {strChar = '<img border=0 src="wink.gif"> '};      //ascii 130
    if (strChar == 'â') {strChar = '<img border=0 src="nosmile.gif"> '};   //ascii 131
    if (strChar == 'ä') {strChar = '<img border=0 src="lol.gif"> '};       //ascii 132
    if (strChar == 'à') {strChar = '<img border=0 src="ooh.gif"> '};       //ascii 133
    if (strChar == 'å') {strChar = '<img border=0 src="hm.gif"> '};        //ascii 134
    if (strChar == 'ç') {strChar = '<img border=0 src="cool.gif"> '};      //ascii 135
    if (strChar == 'ê') {strChar = '<img border=0 src="heart.gif"> '};     //ascii 136

    // add character to result
    strResult = strResult + strChar;
  }

  if (strResult == '            ') {strResult = '&nbsp;'};

  return strResult;
}

function HiscoreTableHeader()
{
    // variable will contain scoretable
    strHeader = ''

  //write beginning of table
  strHeader = strHeader + '<table border=1 cellspacing=0>';
  strHeader = strHeader + '<tr bgcolor="#00C0FF">';
  strHeader = strHeader + '<td>rank</td>';
  strHeader = strHeader + '<td width=100>name</td>';
  strHeader = strHeader + '<td width=100>score</td>';
  strHeader = strHeader + '<td width=100>money</td>';
  strHeader = strHeader + '<td>level</td>';
  strHeader = strHeader + '<td>date</td>';
 strHeader = strHeader + '</tr>';

  return strHeader;
}

function HiscoreTableRecord(RankNr)
{
  strRecord = aryHiScores[RankNr];
  strName = strRecord.substr(0, 12);
  strName = ReplaceSmilies(strName);
  strScore = strRecord.substr(12, 8);
  strMoney = strRecord.substr(20, 8);
  strLevel = strRecord.substr(28, 3);
  strDate = strRecord.substr(31, 11);
  strHyperLink = strRecord.substr(42);

  // if hyperlink available, link it to name
  if (strHyperLink != '')
  {
    strName = '<a href="' + strHyperLink + '">' + strName + '</a>';
  }

  // variable will contain scoretable
  strRecord = '';
  strRecord = strRecord + '<tr>';
  strRecord = strRecord + '<td>' + RankNr + '</td>';
  strRecord = strRecord + '<td>' + strName + '</td>';
  strRecord = strRecord + '<td align="right">' + strScore + '</td>';
  strRecord = strRecord + '<td align="right">' + strMoney + '</td>';
  strRecord = strRecord + '<td align="right">' + strLevel + '</td>';
  strRecord = strRecord + '<td align="right">' + strDate + '</td>';
  strRecord = strRecord + '</tr>';

  return strRecord;
}

function HiscoreTableFooter()
{
  // variable will contain scoretable
  strFooter = ''

  //write ending of table
  strFooter = '</table>'

  return strFooter;
}

