// <!--
var bNetscape4     = false;
var bNetscape6     = false;
var bExplorer4plus = false;
var bOpera5        = false;

if ( (navigator.userAgent.indexOf("Opera 5") > -1) || (navigator.userAgent.indexOf("Opera/5") > -1) ) { bOpera5 = true; }
else if ( navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion.substring(0,1) >= "4" ) {  bExplorer4plus = true; }
else if ( navigator.appName == "Netscape" && navigator.appVersion.substring(0,1) == "4" ) {     bNetscape4 = true; }
else if ( navigator.appName == "Netscape" && navigator.appVersion.substring(0,1) >= "5" ) {     bNetscape6 = true; }

function set_country(et) {
	_form = et.form;
	et.title = et.options[et.selectedIndex].text;
	id_country = et.options[et.selectedIndex].value.substring(0, et.options[et.selectedIndex].value.indexOf(':'));
	country_select = _form.elements["country"];
	country_select.value = id_country;
	country_select.title = country_select.options[country_select.selectedIndex].text;
}

function set_country_state(et) {
	_form = et.form;
	et.title = et.options[et.selectedIndex].text;
	id_country = et.options[et.selectedIndex].value;
	
	state_select = _form.elements["state"];
	
	for (i = 0; i < state_select.length; i++) {
		state_country = state_select.options[i].value.substring(0, state_select.options[i].value.indexOf(':'));
		if (state_country == id_country) {
			state_select.value = state_select.options[i].value;
			break;
		}
	}
	state_select.title = state_select.options[state_select.selectedIndex].text;
}
// -->
