if(!document.all)location="oom09-default.html";

// create a document object & load a XML document
var xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("oom09.xml");

// declare variables
var poss=xmlDoc.getElementsByTagName("pos");
var names=xmlDoc.getElementsByTagName("name");
var divs=xmlDoc.getElementsByTagName("div");
var ones=xmlDoc.getElementsByTagName("one");
var twos=xmlDoc.getElementsByTagName("two");
var threes=xmlDoc.getElementsByTagName("three");
var fours=xmlDoc.getElementsByTagName("four");
var fives=xmlDoc.getElementsByTagName("five");
var sixs=xmlDoc.getElementsByTagName("six");
var sevens=xmlDoc.getElementsByTagName("seven");
var eights=xmlDoc.getElementsByTagName("eight");
var nines=xmlDoc.getElementsByTagName("nine");
var tens=xmlDoc.getElementsByTagName("ten");
var elevens=xmlDoc.getElementsByTagName("eleven");
var twelves=xmlDoc.getElementsByTagName("twelve");
var thirteens=xmlDoc.getElementsByTagName("thirteen");
var fourteens=xmlDoc.getElementsByTagName("fourteen");
var fifteens=xmlDoc.getElementsByTagName("fifteen");
var sixteens=xmlDoc.getElementsByTagName("sixteen");

var carrforws=xmlDoc.getElementsByTagName("carrforw");

var totals=xmlDoc.getElementsByTagName("total");

// get element values
function getpos(i){return poss.item(i).text}
function getname(i){return names.item(i).text}
function getdiv(i){return divs.item(i).text}
function getone(i){return ones.item(i).text}
function gettwo(i){return twos.item(i).text}
function getthree(i){return threes.item(i).text}
function getfour(i){return fours.item(i).text}
function getfive(i){return fives.item(i).text}
function getsix(i){return sixs.item(i).text}
function getseven(i){return sevens.item(i).text}
function geteight(i){return eights.item(i).text}
function getnine(i){return nines.item(i).text}
function getten(i){return tens.item(i).text}
function geteleven(i){return elevens.item(i).text}
function gettwelve(i){return twelves.item(i).text}
function getthirteen(i){return thirteens.item(i).text}
function getfourteen(i){return fourteens.item(i).text}
function getfifteen(i){return fifteens.item(i).text}
function getsixteen(i){return sixteens.item(i).text}
function getcarrforw(i){return carrforws.item(i).text}
function gettotal(i){return totals.item(i).text}


// function division 
function Division(str)
{

var list="<table width=100% border='1px' cellspacing='0px'>";
var condition=(getpos(i)==str); 

list+="<tr><th colspan=20><font size='+1'><center>"+str+" Division"+"</center></font></th></tr>";



list+="<tr><th width=4%>"+"Pos"+"</th><th width=14%>"+"Name"+"</th><th width=4%>"+"C/F"+"</th><th width=4%>"+"<img src='flag1.jpg' height=40 width=30 border=1>"+"</th><th width=4%>"+"<img src='flag2.jpg' height=40 width=30 border=1>"+"</th><th width=4%>"+"<img src='flag3.jpg' height=40 width=30 border=1>"+"</th><th width=4%>"+"<img src='flag4.jpg' height=40 width=30 border=1>"+"</th><th width=4%>"+"<img src='flag5.jpg' height=40 width=30 border=1>"+"</th><th width=4%>"+"<img src='flag6.jpg' height=40 width=30 border=1 >"+"</th><th width=4%>"+"<img src='flag7.jpg' height=40 width=30 border=1>"+"</th><th width=4%>"+"<img src='flag8.jpg' height=40 width=30 border=1>"+"</th><th width=4%>"+"<img src='flag9.jpg' height=40 width=30 border=1>"+"</th><th width=4%>"+"<img src='flag10.jpg' height=40 width=30 border=1>"+"</th><th width=4%>"+"<img src='flag11.jpg' height=40 width=30 border=1>"+"</th><th width=4%>"+"<img src='flag12.jpg' height=40 width=30 border=1>"+"</th><th width=4%>"+"<img src='flag13.jpg' height=40 width=30 border=1>"+"</th><th width=4%>"+"<img src='flag14.jpg' height=40 width=30 border=1>"+"</th><th width=4%>"+"<img src='flag15.jpg' height=40 width=30 border=1>"+"</th><th width=4%>"+"<img src='flag16.jpg' height=40 width=30 border=1>"+"</th><th width=4%>"+"Total"+"</th></tr>";

for(var i=0; i< poss.length; i++)
{

var condition=(getdiv(i)==str); 

if(condition) 
 {
list+="<tr><td>"+getpos(i)+"</td><td class=tdl>"+getname(i)+"</td><td>"+getcarrforw(i)+"</td><td>"+getone(i)+"</td><td>"+gettwo(i)+"</td><td>"+getthree(i)+"</td><td>"+getfour(i)+"</td><td>"+getfive(i)+"</td><td>"+getsix(i)+"</td><td>"+getseven(i)+"</td><td>"+geteight(i)+"</td><td>"+getnine(i)+"</td><td>"+getten(i)+"</td><td>"+geteleven(i)+"</td><td>"+gettwelve(i)+"</td><td>"+getthirteen(i)+"</td><td>"+getfourteen(i)+"</td><td>"+getfifteen(i)+"</td><td>"+getsixteen(i)+"</td><td>"+gettotal(i)+"</td></tr>";
}
}


{
list+="<tr><td class=tdl colspan=20><b><u>"+"Notes:"+"</u></b></td></tr>";

list+="<tr><td class=tdl colspan=20>"+"Once a player is 'promoted' to a higher division, 50% of his points gained at that time will be carried forward on a one-off basis. Subsequent promotions to the same division, no further points will be carried forward."+"</u></b></td></tr>";
list+="<tr><td class=tdl colspan=20>"+"If a player is demoted, no points are carried forward, and if subsequently promoted the player will pick-up his previous points from the higher level. "+"</u></b></td></tr>";
list+="<tr><td class=tdl colspan=20>"+"A player may appear in more than one division depending on handicap changes during the season. This will be especially true of Seedling and Girl members."+"</u></b></td></tr>";
list+="<tr><td class=tdl colspan=20>"+"The order of merit winner for 2009 will be the best player in the Gold Division although there will be awards for winners of the other sections. The order of precedence is Gold, Silver, Bronze and Academy. Girl players will have already appeared in one of these categories. The final order of merit position will be the best position attained in the above order."+"</u></b></td></tr>";
list+="<tr><td class=tdl colspan=20>"+"The Junior Shoot-Out Final will consist of the top 7 players from the Gold Division plus 3 qualifiers. The qualifying competition will consist of positions 8 to 9 from the Gold Division, the first 5 from the Silver Division, and the best 3 from the Bronze Division."+"</u></b></td></tr>";


}
list+="</table>";
sho.innerHTML=list;
}

