function matchselect()
{
var mymatch=document.getElementById("mymatch");
var matchnumber=document.getElementById("mymatch").selectedIndex;

span_clear();

if (matchnumber==0) { team = new Array();	team[0]= new Array();	team[0][0]="Fulham ";	team[0][1]="Draw";	team[0][2]= "Tottenham";	odds = new Array();	odds[0]= new Array();	odds[0][0]=2.75;	odds[0][1]=3.25;	odds[0][2]= 2.38;	
	team[1]= new Array();	team[1][0]="Portsmouth ";	team[1][1]="Draw";	team[1][2]= "Birmingham";		odds[1]= new Array();	odds[1][0]=2.5;	odds[1][1]=3.2;	odds[1][2]= 2.6;	calc();}
if (matchnumber==1) { team = new Array();	team[0]= new Array();	team[0][0]="Chelsea ";	team[0][1]="Draw";	team[0][2]= "Stoke";	odds = new Array();	odds[0]= new Array();	odds[0][0]=1.25;	odds[0][1]=5;	odds[0][2]= 10;	
	team[1]= new Array();	team[1][0]="Reading ";	team[1][1]="Draw";	team[1][2]= "Aston Villa";		odds[1]= new Array();	odds[1][0]=4;	odds[1][1]=3.4;	odds[1][2]= 1.8;	calc();}
if (matchnumber==2) { team = new Array();	team[0]= new Array();	team[0][0]="Arsenal ";	team[0][1]="Draw";	team[0][2]= "Burnley";	odds = new Array();	odds[0]= new Array();	odds[0][0]=1.14;	odds[0][1]=7.5;	odds[0][2]= 17;	
	team[1]= new Array();	team[1][0]="West Ham ";	team[1][1]="Draw";	team[1][2]= "Bolton";		odds[1]= new Array();	odds[1][0]=1.83;	odds[1][1]=3.4;	odds[1][2]= 4.5;	
	team[2]= new Array();	team[2][0]="Wolves ";	team[2][1]="Draw";	team[2][2]= "Man United";		odds[2]= new Array();	odds[2][0]=11;	odds[2][1]=4.5;	odds[2][2]= 1.33;	calc();}
if (matchnumber==3) { team = new Array();	team[0]= new Array();	team[0][0]="Everton ";	team[0][1]="Draw";	team[0][2]= "Hull";	odds = new Array();	odds[0]= new Array();	odds[0][0]=1.36;	odds[0][1]=4.5;	odds[0][2]= 9;	calc();}
if (matchnumber==4) { team = new Array();	team[0]= new Array();	team[0][0]="Wigan ";	team[0][1]="Draw";	team[0][2]= "Liverpool";	odds = new Array();	odds[0]= new Array();	odds[0][0]=6;	odds[0][1]=3.6;	odds[0][2]= 1.62;	calc();}
if (matchnumber==5) { team = new Array();	team[0]= new Array();	team[0][0]="Blackpool ";	team[0][1]="Draw";	team[0][2]= "Ipswich";	odds = new Array();	odds[0]= new Array();	odds[0][0]=2.3;	odds[0][1]=3.25;	odds[0][2]= 3;	
	team[1]= new Array();	team[1][0]="Bristol City ";	team[1][1]="Draw";	team[1][2]= "Doncaster";		odds[1]= new Array();	odds[1][0]=2.1;	odds[1][1]=3.25;	odds[1][2]= 3.5;	
	team[2]= new Array();	team[2][0]="Cardiff ";	team[2][1]="Draw";	team[2][2]= "Middlesbrough";		odds[2]= new Array();	odds[2][0]=2.2;	odds[2][1]=3.25;	odds[2][2]= 3.2;	
	team[3]= new Array();	team[3][0]="Crystal Palace ";	team[3][1]="Draw";	team[3][2]= "Sheff Utd";		odds[3]= new Array();	odds[3][0]=2.75;	odds[3][1]=3.25;	odds[3][2]= 2.5;	
	team[4]= new Array();	team[4][0]="Derby ";	team[4][1]="Draw";	team[4][2]= "Watford";		odds[4]= new Array();	odds[4][0]=2;	odds[4][1]=3.25;	odds[4][2]= 3.75;	
	team[5]= new Array();	team[5][0]="Newcastle ";	team[5][1]="Draw";	team[5][2]= "Barnsley";		odds[5]= new Array();	odds[5][0]=1.4;	odds[5][1]=4.33;	odds[5][2]= 7.5;	
	team[6]= new Array();	team[6][0]="Nottm Forest ";	team[6][1]="Draw";	team[6][2]= "Swansea";		odds[6]= new Array();	odds[6][0]=1.91;	odds[6][1]=3.3;	odds[6][2]= 4;	
	team[7]= new Array();	team[7][0]="Peterborough ";	team[7][1]="Draw";	team[7][2]= "Coventry";		odds[7]= new Array();	odds[7][0]=2.6;	odds[7][1]=3.25;	odds[7][2]= 2.63;	
	team[8]= new Array();	team[8][0]="Plymouth ";	team[8][1]="Draw";	team[8][2]= "Preston";		odds[8]= new Array();	odds[8][0]=2.5;	odds[8][1]=3.25;	odds[8][2]= 2.75;	
	team[9]= new Array();	team[9][0]="QPR ";	team[9][1]="Draw";	team[9][2]= "West Brom";		odds[9]= new Array();	odds[9][0]=3.4;	odds[9][1]=3.25;	odds[9][2]= 2.1;	
	team[10]= new Array();	team[10][0]="Sheff Wed ";	team[10][1]="Draw";	team[10][2]= "Leicester";		odds[10]= new Array();	odds[10][0]=2.75;	odds[10][1]=3.25;	odds[10][2]= 2.5;	calc();}
if (matchnumber==6) { team = new Array();	team[0]= new Array();	team[0][0]="Charlton ";	team[0][1]="Draw";	team[0][2]= "Stockport";	odds = new Array();	odds[0]= new Array();	odds[0][0]=1.36;	odds[0][1]=4.33;	odds[0][2]= 7.5;	
	team[1]= new Array();	team[1][0]="Exeter ";	team[1][1]="Draw";	team[1][2]= "Oldham";		odds[1]= new Array();	odds[1][0]=2.25;	odds[1][1]=3.25;	odds[1][2]= 2.88;	
	team[2]= new Array();	team[2][0]="Gillingham ";	team[2][1]="Draw";	team[2][2]= "Huddersfield";		odds[2]= new Array();	odds[2][0]=2.88;	odds[2][1]=3.25;	odds[2][2]= 2.25;	
	team[3]= new Array();	team[3][0]="Hartlepool ";	team[3][1]="Draw";	team[3][2]= "Southend";		odds[3]= new Array();	odds[3][0]=1.91;	odds[3][1]=3.25;	odds[3][2]= 3.75;	
	team[4]= new Array();	team[4][0]="Leeds ";	team[4][1]="Draw";	team[4][2]= "Brentford";		odds[4]= new Array();	odds[4][0]=1.4;	odds[4][1]=4;	odds[4][2]= 7.5;	
	team[5]= new Array();	team[5][0]="MK Dons Fc ";	team[5][1]="Draw";	team[5][2]= "Leyton Orient";		odds[5]= new Array();	odds[5][0]=1.73;	odds[5][1]=3.4;	odds[5][2]= 4.5;	
	team[6]= new Array();	team[6][0]="Norwich ";	team[6][1]="Draw";	team[6][2]= "Yeovil";		odds[6]= new Array();	odds[6][0]=1.36;	odds[6][1]=4.33;	odds[6][2]= 7.5;	
	team[7]= new Array();	team[7][0]="Swindon ";	team[7][1]="Draw";	team[7][2]= "Bristol Rovers";		odds[7]= new Array();	odds[7][0]=1.67;	odds[7][1]=3.4;	odds[7][2]= 5;	
	team[8]= new Array();	team[8][0]="Tranmere ";	team[8][1]="Draw";	team[8][2]= "Southampton";		odds[8]= new Array();	odds[8][0]=3.4;	odds[8][1]=3.25;	odds[8][2]= 2;	
	team[9]= new Array();	team[9][0]="Walsall ";	team[9][1]="Draw";	team[9][2]= "Millwall";		odds[9]= new Array();	odds[9][0]=2.6;	odds[9][1]=3.2;	odds[9][2]= 2.5;	
	team[10]= new Array();	team[10][0]="Wycombe ";	team[10][1]="Draw";	team[10][2]= "Carlisle";		odds[10]= new Array();	odds[10][0]=2.5;	odds[10][1]=3.2;	odds[10][2]= 2.6;	calc();}
if (matchnumber==7) { team = new Array();	team[0]= new Array();	team[0][0]="Colchester ";	team[0][1]="Draw";	team[0][2]= "Brighton";	odds = new Array();	odds[0]= new Array();	odds[0][0]=1.73;	odds[0][1]=3.4;	odds[0][2]= 4.5;	calc();}
if (matchnumber==8) { team = new Array();	team[0]= new Array();	team[0][0]="Accrington ";	team[0][1]="Draw";	team[0][2]= "Notts County";	odds = new Array();	odds[0]= new Array();	odds[0][0]=2.75;	odds[0][1]=3.25;	odds[0][2]= 2.38;	
	team[1]= new Array();	team[1][0]="Aldershot ";	team[1][1]="Draw";	team[1][2]= "Burton Albion";		odds[1]= new Array();	odds[1][0]=2;	odds[1][1]=3.25;	odds[1][2]= 3.4;	
	team[2]= new Array();	team[2][0]="Bournemouth ";	team[2][1]="Draw";	team[2][2]= "Morecambe";		odds[2]= new Array();	odds[2][0]=1.8;	odds[2][1]=3.4;	odds[2][2]= 4;	
	team[3]= new Array();	team[3][0]="Bury ";	team[3][1]="Draw";	team[3][2]= "Dagenham & Redbridge";		odds[3]= new Array();	odds[3][0]=1.8;	odds[3][1]=3.4;	odds[3][2]= 4;	
	team[4]= new Array();	team[4][0]="Cheltenham ";	team[4][1]="Draw";	team[4][2]= "Chesterfield";		odds[4]= new Array();	odds[4][0]=2.88;	odds[4][1]=3.25;	odds[4][2]= 2.25;	
	team[5]= new Array();	team[5][0]="Crewe ";	team[5][1]="Draw";	team[5][2]= "Barnet";		odds[5]= new Array();	odds[5][0]=1.91;	odds[5][1]=3.25;	odds[5][2]= 3.75;	
	team[6]= new Array();	team[6][0]="Darlington ";	team[6][1]="Draw";	team[6][2]= "Torquay";		odds[6]= new Array();	odds[6][0]=2.8;	odds[6][1]=3.25;	odds[6][2]= 2.25;	
	team[7]= new Array();	team[7][0]="Grimsby ";	team[7][1]="Draw";	team[7][2]= "Shrewsbury";		odds[7]= new Array();	odds[7][0]=3;	odds[7][1]=3.25;	odds[7][2]= 2.2;	
	team[8]= new Array();	team[8][0]="Hereford ";	team[8][1]="Draw";	team[8][2]= "Macclesfield";		odds[8]= new Array();	odds[8][0]=2;	odds[8][1]=3.25;	odds[8][2]= 3.4;	
	team[9]= new Array();	team[9][0]="Port Vale ";	team[9][1]="Draw";	team[9][2]= "Northampton";		odds[9]= new Array();	odds[9][0]=2.5;	odds[9][1]=3.2;	odds[9][2]= 2.6;	
	team[10]= new Array();	team[10][0]="Rochdale ";	team[10][1]="Draw";	team[10][2]= "Lincoln";		odds[10]= new Array();	odds[10][0]=1.4;	odds[10][1]=4;	odds[10][2]= 7.5;	
	team[11]= new Array();	team[11][0]="Rotherham ";	team[11][1]="Draw";	team[11][2]= "Bradford";		odds[11]= new Array();	odds[11][0]=1.8;	odds[11][1]=3.4;	odds[11][2]= 4;	calc();}
if (matchnumber==9) { team = new Array();	team[0]= new Array();	team[0][0]="AFC Wimbledon ";	team[0][1]="Draw";	team[0][2]= "Altrincham";	odds = new Array();	odds[0]= new Array();	odds[0][0]=1.73;	odds[0][1]=3.4;	odds[0][2]= 4.33;	
	team[1]= new Array();	team[1][0]="Barrow ";	team[1][1]="Draw";	team[1][2]= "Cambridge Utd";		odds[1]= new Array();	odds[1][0]=2.25;	odds[1][1]=3.25;	odds[1][2]= 2.88;	
	team[2]= new Array();	team[2][0]="Eastbourne Borough ";	team[2][1]="Draw";	team[2][2]= "Kidderminster";		odds[2]= new Array();	odds[2][0]=2.75;	odds[2][1]=3.2;	odds[2][2]= 2.38;	
	team[3]= new Array();	team[3][0]="Forest Green Rovers ";	team[3][1]="Draw";	team[3][2]= "York";		odds[3]= new Array();	odds[3][0]=3.75;	odds[3][1]=3.25;	odds[3][2]= 1.91;	
	team[4]= new Array();	team[4][0]="Hayes & Yeading ";	team[4][1]="Draw";	team[4][2]= "Luton";		odds[4]= new Array();	odds[4][0]=3.25;	odds[4][1]=3.4;	odds[4][2]= 2;	
	team[5]= new Array();	team[5][0]="Histon ";	team[5][1]="Draw";	team[5][2]= "Gateshead";		odds[5]= new Array();	odds[5][0]=1.83;	odds[5][1]=3.5;	odds[5][2]= 3.75;	
	team[6]= new Array();	team[6][0]="Mansfield ";	team[6][1]="Draw";	team[6][2]= "Salisbury";		odds[6]= new Array();	odds[6][0]=1.73;	odds[6][1]=3.4;	odds[6][2]= 4.33;	
	team[7]= new Array();	team[7][0]="Stevenage ";	team[7][1]="Draw";	team[7][2]= "Crawley Town";		odds[7]= new Array();	odds[7][0]=1.57;	odds[7][1]=3.5;	odds[7][2]= 5.5;	
	team[8]= new Array();	team[8][0]="Tamworth ";	team[8][1]="Draw";	team[8][2]= "Rushden & Diamonds";		odds[8]= new Array();	odds[8][0]=2.88;	odds[8][1]=3.4;	odds[8][2]= 2.2;	
	team[9]= new Array();	team[9][0]="Wrexham ";	team[9][1]="Draw";	team[9][2]= "Ebbsfleet United";		odds[9]= new Array();	odds[9][0]=1.73;	odds[9][1]=3.4;	odds[9][2]= 4.5;	calc();}
if (matchnumber==10) { team = new Array();	team[0]= new Array();	team[0][0]="Arsenal ";	team[0][1]="Draw";	team[0][2]= "Porto";	odds = new Array();	odds[0]= new Array();	odds[0][0]=1.53;	odds[0][1]=3.6;	odds[0][2]= 6;	
	team[1]= new Array();	team[1][0]="Fiorentina ";	team[1][1]="Draw";	team[1][2]= "Bayern Munich";		odds[1]= new Array();	odds[1][0]=2.6;	odds[1][1]=3.2;	odds[1][2]= 2.5;	calc();}
if (matchnumber==11) { team = new Array();	team[0]= new Array();	team[0][0]="Man United ";	team[0][1]="Draw";	team[0][2]= "AC Milan";	odds = new Array();	odds[0]= new Array();	odds[0][0]=1.57;	odds[0][1]=3.6;	odds[0][2]= 5.5;	
	team[1]= new Array();	team[1][0]="Real Madrid ";	team[1][1]="Draw";	team[1][2]= "Lyon";		odds[1]= new Array();	odds[1][0]=1.33;	odds[1][1]=4.33;	odds[1][2]= 8.5;	calc();}
if (matchnumber==12) { team = new Array();	team[0]= new Array();	team[0][0]="Hamilton ";	team[0][1]="Draw";	team[0][2]= "Aberdeen";	odds = new Array();	odds[0]= new Array();	odds[0][0]=2.5;	odds[0][1]=3.25;	odds[0][2]= 2.5;	
	team[1]= new Array();	team[1][0]="Hibernian ";	team[1][1]="Draw";	team[1][2]= "Kilmarnock";		odds[1]= new Array();	odds[1][0]=1.73;	odds[1][1]=3.4;	odds[1][2]= 4.33;	
	team[2]= new Array();	team[2][0]="Rangers ";	team[2][1]="Draw";	team[2][2]= "St Mirren";		odds[2]= new Array();	odds[2][0]=1.18;	odds[2][1]=6.5;	odds[2][2]= 15;	
	team[3]= new Array();	team[3][0]="St Johnstone ";	team[3][1]="Draw";	team[3][2]= "Motherwell";		odds[3]= new Array();	odds[3][0]=2.5;	odds[3][1]=3.25;	odds[3][2]= 2.5;	calc();}
if (matchnumber==13) { team = new Array();	team[0]= new Array();	team[0][0]="Dundee Utd ";	team[0][1]="Draw";	team[0][2]= "Hearts";	odds = new Array();	odds[0]= new Array();	odds[0][0]=1.91;	odds[0][1]=3.4;	odds[0][2]= 4;	
	team[1]= new Array();	team[1][0]="Falkirk ";	team[1][1]="Draw";	team[1][2]= "Celtic";		odds[1]= new Array();	odds[1][0]=9;	odds[1][1]=4.33;	odds[1][2]= 1.4;	calc();}
if (matchnumber==14) { team = new Array();	team[0]= new Array();	team[0][0]="Ayr ";	team[0][1]="Draw";	team[0][2]= "Morton";	odds = new Array();	odds[0]= new Array();	odds[0][0]=2.2;	odds[0][1]=3.5;	odds[0][2]= 2.75;	
	team[1]= new Array();	team[1][0]="Dundee ";	team[1][1]="Draw";	team[1][2]= "Inverness CT";		odds[1]= new Array();	odds[1][0]=1.9;	odds[1][1]=3.4;	odds[1][2]= 3.5;	
	team[2]= new Array();	team[2][0]="Dunfermline ";	team[2][1]="Draw";	team[2][2]= "Airdrie Utd";		odds[2]= new Array();	odds[2][0]=1.57;	odds[2][1]=3.75;	odds[2][2]= 5;	
	team[3]= new Array();	team[3][0]="Queen of South ";	team[3][1]="Draw";	team[3][2]= "Partick Thistle";		odds[3]= new Array();	odds[3][0]=2;	odds[3][1]=3.4;	odds[3][2]= 3.2;	
	team[4]= new Array();	team[4][0]="Ross County ";	team[4][1]="Draw";	team[4][2]= "Raith";		odds[4]= new Array();	odds[4][0]=1.67;	odds[4][1]=3.6;	odds[4][2]= 4.33;	calc();}
if (matchnumber==15) { team = new Array();	team[0]= new Array();	team[0][0]="Alloa ";	team[0][1]="Draw";	team[0][2]= "Clyde";	odds = new Array();	odds[0]= new Array();	odds[0][0]=1.36;	odds[0][1]=4.5;	odds[0][2]= 6;	
	team[1]= new Array();	team[1][0]="Arbroath ";	team[1][1]="Draw";	team[1][2]= "Stenhousemuir";		odds[1]= new Array();	odds[1][0]=2.38;	odds[1][1]=3.5;	odds[1][2]= 2.38;	
	team[2]= new Array();	team[2][0]="Cowdenbeath ";	team[2][1]="Draw";	team[2][2]= "East Fife";		odds[2]= new Array();	odds[2][0]=1.83;	odds[2][1]=3.5;	odds[2][2]= 3.4;	
	team[3]= new Array();	team[3][0]="Dumbarton ";	team[3][1]="Draw";	team[3][2]= "Brechin";		odds[3]= new Array();	odds[3][0]=2.38;	odds[3][1]=3.5;	odds[3][2]= 2.38;	
	team[4]= new Array();	team[4][0]="Peterhead ";	team[4][1]="Draw";	team[4][2]= "Stirling Albion";		odds[4]= new Array();	odds[4][0]=2.6;	odds[4][1]=3.4;	odds[4][2]= 2.25;	calc();}
if (matchnumber==16) { team = new Array();	team[0]= new Array();	team[0][0]="Annan Athletic ";	team[0][1]="Draw";	team[0][2]= "Elgin";	odds = new Array();	odds[0]= new Array();	odds[0][0]=1.8;	odds[0][1]=3.5;	odds[0][2]= 3.5;	
	team[1]= new Array();	team[1][0]="East Stirling ";	team[1][1]="Draw";	team[1][2]= "Forfar";		odds[1]= new Array();	odds[1][0]=2.38;	odds[1][1]=3.5;	odds[1][2]= 2.38;	
	team[2]= new Array();	team[2][0]="Livingston ";	team[2][1]="Draw";	team[2][2]= "Albion Rovers";		odds[2]= new Array();	odds[2][0]=1.33;	odds[2][1]=4.33;	odds[2][2]= 7;	
	team[3]= new Array();	team[3][0]="Queens Park ";	team[3][1]="Draw";	team[3][2]= "Berwick";		odds[3]= new Array();	odds[3][0]=2.25;	odds[3][1]=3.4;	odds[3][2]= 2.6;	
	team[4]= new Array();	team[4][0]="Stranraer ";	team[4][1]="Draw";	team[4][2]= "Montrose";		odds[4]= new Array();	odds[4][0]=1.67;	odds[4][1]=3.6;	odds[4][2]= 4;	calc();}
if (matchnumber==17) { team = new Array();	team[0]= new Array();	team[0][0]="Fiorentina ";	team[0][1]="Draw";	team[0][2]= "Juventus";	odds = new Array();	odds[0]= new Array();	odds[0][0]=2.6;	odds[0][1]=3;	odds[0][2]= 2.88;	
	team[1]= new Array();	team[1][0]="Roma ";	team[1][1]="Draw";	team[1][2]= "AC Milan";		odds[1]= new Array();	odds[1][0]=2.3;	odds[1][1]=3.2;	odds[1][2]= 3.2;	calc();}
if (matchnumber==18) { team = new Array();	team[0]= new Array();	team[0][0]="Atalanta ";	team[0][1]="Draw";	team[0][2]= "Udinese";	odds = new Array();	odds[0]= new Array();	odds[0][0]=2.25;	odds[0][1]=3;	odds[0][2]= 3.5;	
	team[1]= new Array();	team[1][0]="Bari ";	team[1][1]="Draw";	team[1][2]= "Chievo";		odds[1]= new Array();	odds[1][0]=2;	odds[1][1]=3.2;	odds[1][2]= 4;	
	team[2]= new Array();	team[2][0]="Bologna ";	team[2][1]="Draw";	team[2][2]= "Napoli";		odds[2]= new Array();	odds[2][0]=3.2;	odds[2][1]=3;	odds[2][2]= 2.38;	
	team[3]= new Array();	team[3][0]="Cagliari ";	team[3][1]="Draw";	team[3][2]= "Catania";		odds[3]= new Array();	odds[3][0]=2;	odds[3][1]=3.2;	odds[3][2]= 4;	
	team[4]= new Array();	team[4][0]="Inter Milan ";	team[4][1]="Draw";	team[4][2]= "Genoa";		odds[4]= new Array();	odds[4][0]=1.4;	odds[4][1]=4.33;	odds[4][2]= 8.5;	
	team[5]= new Array();	team[5][0]="Palermo ";	team[5][1]="Draw";	team[5][2]= "Livorno";		odds[5]= new Array();	odds[5][0]=1.53;	odds[5][1]=3.75;	odds[5][2]= 7;	
	team[6]= new Array();	team[6][0]="Sampdoria ";	team[6][1]="Draw";	team[6][2]= "Lazio";		odds[6]= new Array();	odds[6][0]=2;	odds[6][1]=3.2;	odds[6][2]= 4;	
	team[7]= new Array();	team[7][0]="Siena ";	team[7][1]="Draw";	team[7][2]= "Parma";		odds[7]= new Array();	odds[7][0]=2.2;	odds[7][1]=3;	odds[7][2]= 3.6;	calc();}
if (matchnumber==19) { team = new Array();	team[0]= new Array();	team[0][0]="Almeria ";	team[0][1]="Draw";	team[0][2]= "Barcelona";	odds = new Array();	odds[0]= new Array();	odds[0][0]=11;	odds[0][1]=5;	odds[0][2]= 1.3;	
	team[1]= new Array();	team[1][0]="Deportivo ";	team[1][1]="Draw";	team[1][2]= "Tenerife";		odds[1]= new Array();	odds[1][0]=1.62;	odds[1][1]=4;	odds[1][2]= 5.25;	
	team[2]= new Array();	team[2][0]="Real Madrid ";	team[2][1]="Draw";	team[2][2]= "Sevilla";		odds[2]= new Array();	odds[2][0]=1.33;	odds[2][1]=5;	odds[2][2]= 9;	calc();}
if (matchnumber==20) { team = new Array();	team[0]= new Array();	team[0][0]="Athletic Bilbao ";	team[0][1]="Draw";	team[0][2]= "Valladolid";	odds = new Array();	odds[0]= new Array();	odds[0][0]=1.73;	odds[0][1]=3.3;	odds[0][2]= 5.5;	
	team[1]= new Array();	team[1][0]="Espanyol ";	team[1][1]="Draw";	team[1][2]= "Villarreal";		odds[1]= new Array();	odds[1][0]=2.5;	odds[1][1]=3.25;	odds[1][2]= 2.8;	
	team[2]= new Array();	team[2][0]="Malaga ";	team[2][1]="Draw";	team[2][2]= "Xerez";		odds[2]= new Array();	odds[2][0]=1.67;	odds[2][1]=3.4;	odds[2][2]= 6;	
	team[3]= new Array();	team[3][0]="Mallorca ";	team[3][1]="Draw";	team[3][2]= "Sporting Gijon";		odds[3]= new Array();	odds[3][0]=1.75;	odds[3][1]=3.6;	odds[3][2]= 4.75;	
	team[4]= new Array();	team[4][0]="Osasuna ";	team[4][1]="Draw";	team[4][2]= "Getafe";		odds[4]= new Array();	odds[4][0]=2.15;	odds[4][1]=3.2;	odds[4][2]= 3.5;	
	team[5]= new Array();	team[5][0]="Real Zaragoza ";	team[5][1]="Draw";	team[5][2]= "Atletico Madrid";		odds[5]= new Array();	odds[5][0]=2.5;	odds[5][1]=3.5;	odds[5][2]= 2.63;	calc();}
if (matchnumber==21) { team = new Array();	team[0]= new Array();	team[0][0]="Valencia ";	team[0][1]="Draw";	team[0][2]= "Racing Santander";	odds = new Array();	odds[0]= new Array();	odds[0][0]=1.5;	odds[0][1]=4;	odds[0][2]= 7;	calc()};


}
function calc()
{

var total = 0;
var total1 = 0;
var total2 = 0;
var total3 = 0;
var totalx = 0;
var total11 = 0;
var total22 = 0;
var total33 = 0;
var hometeam = 0;
var drawteam = 0;
var awayteam = 0;
var winner = 0;
var result = 0;
var side4 = 0;
var side5 = 0;
var side6 = 0;
var tot = 0;



for(var i = 0; i < team.length; i++)
{
side4 = team[i][0];
side5 = team[i][2];
side6 = team[i][1];
tot = total;
tot2 = totalx;
total11 = odds[i][0];
total22 = odds[i][1];
total33 = odds[i][2];
totalx = total11 + total22 + total33;

hometeam = Math.round(((totalx / total11)/totalx)  * (Math.random() * 7));
awayteam = Math.round(((totalx / total33)/totalx)  * (Math.random() * 7));

if(hometeam > awayteam)
{
	winner = side4;
}
else if(awayteam > hometeam)
{
	winner = side5;
}
else
{
	winner = side6;
}



var odds4 = odds[i][0];
var odds5 = odds[i][2];
var odds6 = odds[i][1];
 

var res = side4 + " <strong>" + hometeam + "</strong>  v  " + side5 + "  <strong>" + awayteam + "</strong> <span class='style2'>Result: "+winner+"</span><br />";

div = document.getElementById("results");


div.innerHTML = div.innerHTML + res + "<br />";



}

var mymatch=document.getElementById("mymatch");
var matchnumber=document.getElementById("mymatch").selectedIndex;
var matchy = mymatch.options[matchnumber].text
document.getElementById("matchx").innerHTML=document.getElementById("matchx").innerHTML+"<h3>"+matchy+"</h3><br />";


}

function span_clear() {
var max = 19;

for (var i=0; i<max+1; i++) {

document.getElementById("results").innerHTML = "";
document.getElementById("matchx").innerHTML = "";
}
}

