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", showRequiredFields);
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 winOpen(destUrl, winHeight, winWidth, yPos, xPos, className) {
	var id = 'win' + Math.floor(Math.random() * 9999 + 1000 );
	var sCenter = false;
	if ((xPos == undefined) || (xPos == undefined))
		sCenter = true;
	if (winHeight == undefined)
		winHeight = 300;
	if (winWidth == undefined)
		winWidth = 650;
	if (className == undefined)
		className = "dialog";
	var win = new Window({
		id: id,
		recenterAuto: false,
		className: className,
		draggable: true,
		url: destUrl,
		resizable: false,
		width: winWidth,
		height: winHeight,
		showEffectOptions: {duration:0.05}
	});
	Window.keepMultiModalWindow = true;
	if (sCenter) {
		win.showCenter(true);
	} else {
		win.setLocation(yPos, xPos);
		win.show(true);
	}
}

function winClose() {
	win = Windows.getFocusedWindow();
	win.close();
}