// function seedlings 
function Seedlings(str)
{

var list="<table width=100% border='1px' cellspacing='0px'>";
var condition=(getpos(i)==str); 

list+="<tr><th colspan=20><font size='+1'><center>"+str+" Division"+"</center></font></th></tr>";



list+="<tr><th width=4%>"+"Pos"+"</th><th width=14%>"+"Name"+"</th><th width=4%>"+"<img src='flag1.jpg' height=40 width=30 border=1>"+"</th><th width=4%>"+"<img src='flag2.jpg' height=40 width=30 border=1>"+"</th><th width=4%>"+"<img src='flag3.jpg' height=40 width=30 border=1>"+"</th><th width=4%>"+"<img src='flag4.jpg' height=40 width=30 border=1>"+"</th><th width=4%>"+"<img src='flag5.jpg' height=40 width=30 border=1>"+"</th><th width=4%>"+"<img src='flag6.jpg' height=40 width=30 border=1 >"+"</th><th width=4%>"+"<img src='flag7.jpg' height=40 width=30 border=1>"+"</th><th width=4%>"+"<img src='flag8.jpg' height=40 width=30 border=1>"+"</th><th width=4%>"+"<img src='flag9.jpg' height=40 width=30 border=1>"+"</th><th width=4%>"+"<img src='flag10.jpg' height=40 width=30 border=1>"+"</th><th width=4%>"+"<img src='flag11.jpg' height=40 width=30 border=1>"+"</th><th width=4%>"+"<img src='flag12.jpg' height=40 width=30 border=1>"+"</th><th width=4%>"+"<img src='flag13.jpg' height=40 width=30 border=1>"+"</th><th width=4%>"+"<img src='flag14.jpg' height=40 width=30 border=1>"+"</th><th width=4%>"+"<img src='flag15.jpg' height=40 width=30 border=1>"+"</th><th width=4%>"+"<img src='flag16.jpg' height=40 width=30 border=1>"+"</th><th width=4%>"+"Total"+"</th></tr>";

for(var i=0; i< poss.length; i++)
{

var condition=(getdiv(i)==str); 

if(condition) 
 {
list+="<tr><td>"+getpos(i)+"</td><td class=tdl>"+getname(i)+"</td><td>"+getone(i)+"</td><td>"+gettwo(i)+"</td><td>"+getthree(i)+"</td><td>"+getfour(i)+"</td><td>"+getfive(i)+"</td><td>"+getsix(i)+"</td><td>"+getseven(i)+"</td><td>"+geteight(i)+"</td><td>"+getnine(i)+"</td><td>"+getten(i)+"</td><td>"+geteleven(i)+"</td><td>"+gettwelve(i)+"</td><td>"+getthirteen(i)+"</td><td>"+getfourteen(i)+"</td><td>"+getfifteen(i)+"</td><td>"+getsixteen(i)+"</td><td>"+gettotal(i)+"</td></tr>";
}
}


{
list+="<tr><td class=tdl colspan=12 border='0'><b><u>"+"Notes:"+"</u></b></td></tr>";


list+="<tr><td class=tdl colspan=12 border='0'>"+"The Junior Shoot-Out Final will consist of the top 7 players from the Gold Division plus 3 qualifiers. The qualifying competition will consist of positions 8 to 9 from the Gold Division, the first 5 from the Silver Division, and the best 3 from the Bronze Division."+"</u></b></td></tr>";


}
list+="</table>";
sho.innerHTML=list;
}
