function loadHTML(type, st, page) {
////	httpObj = createXMLHttpRequest(displayData, type);
////	httpObj = createXMLHttpRequest("displayData('" + type + "')");
//	if (type == 'weather') {
//		httpObj_weather = createXMLHttpRequest(displayWeatherData);
//		makeRequest(type, httpObj_weather);
//	}else if (type == 'fortune') {
//		httpObj_fortune = createXMLHttpRequest(displayFortuneData);
//		makeRequest(type, httpObj_fortune);
//	}else if (type == 'searchtypenav') {
	if (type == 'searchtypenav') {
		httpObj = createXMLHttpRequest(displaySearchTypeNavData);
		makeRequest(type, httpObj, st);
//	}else if (type == 'index_weather') {
//		httpObj_weather = createXMLHttpRequest(displayWeatherData);
//		makeRequest('index_weather', httpObj_weather);
//	}else if (type == 'index_fortune') {
//		httpObj_fortune = createXMLHttpRequest(displayFortuneData);
//		makeRequest('index_fortune', httpObj_fortune);
	}
}

function makeRequest(type, httpObj, st) {
	if (httpObj) {
//		if (type == 'weather' || type == 'index_weather') {
//			var n = document.getElementById("select_weather").selectedIndex;
//			var v = document.getElementById("select_weather").options[n].value;
//			if (type == 'weather') {
//				requestURL = document.sbox.action + "type/aj/page/1/?weather=" + v;
//			}else {
//				requestURL = document.sbox.action + "type/aj/page/1/";
//			}
//		}else if (type == 'fortune' || type == 'index_fortune') {
//			var n = document.getElementById("select_fortune").selectedIndex;
//			var v = document.getElementById("select_fortune").options[n].value;
//			if (type == 'fortune') {
//				requestURL = document.sbox.action + "type/aj/page/2/?fortune=" + v;
//			}else {
//				requestURL = document.sbox.action + "type/aj/page/2/";
//			}
//		}else if (type == 'searchtypenav') {
		if (type == 'searchtypenav') {
			requestURL = document.sbox.action + "type/aj/page/3/?searchtype=" + st;
		}
		httpObj.open("GET", requestURL, true);
		httpObj.send(null);
	}
}

//function displayWeatherData() {
//	if ((httpObj_weather.readyState == 4) && (httpObj_weather.status == 200)) {
//			document.getElementById("content_weather").innerHTML = httpObj_weather.responseText;
//	}
//}

//function displayFortuneData() {
//	if ((httpObj_fortune.readyState == 4) && (httpObj_fortune.status == 200)) {
//			document.getElementById("content_fortune").innerHTML = httpObj_fortune.responseText;
//	}
//}

function displaySearchTypeNavData() {
	if ((httpObj.readyState == 4) && (httpObj.status == 200)) {
			document.getElementById("searchTypeNav").innerHTML = httpObj.responseText;
	}
}

function displaySearchData() {
	if ((httpObj.readyState == 4) && (httpObj.status == 200)) {
			document.getElementById("content_search").innerHTML = httpObj.responseText;
	}
}

function displayOvertureData() {
	if ((httpObj.readyState == 4) && (httpObj.status == 200)) {
			ovText = httpObj.responseText.split('ddddddd');
			document.getElementById("content_overture_upper").innerHTML = ovText[0];
			document.getElementById("content_overture_lower").innerHTML = ovText[1];
			document.getElementById("content_overture_right").innerHTML = ovText[2];
	}
}

function createXMLHttpRequest(cbFunc) {
	var XMLhttpObject = null;
	try {
		XMLhttpObject = new XMLHttpRequest();
	}catch(e) {
		try {
			XMLhttpObject = new ActiveXObject("Msxml2.XMLHTTP");
		}catch(e) {
			try {
				XMLhttpObject = new ActiveXObject("Microsoft.XMLHTTP");
			}catch(e) {
				return null;
			}
		}
	}
	if (XMLhttpObject) {
////		XMLhttpObject.onreadystatechange = cbFunc(type);
		XMLhttpObject.onreadystatechange = cbFunc;
	}
	return XMLhttpObject;
}

