/*メーカーリストの更新*/
function MakerChange(){
	/*分類取得*/
	d = document.getElementsByName("d");
	for(loop=0; loop<d.length; loop++){
		if(d[loop].checked == true){
			dv = d[loop].value;
		}
	}
	/*結果セット*/
	httpObj = createXMLHttpRequest(MakerDisp);
	fName = "js/mlist.php?d=" + dv;
	if(httpObj){
		httpObj.open("GET",fName,true);
		httpObj.send(null);
	}
}
function MakerDisp(){
	if((httpObj.readyState == 4) && (httpObj.status == 200)){
		document.getElementById("mv").innerHTML = httpObj.responseText;
		m = document.getElementById("m");
		m.selectedIndex = 0;
	}
}

/*機種名リストの更新*/
function NameChange(){
	/*分類取得*/
	d = document.getElementsByName("d");
	for(loop=0; loop<d.length; loop++){
		if(d[loop].checked == true){
			dv = d[loop].value;
		}
	}
	/*メーカー取得*/
	m = document.getElementById("m");
	num = m.selectedIndex;
	mval = m.options[num].value;
	/*結果セット*/
	httpObj = createXMLHttpRequest(NameDisp);
	fName = "js/nlist.php?m=" + mval + "&d=" +dv;
	if(httpObj){
		httpObj.open("GET",fName,true);
		httpObj.send(null);
	}
}
function NameDisp(){
	if((httpObj.readyState == 4) && (httpObj.status == 200)){
		document.getElementById("nv").innerHTML = httpObj.responseText;
		l = document.getElementById("l");
		l.selectedIndex = 0;
	}
}

/*機種名リストからの選択*/
function NameSet(){
	li = l.selectedIndex;
	val = document.getElementById("l").options[li].text;
	document.getElementById("n").value = val;
}

