//	親プルダウン変更で子プルダウン作成// 子リスト取得URL、childID str 子プルダウンID、function setChild(ajax_link, childID){	httpObj = null;	// 通信オブジェクト生成	if(window.XMLHttpRequest) {		httpObj = new XMLHttpRequest();	} else if(window.ActiveXObject) {		try {			httpObj = new ActiveXObject("Msxml2.XMLHTTP");		} catch(e) {			try {				httpObj = new ActiveXObject("Microsoft.XMLHTTP");			} catch(e) {				return null;			}		}	}	// 状態が変わったときに実行される関数	//if (httpObj) httpObj.onreadystatechange = printItem(childID);	//httpObj.onload = printItem(childID, httpObj.responseText);	httpObj.onreadystatechange = function() {//		alert(httpObj.responseText);		if(httpObj.readyState == 4) {			el = document.getElementById(childID);			for(i=el.length; i>=0; i--) el.remove(i); // remove first			if (httpObj.responseText) { // 親選択の場合				opt = document.createElement('option');				addOptionSet(el, httpObj.responseText);			} else {					// 非選択の場合				for(i=el.length; i>=0; i--) el.remove(i);				opt = document.createElement('option');				opt.value = 0;				opt.text = 'ALL NAMES';				addOption(el, opt);			}		}	}	// 結果文字列取得	if (httpObj) {		httpObj.open("GET", ajax_link, true);		httpObj.send(null);	}}function addOptionSet(el, text){	opt = document.createElement('option');	opt.value=''; opt.text = 'ALL NAMES';	addOption(el, opt);	lines = text.split("\n");	for(i=0;i<lines.length-1;i++) {		if(lines[i]==''||!lines[i].indexOf("::",0)) break;		parts = lines[i].split("::");		opt = document.createElement('option');		opt.value = parts[0]; opt.text = parts[1];		addOption(el, opt);	}}function addOption(el, opt){	try {		el.add(opt, null);	} catch(ex) {		el.add(opt,-1);	}}