Event.observe(window, "load", setup, false) ;
function setup() {
	if ($("user_country")) Event.observe($("user_country"), "change", setTsAndCsLink, false) ;
	if ($("user_country_bt")) Event.observe($("user_country_bt"), "change", setTsAndCsLink, false) ;
	setTsAndCsLink() ;
}
function setTsAndCsLink(evt) {
	if (evt && $F(Event.element(evt)) == "United States of America") {
		if ($("terms-cl-us")) $("terms-cl-us").show() ;
		if ($("terms-cl")) $("terms-cl").hide() ;
		if ($("terms-bt-us")) $("terms-bt-us").show() ;
		if ($("terms-bt")) $("terms-bt").hide() ;
		if ($("terms-bt-us2")) $("terms-bt-us2").show() ;
		if ($("terms-bt2")) $("terms-bt2").hide() ;
	}
	else {
		if ($("terms-cl")) $("terms-cl").show() ;
		if ($("terms-cl-us")) $("terms-cl-us").hide() ;
		if ($("terms-bt")) $("terms-bt").show() ;
		if ($("terms-bt-us")) $("terms-bt-us").hide() ;
		if ($("terms-bt2")) $("terms-bt2").show() ;
		if ($("terms-bt-us2")) $("terms-bt-us2").hide() ;
	}
}

function copyUserAgreement(theCheckBox,theTarget,theValue)
{
	var theHiddenField = document.getElementById(theTarget);
	if(theCheckBox.checked)
	{
		theHiddenField.value = theValue;
	}
	else
	{
		theHiddenField.value = "";
	}
}


Event.observe(window, "load", setup, false) ;
function setup() {
	if ($("user_country")) Event.observe($("user_country"), "change", setTsAndCsLink, false) ;
	if ($("user_country_bt")) Event.observe($("user_country_bt"), "change", setTsAndCsLink, false) ;
	setTsAndCsLink() ;
}
function setTsAndCsLink(evt) {
	if (evt && $F(Event.element(evt)) == "United States of America") {
		if ($("terms-cl-us")) $("terms-cl-us").show() ;
		if ($("terms-cl")) $("terms-cl").hide() ;
		if ($("terms-bt-us")) $("terms-bt-us").show() ;
		if ($("terms-bt")) $("terms-bt").hide() ;
		if ($("terms-bt-us2")) $("terms-bt-us2").show() ;
		if ($("terms-bt2")) $("terms-bt2").hide() ;
	}
	else {
		if ($("terms-cl")) $("terms-cl").show() ;
		if ($("terms-cl-us")) $("terms-cl-us").hide() ;
		if ($("terms-bt")) $("terms-bt").show() ;
		if ($("terms-bt-us")) $("terms-bt-us").hide() ;
		if ($("terms-bt2")) $("terms-bt2").show() ;
		if ($("terms-bt-us2")) $("terms-bt-us2").hide() ;
	}
}