function getNumbers()
{

	try {

		objXMLHTTP = new XMLHttpRequest();

	} catch(e) {

		objXMLHTTP = new ActiveXObject('Microsoft.XMLHTTP');

	}

    try {
    
	objXMLHTTP.onreadystatechange = GetRapidRiverAdults;
	    objXMLHTTP.open('POST', 'http://fishandgame.idaho.gov/ifwis/hdms/SteelheadCounts/service.asmx', true);
	    objXMLHTTP.setRequestHeader('SOAPAction','http://fishandgame.idaho.gov/hdms/SendData');
	    objXMLHTTP.setRequestHeader('Content-Type','text/xml');
	    objXMLHTTP.send(buildSoap('Everything'));



	} catch(e) {
	
	    alert('Code failed ' + e.message);
	
	}
	

	    function buildSoap(IWant) {
	
	        var strSOAP = '<?xml version="1.0" encoding="utf-8"?>';
	        strSOAP += '<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">';
	        strSOAP += '<soap12:Body>';
	        strSOAP += '<SendData xmlns="http://fishandgame.idaho.gov/hdms">';
	        strSOAP += '<Iwant>' + IWant + '</Iwant>';
	        strSOAP += '</SendData>';
	        strSOAP += '</soap12:Body>';
	        strSOAP += '</soap12:Envelope>';
            return strSOAP;

	    }

	    function GetRapidRiverAdults() {
	
	        if (objXMLHTTP.readyState == 4) {
	        
	            var myXML = objXMLHTTP.responseText;
	            parseXML(myXML);
	    
	        }
	    }

	function parseXML(myXML) {
	
	var total;
	 //alert('MyXML is ' + myXML);
	    var junk = myXML.split(">");
        junk = junk[5].split("<");
        var line = junk[0];
	//alert('Line is ' + line);
	    junk = line.split(",");
	    total = 0;
	    var dn = junk[0];
	    var nf = new NumberFormat(dn);
	    nf.setPlaces(0);
	    nf.setCommas(true);
	    var num = nf.toFormatted();
	    if (dn != "") total = total + parseInt(dn);
        document.getElementById('dn').innerHTML=num;
        if (dn != "" && num != '0') document.getElementById('dnc').innerHTML='<a href="http://fishandgame.idaho.gov/ifwis/hdms/steelhead/charts/Dworshak.mht">Dworshak Hatchery Trap</a> <font color="blue"><strong>(1)</strong></font>';
	    var cr = junk[1];
	    var nf = new NumberFormat(cr);
	    nf.setPlaces(0);
	    nf.setCommas(true);
	    var num = nf.toFormatted();
	    if (cr != "") total = total + parseInt(cr);
        document.getElementById('cr').innerHTML=num;
        if (cr != "" && num != '0')  document.getElementById('crc').innerHTML='<a href="http://fishandgame.idaho.gov/ifwis/hdms/steelhead/charts/CrookedRiver.mht">Crooked River</a>';
	    var rrt = junk[2];
	    var nf = new NumberFormat(rrt);
	    nf.setPlaces(0);
	    nf.setCommas(true);
	    var num = nf.toFormatted();
	    if (rrt != "") total = total + parseInt(rrt);
        document.getElementById('rrt').innerHTML=num;
        if (rrt != "" && num != '0') document.getElementById('rrtc').innerHTML='<a href="http://fishandgame.idaho.gov/ifwis/hdms/steelhead/charts/RedRiver.mht">Red River Trap</a>';
	    var kn = junk[3];
	    var nf = new NumberFormat(kn);
	    nf.setPlaces(0);
	    nf.setCommas(true);
	    var num = nf.toFormatted();
	    if (kn != "") total = total + parseInt(kn);
        document.getElementById('kn').innerHTML=num;
        if (kn != "" && num != '0')  document.getElementById('knc').innerHTML='<a href="http://fishandgame.idaho.gov/ifwis/hdms/steelhead/charts/Kooskia.mht">Kooskia Hatchery Trap</a>';
	    var oh = junk[4];
	    var nf = new NumberFormat(oh);
	    nf.setPlaces(0);
	    nf.setCommas(true);
	    var num = nf.toFormatted();
	    if (oh != "") total = total + parseInt(oh);
        document.getElementById('oh').innerHTML=num;
        if (oh != "" && num != '0') document.getElementById('ohc').innerHTML='<a href="http://fishandgame.idaho.gov/ifwis/hdms/steelhead/charts/Oxbow.mht">Hells Canyon/Oxbow Dam Trap</a>  <font color="blue"><strong>(2)</strong></font>';
	    var ph = junk[5];
	    var nf = new NumberFormat(ph);
	    nf.setPlaces(0);
	    nf.setCommas(true);
	    var num = nf.toFormatted();
	    if (ph != "") total = total + parseInt(ph);
        document.getElementById('ph').innerHTML=num;
        if (ph != "" && num != '0') document.getElementById('phc').innerHTML='<a href="http://fishandgame.idaho.gov/ifwis/hdms/steelhead/charts/Pahsimeroi.mht">Pahsimeroi Hatchery Trap</a>';
	    var rrh = junk[6];
	    var nf = new NumberFormat(rrh);
	    nf.setPlaces(0);
	    nf.setCommas(true);
	    var num = nf.toFormatted();
	    if (rrh != "") total = total + parseInt(rrh);
        document.getElementById('rrh').innerHTML=num;
        if (rrh != "" && num != '0') document.getElementById('rrhc').innerHTML='<a href="http://fishandgame.idaho.gov/ifwis/hdms/steelhead/charts/RapidRiver.mht">Rapid River Hatchery Trap</a> <font color="blue"><strong>(3)</strong></font>';
	    var sh = junk[7];
	    var nf = new NumberFormat(sh);
	    nf.setPlaces(0);
	    nf.setCommas(true);
	    var num = nf.toFormatted();
	    if (sh != "") total = total + parseInt(sh);
        document.getElementById('sh').innerHTML=num;
        if (sh != "" && num != '0') document.getElementById('shc').innerHTML='<a href="http://fishandgame.idaho.gov/ifwis/hdms/steelhead/charts/Sawtooth.mht">Sawtooth Hatchery Trap</a>';
	    var ef = junk[8];
	    var nf = new NumberFormat(ef);
	    nf.setPlaces(0);
	    nf.setCommas(true);
	    var num = nf.toFormatted();
	    if (ef != "") total = total + parseInt(ef);
        document.getElementById('ef').innerHTML=num;
        if (ef != "" && num != '0') document.getElementById('efc').innerHTML='<a href="http://fishandgame.idaho.gov/ifwis/hdms/steelhead/charts/EastF||k.mht">East Fork Salmon River Trap</a>';
	    var sq = junk[9];
	    var nf = new NumberFormat(sq);
	    nf.setPlaces(0);
	    nf.setCommas(true);
	    var num = nf.toFormatted();
	    if (sq != "") total = total + parseInt(sq);
	    var nft = new NumberFormat(total);
	    nft.setPlaces(0);
	    nft.setCommas(true);
	    var numt = nft.toFormatted();
        document.getElementById('sq').innerHTML=num;
        if (sq != "" && num != '0') document.getElementById('sqc').innerHTML='<a href="http://fishandgame.idaho.gov/ifwis/hdms/steelhead/charts/SquawCreek.mht">Squaw Creek Trap</a>';
        document.getElementById('tot').innerHTML=numt;
	total = 0;
	    var dnn = junk[10];
	    var nf = new NumberFormat(dnn);
	    nf.setPlaces(0);
	    nf.setCommas(true);
	    var num = nf.toFormatted();
	    if (dnn != "") total = total + parseInt(dnn);
        document.getElementById('dnn').innerHTML=num;
 	    var crn = junk[11];
	    var nf = new NumberFormat(crn);
	    nf.setPlaces(0);
	    nf.setCommas(true);
	    var num = nf.toFormatted();
	    if (crn != "") total = total + parseInt(crn);
        document.getElementById('crn').innerHTML=num;
 	    var rrtn = junk[12];
	    var nf = new NumberFormat(rrtn);
	    nf.setPlaces(0);
	    nf.setCommas(true);
	    var num = nf.toFormatted();
	    if (rrtn != "") total = total + parseInt(rrtn);
        document.getElementById('rrtn').innerHTML=num;
 	    var knn = junk[13];
	    var nf = new NumberFormat(knn);
	    nf.setPlaces(0);
	    nf.setCommas(true);
	    var num = nf.toFormatted();
	    if (knn != "") total = total + parseInt(knn);
        document.getElementById('knn').innerHTML=num;
 	    var ohn = junk[14];
	    var nf = new NumberFormat(ohn);
	    nf.setPlaces(0);
	    nf.setCommas(true);
	    var num = nf.toFormatted();
	    if (ohn != "") total = total + parseInt(ohn);
        document.getElementById('ohn').innerHTML=num;
	    var phn = junk[15];
	    var nf = new NumberFormat(phn);
	    nf.setPlaces(0);
	    nf.setCommas(true);
	    var num = nf.toFormatted();
	    if (phn != "") total = total + parseInt(phn);
        document.getElementById('phn').innerHTML=num;
	    var rrhn = junk[16];
	    var nf = new NumberFormat(rrhn);
	    nf.setPlaces(0);
	    nf.setCommas(true);
	    var num = nf.toFormatted();
	    if (rrhn != "") total = total + parseInt(rrhn);
        document.getElementById('rrhn').innerHTML=num;
	    var shn = junk[17];
	    var nf = new NumberFormat(shn);
	    nf.setPlaces(0);
	    nf.setCommas(true);
	    var num = nf.toFormatted();
	    if (shn != "") total = total + parseInt(shn);
        document.getElementById('shn').innerHTML=num;
	    var efn = junk[18];
	    var nf = new NumberFormat(efn);
	    nf.setPlaces(0);
	    nf.setCommas(true);
	    var num = nf.toFormatted();
	    if (efn != "") total = total + parseInt(efn);
        document.getElementById('efn').innerHTML=num;
	    var sqn = junk[19];
	    var nf = new NumberFormat(sqn);
	    nf.setPlaces(0);
	    nf.setCommas(true);
	    var num = nf.toFormatted();
	    if (sqn != "") total = total + parseInt(sqn);
	    var nft = new NumberFormat(total);
	    nft.setPlaces(0);
	    nft.setCommas(true);
	    var numt = nft.toFormatted();
        document.getElementById('sqn').innerHTML=num;
        document.getElementById('totn').innerHTML=numt;
	    var dnd = junk[20];
	    if (dnd == "" || dnd == "undefined" || dnd == "12:00:00 AM") {dnd = '---';}
        document.getElementById('dnd').innerHTML=dnd;
 	    var crd = junk[21];
	    //alert('cr = ' + cr);
	    if (crd == "" || crd == "undefined" || crd == "12:00:00 AM") {crd = '---';}
        document.getElementById('crd').innerHTML=crd;
 	    var rrtd = junk[22];
	    //alert('rrt = ' + rrt);
	    if (rrtd == "" || rrtd == "undefined" || rrtd == "12:00:00 AM") {rrtd = '---';}
        document.getElementById('rrtd').innerHTML=rrtd;
 	    var knd = junk[23];
	    //alert('kn = ' + kn);
	    if (knd == "" || knd == "undefined" || knd == "12:00:00 AM") {knd = '---';}
        document.getElementById('knd').innerHTML=knd;
 	    var ohd = junk[24];
	    //alert('oh = ' + oh);
	    if (ohd == "" || ohd == "undefined" || ohd == "12:00:00 AM") {ohd = '---';}
        document.getElementById('ohd').innerHTML=ohd;
	    var phd = junk[25];
	    //alert('ph = ' + ph);
	    if (phd == "" || phd == "undefined" || phd == "12:00:00 AM") {phd = '---';}
        document.getElementById('phd').innerHTML=phd;
	    var rrhd = junk[26];
	    //alert('rrh = ' + rrh);
	    if (rrhd == "" || rrhd == "undefined" || rrhd == "12:00:00 AM") {rrhd = '---';}
        document.getElementById('rrhd').innerHTML=rrhd;
	    var shd = junk[27];
	    //alert('sh = ' + sh);
	    if (shd == "" || shd == "undefined" || shd == "12:00:00 AM") {shd = '---';}
        document.getElementById('shd').innerHTML=shd;
	    var efd = junk[28];
	    //alert('ef = ' + ef);
	    if (efd == "" || efd == "undefined" || efd == "12:00:00 AM") {efd = '---';}
        document.getElementById('efd').innerHTML=efd;
	    var sqd = junk[29];
	    //alert('sq = ' + sq);
	    if (sqd == "" || sqd == "undefined" || sqd == "12:00:00 AM") {sqd = '---';}
        document.getElementById('sqd').innerHTML=sqd;

	}
}
