function getNumbers()
{

//alert('Here we go');

	try {

		objXMLHTTP = new XMLHttpRequest();

	} catch(e) {

		objXMLHTTP = new ActiveXObject('Microsoft.XMLHTTP');

	}

    try {
    

	objXMLHTTP.onreadystatechange = GetCounts;
	    objXMLHTTP.open('POST', 'http://fishandgame.idaho.gov/ifwis/hdms/chinookcounts/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 GetCounts() {
	
	//alert('ready state is ' + objXMLHTTP.readyState);
	
	        if (objXMLHTTP.readyState == 4) {
	        
	            var myXML = objXMLHTTP.responseText;
	            //alert('myXML is ' + myXML);
	            parseXML(myXML);
	    
	        }
	    }

	function parseXML(myXML) {
	
		var num;
		var nf;	    
		var dnd;
		var dna;
		var dnj;
		var dnn;
		var kd;
		var ka;
		var kj;
		var kn;
		var crd;
		var cra;
		var crj;
		var crn;
		var redrd;
		var redra;
		var redrj;
		var redrn;
		var pwd;
		var pwa;
		var pwj;
		var pwn;
		var rrd;
		var rra;
		var rrj;
		var rrn;
		var od;
		var oa;
		var oj;
		var on;
		var md;
		var ma;
		var mj;
		var mn;
		var pd;
		var pa;
		var pj;
		var pn;
		var sd;
		var sa;
		var sj;
		var sn;
		var nowDate;
		var junk;
		var line;		

		nowDate = dat(); 
		junk = myXML.split(">");
		junk = junk[5].split("<");
		line = junk[0];
		junk = line.split(",");
		dnd = junk[0];
		if (dnd == "") dnd = nowDate;
		dna = junk[1];
		if (dna == "") dna = '---';
		dnj = junk[2];
		if (dnj == "") dnj = '---';
		dnn = junk[3];
		if (dnn == "") dnn = '---';
		kd = junk[4];
		if (kd == "") kd = nowDate;
		ka = junk[5];
		if (ka == "") ka = '---';
		kj = junk[6];
		if (kj == "") kj = '---';
		kn = junk[7];
		if (kn == "") kn = '---';
		crd = junk[8];
		if (crd == "") crd = nowDate;
		cra = junk[9];
		if (cra == "") cra = '---';
		crj = junk[10];
		if (crj == "") crj = '---';
		crn = junk[11];
		if (crn == "") crn = '---';
		redrd = junk[12];
		if (redrd == "") redrd = nowDate;
		redra = junk[13];
		if (redra == "") redra = '---';
		redrj = junk[14];
		if (redrj == "") redrj = '---';
		redrn = junk[15];
		if (redrn == "") redrn = '---';
		pwd = junk[16];
		if (pwd == "") pwd = nowDate;
		pwa = junk[17];
		if (pwa == "") pwa = '---';
		pwj = junk[18];
		if (pwj == "") pwj = '---';
		pwn = junk[19];
		if (pwn == "") pwn = '---';
		rrd = junk[20];
		if (rrd == "") rrd = nowDate;
		rra = junk[21];
		if (rra == "") rra = '---';
		rrj = junk[22];
		if (rrj == "") rrj = '---';
		rrn = junk[23];
		if (rrn == "") rrn = '---';
		od = junk[24];
		if (od == "") od = nowDate;
		oa = junk[25];
		if (oa == "") oa = '---';
		oj = junk[26];
		if (oj == "") oj = '---';
		on = junk[27];
		if (on == "") on = '---';
		md = junk[28];
		if (md == "") md = nowDate;
		ma = junk[29];
		if (ma == "") ma = '---';
		mj = junk[30];
		if (mj == "") mj = '---';
		mn = junk[31];
		if (mn == "") mn = '---';
		pd = junk[32];
		if (pd == "") pd = nowDate;
		pa = junk[33];
		if (pa == "") pa = '---';
		pj = junk[34];
		if (pj == "") pj = '---';
		pn = junk[35];
		if (pn == "") pn = '---';
		sd = junk[36];
		if (sd == "") sd = nowDate;
		sa = junk[37];
		if (sa == "") sa = '---';
		sj = junk[38];
		if (sj == "") sj = '---';
		sn = junk[39];
		if (sn == "") sn = '---';
		
		document.getElementById('dnd').innerHTML=dnd;
		nf = new NumberFormat(dna);
		nf.setPlaces(0);
		nf.setCommas(true);
		num = nf.toFormatted();
		document.getElementById('dna').innerHTML=num;
		nf = new NumberFormat(dnj);
		nf.setPlaces(0);
		nf.setCommas(true);
		num = nf.toFormatted();
       	document.getElementById('dnj').innerHTML=num;
		nf = new NumberFormat(dnn);
		nf.setPlaces(0);
		nf.setCommas(true);
		num = nf.toFormatted();
       	document.getElementById('dnn').innerHTML=num;
		document.getElementById('kd').innerHTML=kd;
		nf = new NumberFormat(ka);
		nf.setPlaces(0);
		nf.setCommas(true);
		num = nf.toFormatted();
       	document.getElementById('ka').innerHTML=num;
		nf = new NumberFormat(kj);
		nf.setPlaces(0);
		nf.setCommas(true);
		num = nf.toFormatted();
       	document.getElementById('kj').innerHTML=num;
		nf = new NumberFormat(kn);
		nf.setPlaces(0);
		nf.setCommas(true);
		num = nf.toFormatted();
       	document.getElementById('kn').innerHTML=num;
		document.getElementById('crd').innerHTML=crd;
		nf = new NumberFormat(cra);
		nf.setPlaces(0);
		nf.setCommas(true);
		num = nf.toFormatted();
       	document.getElementById('cra').innerHTML=num;
		nf = new NumberFormat(crj);
		nf.setPlaces(0);
		nf.setCommas(true);
		num = nf.toFormatted();
       	document.getElementById('crj').innerHTML=num;
		nf = new NumberFormat(crn);
		nf.setPlaces(0);
		nf.setCommas(true);
		num = nf.toFormatted();
       	document.getElementById('crn').innerHTML=num;
		document.getElementById('redrd').innerHTML=redrd;
		nf = new NumberFormat(redra);
		nf.setPlaces(0);
		nf.setCommas(true);
		num = nf.toFormatted();
        document.getElementById('redra').innerHTML=num;
		nf = new NumberFormat(redrj);
		nf.setPlaces(0);
		nf.setCommas(true);
		num = nf.toFormatted();
        document.getElementById('redrj').innerHTML=num;
		nf = new NumberFormat(redrn);
		nf.setPlaces(0);
		nf.setCommas(true);
		num = nf.toFormatted();
        document.getElementById('redrn').innerHTML=num;
		document.getElementById('pwd').innerHTML=pwd;
		nf = new NumberFormat(pwa);
		nf.setPlaces(0);
		nf.setCommas(true);
		num = nf.toFormatted();
       	document.getElementById('pwa').innerHTML=num;
		nf = new NumberFormat(pwj);
		nf.setPlaces(0);
		nf.setCommas(true);
		num = nf.toFormatted();
		document.getElementById('pwj').innerHTML=num;
		nf = new NumberFormat(pwn);
		nf.setPlaces(0);
		nf.setCommas(true);
		num = nf.toFormatted();
       	document.getElementById('pwn').innerHTML=num;
		document.getElementById('rrd').innerHTML=rrd;
		nf = new NumberFormat(rra);
		nf.setPlaces(0);
		nf.setCommas(true);
		num = nf.toFormatted();
       	document.getElementById('rra').innerHTML=num;
		nf = new NumberFormat(rrj);
		nf.setPlaces(0);
		nf.setCommas(true);
		num = nf.toFormatted();
       	document.getElementById('rrj').innerHTML=num;
		nf = new NumberFormat(rrn);
		nf.setPlaces(0);
		nf.setCommas(true);
		num = nf.toFormatted();
       	document.getElementById('rrn').innerHTML=num;
		document.getElementById('od').innerHTML=od;
		nf = new NumberFormat(oa);
		nf.setPlaces(0);
		nf.setCommas(true);
		num = nf.toFormatted();
       	document.getElementById('oa').innerHTML=num;
		nf = new NumberFormat(oj);
		nf.setPlaces(0);
		nf.setCommas(true);
		num = nf.toFormatted();
       	document.getElementById('oj').innerHTML=num;
		nf = new NumberFormat(on);
		nf.setPlaces(0);
		nf.setCommas(true);
		num = nf.toFormatted();
       	document.getElementById('on').innerHTML=num;
		document.getElementById('md').innerHTML=md;
		nf = new NumberFormat(ma);
		nf.setPlaces(0);
		nf.setCommas(true);
		num = nf.toFormatted();
       	document.getElementById('ma').innerHTML=num;
		nf = new NumberFormat(mj);
		nf.setPlaces(0);
		nf.setCommas(true);
		num = nf.toFormatted();
       	document.getElementById('mj').innerHTML=num;
		nf = new NumberFormat(mn);
		nf.setPlaces(0);
		nf.setCommas(true);
		num = nf.toFormatted();
       	document.getElementById('mn').innerHTML=num;
		document.getElementById('pd').innerHTML=pd;
		nf = new NumberFormat(pa);
		nf.setPlaces(0);
		nf.setCommas(true);
		num = nf.toFormatted();
       	document.getElementById('pa').innerHTML=num;
		nf = new NumberFormat(pj);
		nf.setPlaces(0);
		nf.setCommas(true);
		num = nf.toFormatted();
       	document.getElementById('pj').innerHTML=num;
		nf = new NumberFormat(pn);
		nf.setPlaces(0);
		nf.setCommas(true);
		num = nf.toFormatted();
       	document.getElementById('pn').innerHTML=num;
		document.getElementById('sd').innerHTML=sd;
		nf = new NumberFormat(sa);
		nf.setPlaces(0);
		nf.setCommas(true);
		num = nf.toFormatted();
       	document.getElementById('sa').innerHTML=num;
		nf = new NumberFormat(sj);
		nf.setPlaces(0);
		nf.setCommas(true);
		num = nf.toFormatted();
       	document.getElementById('sj').innerHTML=num;
		nf = new NumberFormat(sn);
		nf.setPlaces(0);
		nf.setCommas(true);
		num = nf.toFormatted();
       	document.getElementById('sn').innerHTML=num;

	}

	function dat() {
	
		var currentTime = new Date();
		var month = currentTime.getMonth() + 1;
		var day = currentTime.getDate();
		var year = currentTime.getFullYear();
		return month + "/" + day + "/" + year;
	
	}
	
}
