function sendData(){
	xmlHttpObject = null;
	if(window.XMLHttpRequest){//Safari,Firefox
		xmlHttpObject = new XMLHttpRequest();
	}else if(window.ActiveXObject){//IE
		try{
			xmlHttpObject = new ActiveXObject("Msxml2.XMLHTTP");//IE6
		}catch(e){
			try{
				xmlHttpObject = new ActiveXObject("Microsoft.XMLHTTP");//IE5
			}catch(e){
				return null;
			}
		}
	}

	if(xmlHttpObject){
		xmlHttpObject.onreadystatechange = displayHello;
	}

	if(xmlHttpObject){
		xmlHttpObject.open("GET" ,"php/flow_chart.php?q01="+encodeURI(document.flowForm.q01.value)+"&q02="+encodeURI(document.flowForm.q02.value)+"&q03="+encodeURI(document.flowForm.q03.value)+"&q04="+encodeURI(getRadioValue(document.flowForm.q04)), true);
		xmlHttpObject.send(null);
	}
}

function displayHello(){
	if((xmlHttpObject.readyState == 4) && (xmlHttpObject.status == 200)){
		document.getElementById("result").innerHTML = xmlHttpObject.responseText;
		pageTracker._trackPageview("/js/ajax_flow_chart.html" );
	}else{
		document.getElementById("result").innerHTML = "お待ちください........";
	}
}

//ラジオボタンの値を取得
function getRadioValue(element) {
	for(i=0;i<element.length;i++){
		if(element[i].checked){
			return element[i].value;
		}
	}
}

