
	var current_page = '001';
	function chad_page(next_page){
		//alert(1);
		// Don't refresh...probably won't make a difference
		//if(document.getElementById('result_' + next_page).src.search('eac_stars_00') >= 0){
		//chad_results(next_page);
		//}
		//alert(2);
		// Always Refresh if next_page is not a comma delim list
		if(next_page.length == 3){
			chad_results(next_page);
		} else {
			var aaa = next_page.split(',');
			next_page = aaa[0];
		}
		
		document.getElementById('page_' + current_page).style.display='none';
		//alert(3);
		document.getElementById('page_' + next_page).style.display='block';
		//alert(4);
		current_page = next_page;
		//alert(5);
	}

	function chad_choice(page){
		var z_choice = 'blank';
		var o_choice = eval('document.all.choice_' + page); // getElementById() does not work!
		var z_yes_no = 'blank';
		var o_yes_no = eval('document.all.yes_no_' + page); // getElementById() does not work!
		//alert(1);
		for (i = 0; i < 5 ; i++){
			if(o_choice[i].checked)	{
				z_choice = o_choice[i].value;
			}
		}	
		//alert(z_choice);
		//alert(2);
		for (i = 0; i < 2 ; i++){
			if(o_yes_no[i].checked)	{
				z_yes_no = o_yes_no[i].value;
			}
		}	
		
		//alert(z_yes_no);
		//alert(3)

		if (z_yes_no == 'blank' || z_choice == 'blank'){
			alert('Please both a Yes/No and a Choice');
		} else {
			//alert(z_yes_no + cr + z_choice);
			chad_send_choice(page,z_yes_no,z_choice);
		}

	}
	
	function loadup(){
		//alert(current_page);
		document.getElementById("page_" + current_page).style.display='block';
		chad_results(current_page);
	}
	function loadup_products(){
		document.getElementById("page_" + current_page).style.display='block';
	}

	
	<!--- AJAX_JR: Get Images to Portray Results --->
	var cr = '\n';
	var w_err = '';
	
	var xmlDocResult = '';
  	function chad_results(page) {
        var url = ("eac_results.cfm");
        url += ("?page="+page);
		url += ("&rrr="+Math.random());
        //alert(url);
 		if (window.XMLHttpRequest) { // Non-IE browsers and IE 7
		  	xmlDocResult = new XMLHttpRequest();
		  	xmlDocResult.onreadystatechange = chad_results2 ;
		  	xmlDocResult.open( "GET", url, true);
 			xmlDocResult.setRequestHeader("Content-Type", "text/xml");
		  	xmlDocResult.send(null);
		} else {
			if (window.ActiveXObject) { // IE
			  	xmlDocResult = new ActiveXObject("Microsoft.XMLHTTP");
			  	xmlDocResult.onreadystatechange = chad_results2 ;
			  	xmlDocResult.open( "GET", url, true);
			  	xmlDocResult.setRequestHeader("Content-Type", "text/xml");
			  	xmlDocResult.send();
			}
		}
 	}
  	
    function chad_results2() {
        if ( xmlDocResult.readyState != 4 ) return ;
        var bbb = xmlDocResult.responseText
        var aaa = bbb.split("^");
        zstart = 1; //::start::
        var zok = 2;
        var zmsg = 3;
        // 4 ... end is data returned
        var page = 4;
        var src = 5;
        var zend = 6; //::end::
        // Kick out a browser with the cf error msg then exit this function
        if(aaa[zstart] != '::start::'){
        	if(window.w_err){window.w_err.close();}
        	w_err = window.open('about:blank', 'w_err','width=1000,height=600,top=0,left=0,toolbar=1,location=0,menuBar=1,scrollBars=1,resizable=1');			
        	w_err.document.write('<title>Error xmlDocResult</title>' + bbb);
        	return ;
        }
    	// Hopefully a good message
        //alert(aaa[page] + cr+ aaa[src]); // May not want this message depending on below
        // Whatever this program needs to do
        document.getElementById('EAC_Stars_'+aaa[page]).src='images/EAC_Stars_0' + aaa[src] + '.jpg';
     }


	// AJAX_JR: Get Choice and put in table
	var xmlDocChoice = '';
  	function chad_send_choice(page,z_yes_no,z_choice) {
        var url = "eac_choice.cfm";
        url += ("?page="+page);
        url += ("&yesno="+z_yes_no);
        url += ("&choice="+z_choice);
        url += ("&rrr="+Math.random());
        //alert(url);
  		if (window.XMLHttpRequest) { // Non-IE browsers and IE 7
		  	xmlDocChoice = new XMLHttpRequest();
		  	xmlDocChoice.onreadystatechange = chad_send_choice2 ;
		  	xmlDocChoice.open( "GET", url, true);
 			xmlDocChoice.setRequestHeader("Content-Type", "text/xml");
		  	xmlDocChoice.send(null);
		} else {
			if (window.ActiveXObject) { // IE
			  	xmlDocChoice = new ActiveXObject("Microsoft.XMLHTTP");
			  	xmlDocChoice.onreadystatechange = chad_send_choice2 ;
			  	xmlDocChoice.open( "GET", url, true);
			  	xmlDocChoice.setRequestHeader("Content-Type", "text/xml");
			  	xmlDocChoice.send();
			}
		}
 	}
  	
    function chad_send_choice2() {
        if ( xmlDocChoice.readyState != 4 ) return ;
        var bbb = xmlDocChoice.responseText
        var aaa = bbb.split("^");
        zstart = 1; //::start::
        var zok = 2;
        var zmsg = 3;
        // 4 ... end is data returned
        var page = 4;
        var yesno = 5;
        var choice = 6;
        var who = 7;
        var zend = 8; //::end::
        // Kick out a browser with the cf error msg then exit this function
        if(aaa[zstart] != '::start::'){
        	if(window.w_err){window.w_err.close();}
        	w_err = window.open('about:blank', 'w_err','width=1000,height=600,top=0,left=0,toolbar=1,location=0,menuBar=1,scrollBars=1,resizable=1');			
        	w_err.document.write('<title>Error xmlDocResult</title>' + bbb);
        	return ;
        }
    	// Hopefully a good message
        // alert(aaa[page] + cr+ aaa[yesno] + cr+ aaa[choice] + cr+ aaa[who]); // May not want this message depending on below
        // Whatever this program needs to do
        document.getElementById('thankyou_'+aaa[page]).innerHTML = 'Thank You!';
        // Refresh Results....probably won't make a difference
        chad_results(aaa[page])
    }
	 
	 //Rollovers for the Rows and gto pages
	 function chad(ss,oo,url,page){
		if(ss == 'onmouseout'){
			oo.style.color = '#ffffff';
			oo.style.background = '#5F9215';
		}
		if(ss == 'onmouseover'){
			oo.style.color = '#ffffff';
			oo.style.background = '#004C1F';
			oo.style.cursor = 'hand';
		}
		if(ss == 'onclick'){
			if(url == '-'){
				chad_page(page);
			} else {
				if(url == 'na.htm' || url == 'na.cfm'){
					alert('Feature NOT yet available!');
				} else {
					window.location = url;
				}
			}
		}
	
		
	}
	
		 //Rollovers for the Calendars
	 function chad2(ss,oo,url,page){
		if(ss == 'onmouseout'){
			oo.style.color = '#000000';
			oo.style.background = '#D2DFC0';
		}
		if(ss == 'onmouseover'){
			oo.style.color = '#ffffff';
			oo.style.background = '#2f9824';
			oo.style.cursor = 'hand';
		}
		if(ss == 'onclick'){
			if(url == '-'){
				chad_page(page);
			} else {
				if(url == 'na.htm' || url == 'na.cfm'){
					alert('Feature NOT yet available!');
				} else {
					window.location = url;
				}
			}
		}
	
		
	}

