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;
		var dnNone = true;	
		var kNone = true;	
		var crNone = true;	
		var redrNone = true;	
		var pwNone = true;	
		var rrNone = true;	
		var oNone = true;	
		var mNone = true;	
		var pNone = true;	
		var sNone = true;
		var NoneFound = true;	

		nowDate = dat(); 
		junk = myXML.split(">");
		junk = junk[5].split("<");
		line = junk[0];
		junk = line.split(",");
		dnd = junk[0];

		if (dnd != "1/1/0001") {
			
			NoneFound = false;
			dnNone = false;
			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 != "1/1/0001") {

			NoneFound = false;
			kNone = false;
			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 != "1/1/0001") {

			NoneFound = false;
			crNone = false;
			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 != "1/1/0001") {

			NoneFound = false;
			redrNone = false;
			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 != "1/1/0001") {

			NoneFound = false;
			pwNone = false;
			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 != "1/1/0001") {

			NoneFound = false;
			rrNone = false;
			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 != "1/1/0001") {

			NoneFound = false;
			oNone = false;
			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 != "1/1/0001") {

			NoneFound = false;
			mNone = false;
			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 != "1/1/0001") {

			NoneFound = false;
			pNone = false;
			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 != "1/1/0001") {

			NoneFound = false;
			sNone = false;
			if (sd == "") sd = nowDate;
			sa = junk[37];
			if (sa == "") sa = '---';
			sj = junk[38];
			if (sj == "") sj = '---';
			sn = junk[39];
			if (sn == "") sn = '---';

		} 		

		
		if (! dnNone) {

			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;

		}

		if (! kNone) {

			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;

		}


		if (! crNone) {

			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;	

		}

		if (! redrNone) {

			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;

		}

		if (! pwNone) {

			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;

		}

		if (! rrNone) {

			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;

		}

		if (! oNone) {

			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;

		}

		if (! mNone) {

			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;

		}

		if (! pNone) {

			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;

		}

		if (! pNone) {

			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;


		}

		if (NoneFound) alert("No Chinook have been trapped yet for 2011");

	}

	function dat() {
	
		var currentTime = new Date();
		var month = currentTime.getMonth() + 1;
		var day = currentTime.getDate();
		var year = currentTime.getFullYear();
		return month + "/" + day + "/" + year;
	
	}
	
}

