function startBrand() {
    var obj = document.form1;
    var sonetypeid = document.getElementById("sonetypeid").value;
    var stwotypeid = document.getElementById("stwotypeid").value;
    var sthreetypeid = obj.sthreetypeid.options[obj.sthreetypeid.selectedIndex].value;
    var req = newXMLHttpRequest();
    req.onreadystatechange = getReadyStateHandler(req, getBrand); 
    req.open("POST", "brand", true);
    req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");	
   	req.send("sonetypeid="+sonetypeid+"&stwotypeid="+stwotypeid+"&sthreetypeid="+sthreetypeid);
}
function getBrand(xlXML) { 
    var root = xlXML.getElementsByTagName("acct")[0];
    if (root != null) {
        var sbrandid = document.getElementById("sbrandid");
        sbrandid.innerHTML = "";
        var sub = root.getElementsByTagName("brand");
        for (var i = 0; i < sub.length; i++) {
            var subTwoType = document.getElementById("subBrand").value;
            var o = document.createElement("OPTION");
            o.value =sub[i].getElementsByTagName("brandcode")[0].firstChild.nodeValue;
            o.text = unescape(sub[i].getElementsByTagName("brandname")[0].firstChild.nodeValue);
            sbrandid.add(o);
            if(subTwoType!="0" && subTwoType!="" && subTwoType==o.value ){
              o.selected="selected";
            }	
        }
		}
}
