function goTo(s) {
	document.location.href = s;
}

function updateCity(v, oCity, oLocation) {
	if(v.length == 4 && !isNaN(v)) {
		new Ajax.Request('/x/postalcode.get.php', {
			method: 	'post',
			postBody:	'd=postalcode_city&postalcode_code='+v,
			onSuccess:	function(r) {
				eval('('+r.responseText+')');
				oCity.value = ret.postalcode_city;
				if(ret.postalcode_location) {
					for(n = 0; n < oLocation.options.length; n++) {
						if(oLocation.options[n].value == ret.postalcode_location)
							oLocation.selectedIndex = n;
					}
				}
			},
			onFailure: function() {
				oCity.value = '';
				oLocation.selectedIndex = 0;
			}
		});
	} else {
		oCity.value = '';
		oLocation.selectedIndex = 0;
	}
}

function photoZoom(photoId, photoSize, k) {
	window.open('/photo.zoom.php?photo_id='+photoId+'&photo_size='+photoSize+'&k='+k, 'windowPhoto', 'height=600,width=800,scrollbars=no,status=no,location=no');
}

function photoGalleryZoom(photoId, galleryId, unionId) {
	window.open('/photo.gallery.zoom.php?photo_id='+photoId+'&gallery_id='+galleryId+'&union_id='+unionId, 'windowPhoto', 'height=630,width=800,scrollbars=no,status=no,location=no');
}

function showTerms() {
	window.open('/info.terms.php', 'windowTerms', 'height=600,width=700,scrollbars=yes,status=no,location=no');
}

function paymentInfoCVC() {
	window.open('/info.payment.cvc.php', 'windowPaymentCVC', 'height=300,width=500,scrollbars=yes,status=no,location=no');
}

function doConfirm(q, u) {
	if(confirm(q)) {
		document.location.href = u;
	}
}