function showRequiredFields() {
	$$('.required').each(function(e) {
		span = new Element("span");
		span.insert("*");
		span.setStyle('color:#FF0000;');
		e.insert({top: span});
	})
}
Event.observe(document, "dom:loaded", function(e){
	if (document.getElementById('sharethis')) { $('sharethis').hide(); }
	if (document.getElementById('aboutMain')) { $('aboutMain').toggle(); }
	showRequiredFields();
	$$('.search').each(function(e){
		Event.observe(e, 'focus', function(f){
			searchFields(e.id);
		});
	});
});
function toggleState() {
	if ($('country').value != 'US') {
		$('state').hide();
		$('stateOther').show();
	} else {
		$('stateOther').hide();
		$('state').show();
	}
}
function doTerms() {
	if ($('termsConfirm').checked) {
		return true;
	} else {
		alert("Please indicate that you have read and agreed to our terms and conditions.");
		return false;
	}
}
function alignHeight() {
	var height = $('content').getHeight();
	if ($('sidenav') != undefined) $('sidenav').setStyle({height:height + 'px'});
};
function searchFields(e) {
	var v = $(e).value;
	if (v.substring(v.length-3) == '...') {
		$(e).value = "";
		Event.observe($(e), 'blur', function(f) {
			if (!$(e).value.length) {
				$(e).value = v;
			}
		});
	}
}
