function replace_html2(id, ajaxDiv2) { 
	document.getElementById(id).innerHTML = ajaxDiv2;
 }

function show_progressbar2(id) { 
	replace_html2(id, '<br><img src="../site_files/site_images/loading.gif" border="0" alt="Loading, please wait..." /><br><br><br>');
 }

function ajaxFunction2(){
	show_progressbar2('ajaxDiv2');
	var ajaxRequest2;  // The variable that makes Ajax possible!
	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest2 = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest2 = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest2 = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest2.onreadystatechange = function(){
		if(ajaxRequest2.readyState == 4){
			var ajaxDisplay = document.getElementById('ajaxDiv2');
			ajaxDisplay.innerHTML = ajaxRequest2.responseText;
			//ajaxDisplay.innerHTML = param;
		}

	}

	var service_id = encodeURIComponent(document.getElementById('service_id').value);
	var fname = encodeURIComponent(document.getElementById('fname').value);
	var lname = encodeURIComponent(document.getElementById('lname').value);
	var email = encodeURIComponent(document.getElementById('email').value);
	var organization = encodeURIComponent(document.getElementById('organization').value);
	var address = encodeURIComponent(document.getElementById('address').value);
	var city = encodeURIComponent(document.getElementById('city').value);
	var state = encodeURIComponent(document.getElementById('state').value);
	var zip = encodeURIComponent(document.getElementById('zip').value);

	var param="service_id="+service_id;
	param=param+"&fname="+fname;
	param=param+"&lname="+lname;
	param=param+"&email="+email;
	param=param+"&organization="+organization;
	param=param+"&address="+address;
	param=param+"&city="+city;
	param=param+"&state="+state;
	param=param+"&zip="+zip;

	ajaxRequest2.open("POST", "../site_files/ajax-php/subscribe.php", true);
	ajaxRequest2.setRequestHeader("Content-type", "application/x-www-form-urlencoded")
	ajaxRequest2.send(param); 
}




