function show_loading(){
	email = $('email').value;
	add_address(email);
	$('submit_btn').disable();
	$('please_wait').show();
	return true;
}

function add_address(email){
	var url = 'http://visitor.constantcontact.com/d.jsp';
	// notice the use of a proxy to circumvent the Same Origin Policy.

	new Ajax.Request(url, {
		method: 'post',
		postBody: $H({
			m: 	'1101554955174',
			p: 	'oi',
			ea: email,
			go: 'Go'
		}).toQueryString()
	});
}


function state_by_country(id) {
	var states = document.getElementById('state');
	if(id == 0) {
		for(i=0;i<states.length;i++) {
			states.options[i].removeAttribute('style');
		}
	}
	if(id == 1) {
		if(states.options[states.selectedIndex].value>65) {
			states.selectedIndex = 0;
		}

		for(i=0;i<states.length;i++) {
			if(states.options[i].value>65) {
				states.options[i].setAttribute('style', 'display: none;');
			}
			if(states.options[i].value<66) {
				states.options[i].removeAttribute('style');
			}
		}
	}
	if(id == 2) {
		if(states.options[states.selectedIndex].value<65) {
			states.selectedIndex = 0;
		}

		for(i=0;i<states.length;i++) {
			if(states.options[i].value>65) {
				states.options[i].removeAttribute('style');	
			}
			if(states.options[i].value<66) {
				states.options[i].setAttribute('style', 'display: none;');
			}
		}
	}
}
function country_by_state(id) {
	var countries = document.getElementById('country');
	if (id.value>65) {
		countries.selectedIndex=2;
	}
	if (id.value<66 && id.value>0) {
		countries.selectedIndex=1;
	}
}