// JavaScripts 

function initialize(){

	// 
	getRanking( );
	//
	getShoku( );
	//
	getNews( );
	//
	getHint( );
	//
	getShop( );
	//
	getBlog( );
	//
	getLink( );

}

//----------------------------------------------------------------
//
// ランキング
//
//----------------------------------------------------------------
function getRanking( ) {
	try {
		xmlHttp1=new ActiveXObject("Microsoft.XMLHTTP");
	} catch(e) {
		xmlHttp1=new XMLHttpRequest();
	}

	var url = 'ajax/ajax_index_ranking.php';
	xmlHttp1.open('GET', url, true);
	xmlHttp1.onreadystatechange = function(){
		if(xmlHttp1.readyState == 4 && xmlHttp1.status == 200){
			var xmlDoc = xmlHttp1.responseText;
			if(xmlDoc){
				document.getElementById("id_ranking").innerHTML = xmlDoc;
			}
			else {
				document.getElementById("id_ranking").innerHTML = '';
			}
		}
		else {
			document.getElementById("id_ranking").innerHTML = '';
		}
	}
	xmlHttp1.send('');

}

//----------------------------------------------------------------
//
// SHOKU
//
//----------------------------------------------------------------
function getShoku( ) {
	try {
		xmlHttp2=new ActiveXObject("Microsoft.XMLHTTP");
	} catch(e) {
		xmlHttp2=new XMLHttpRequest();
	}

	var url = 'ajax/ajax_index_shoku.php';
	xmlHttp2.open('GET', url, true);
	xmlHttp2.onreadystatechange = function(){
		if(xmlHttp2.readyState == 4 && xmlHttp2.status == 200){
			var xmlDoc = xmlHttp2.responseText;
			if(xmlDoc){
				document.getElementById("id_shoku").innerHTML = xmlDoc;
			}
			else {
				document.getElementById("id_shoku").innerHTML = '';
			}
		}
		else {
			document.getElementById("id_shoku").innerHTML = '';
		}
	}
	xmlHttp2.send('');

}

//----------------------------------------------------------------
//
// お知らせ
//
//----------------------------------------------------------------
function getNews( ) {
	try {
		xmlHttp3=new ActiveXObject("Microsoft.XMLHTTP");
	} catch(e) {
		xmlHttp3=new XMLHttpRequest();
	}

	var url = 'ajax/ajax_index_news.php';
	xmlHttp3.open('GET', url, true);
	xmlHttp3.onreadystatechange = function(){
		if(xmlHttp3.readyState == 4 && xmlHttp3.status == 200){
			var xmlDoc = xmlHttp3.responseText;
			if(xmlDoc){
				document.getElementById("id_news").innerHTML = xmlDoc;
			}
			else {
				document.getElementById("id_news").innerHTML = '';
			}
		}
		else {
			document.getElementById("id_news").innerHTML = '';
		}
	}
	xmlHttp3.send('');

}

//----------------------------------------------------------------
//
// ヒント
//
//----------------------------------------------------------------
function getHint( ) {
	try {
		xmlHttp4=new ActiveXObject("Microsoft.XMLHTTP");
	} catch(e) {
		xmlHttp4=new XMLHttpRequest();
	}

	var url = 'ajax/ajax_index_hint.php';
	xmlHttp4.open('GET', url, true);
	xmlHttp4.onreadystatechange = function(){
		if(xmlHttp4.readyState == 4 && xmlHttp4.status == 200){
			var xmlDoc = xmlHttp4.responseText;
			if(xmlDoc){
				document.getElementById("id_hint").innerHTML = xmlDoc;
			}
			else {
				document.getElementById("id_hint").innerHTML = '';
			}
		}
		else {
			document.getElementById("id_hint").innerHTML = '';
		}
	}
	xmlHttp4.send('');

}

//----------------------------------------------------------------
//
// 旬の売れ筋ランキング
//
//----------------------------------------------------------------
function getShop( ) {
	try {
		xmlHttp5=new ActiveXObject("Microsoft.XMLHTTP");
	} catch(e) {
		xmlHttp5=new XMLHttpRequest();
	}

	var url = 'ajax/ajax_index_shop.php';
	xmlHttp5.open('GET', url, true);
	xmlHttp5.onreadystatechange = function(){
		if(xmlHttp5.readyState == 4 && xmlHttp5.status == 200){
			var xmlDoc = xmlHttp5.responseText;
			if(xmlDoc){
				document.getElementById("id_shop").innerHTML = xmlDoc;
			}
			else {
				document.getElementById("id_shop").innerHTML = '';
			}
		}
		else {
			document.getElementById("id_shop").innerHTML = '';
		}
	}
	xmlHttp5.send('');

}

//----------------------------------------------------------------
//
// ブログ
//
//----------------------------------------------------------------
function getBlog( ) {
	try {
		xmlHttp6=new ActiveXObject("Microsoft.XMLHTTP");
	} catch(e) {
		xmlHttp6=new XMLHttpRequest();
	}

	var url = 'ajax/ajax_index_blog.php';
	xmlHttp6.open('GET', url, true);
	xmlHttp6.onreadystatechange = function(){
		if(xmlHttp6.readyState == 4 && xmlHttp6.status == 200){
			var xmlDoc = xmlHttp6.responseText;
			if(xmlDoc){
				document.getElementById("id_blog").innerHTML = xmlDoc;
			}
			else {
				document.getElementById("id_blog").innerHTML = '';
			}
		}
		else {
			document.getElementById("id_blog").innerHTML = '';
		}
	}
	xmlHttp6.send('');

}

//----------------------------------------------------------------
//
// リンク
//
//----------------------------------------------------------------
function getLink( ) {
	try {
		xmlHttp7=new ActiveXObject("Microsoft.XMLHTTP");
	} catch(e) {
		xmlHttp7=new XMLHttpRequest();
	}

	var url = 'ajax/ajax_index_link.php';
	xmlHttp7.open('GET', url, true);
	xmlHttp7.onreadystatechange = function(){
		if(xmlHttp7.readyState == 4 && xmlHttp7.status == 200){
			var xmlDoc = xmlHttp7.responseText;
			if(xmlDoc){
				document.getElementById("id_link").innerHTML = xmlDoc;
			}
			else {
				document.getElementById("id_link").innerHTML = '';
			}
		}
		else {
			document.getElementById("id_link").innerHTML = '';
		}
	}
	xmlHttp7.send('');

}

