function updatecity(cityvar) {
var xmlHttpReq = false;
var self = this;

if (window.XMLHttpRequest) {
self.xmlHttpReq = new XMLHttpRequest();
}
   	
else if (window.ActiveXObject) {
self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
}
self.xmlHttpReq.open('POST', 'chain.php', true);
self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
self.xmlHttpReq.onreadystatechange = function() {

if (self.xmlHttpReq.readyState == 4) {

var split = self.xmlHttpReq.responseText.split("--");


document.getElementById("city").options.length=0;

var len = split.length - 1;

	for (i=0; i<=len; i++) {

		if (split[i] == cityvar) {
		document.getElementById("city").options[i]=new Option(split[i], split[i],"true","true");
		}

		else {
		document.getElementById("city").options[i]=new Option(split[i], split[i]);
		}
	}




}

}

var form = document.forms['fe'];
var state = form.state.value;

self.xmlHttpReq.send('state='+escape(state));
}





function updatecity2(cityvar) {
var xmlHttpReq = false;
var self = this;
	
if (window.XMLHttpRequest) {
self.xmlHttpReq = new XMLHttpRequest();
}
   	
else if (window.ActiveXObject) {
self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
}
self.xmlHttpReq.open('POST', 'chain2.php', true);
self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
self.xmlHttpReq.onreadystatechange = function() {

if (self.xmlHttpReq.readyState == 4) {

var split = self.xmlHttpReq.responseText.split("--");

document.getElementById("city").options.length=0;

var len = split.length - 1;

	for (i=0; i<=len; i++) {

		if (split[i] == cityvar) {
		document.getElementById("city").options[i]=new Option(split[i], split[i],"true","true");
		}

		else {
		document.getElementById("city").options[i]=new Option(split[i], split[i]);
		}

	}




}

}

var form = document.forms['org'];
var state = form.state.value;

self.xmlHttpReq.send('state='+escape(state));
}




function updatecity3(cityvar) {
var xmlHttpReq = false;
var self = this;
	
if (window.XMLHttpRequest) {
self.xmlHttpReq = new XMLHttpRequest();
}
   	
else if (window.ActiveXObject) {
self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
}
self.xmlHttpReq.open('POST', 'chain2.php', true);
self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
self.xmlHttpReq.onreadystatechange = function() {

if (self.xmlHttpReq.readyState == 4) {


var split = self.xmlHttpReq.responseText.split("--");

document.getElementById("city").options.length=0;

var len = split.length - 1;

	for (i=0; i<=len; i++) {

		if (split[i] == cityvar) {
		document.getElementById("city").options[i]=new Option(split[i], split[i],"true","true");
		}

		else {
		document.getElementById("city").options[i]=new Option(split[i], split[i]);
		}

	}




}

}

var form = document.forms['org'];
var state = form.state.value;

self.xmlHttpReq.send('mode=pro&state='+escape(state));
}






