function createXMLHttpRequest(cbFunc,basyo){
	num = basyo;
	oldnum = num;

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;
	return XMLhttpObject;
}

function $(tagId){
	return document.getElementById(tagId);
}
//=======================================大事
function loadHTMLFile(fName,rArea){
	rAreaTx = rArea;
	httpObj = createXMLHttpRequest(displayData1);
	if (httpObj){
		httpObj.open("GET",fName,true);
		httpObj.send(null);
	}
}
function displayData1(){
	if ((httpObj.readyState == 4) && (httpObj.status == 200)){
		document.getElementById(rAreaTx).innerHTML = httpObj.responseText;
	}else{
		document.getElementById(rAreaTx).innerHTML = "チェックしてます";
	}
}
//=======================================カートダブル
function setEcCartBtn(fName,rArea){
	rAreaTx = rArea;
	httpObj = createXMLHttpRequest(displayData);
	if (httpObj){
		httpObj.open("GET",fName,true);
		httpObj.send(null);
	}
}
function displayData(){
	if ((httpObj.readyState == 4) && (httpObj.status == 200)){
		document.getElementById(rAreaTx).innerHTML = httpObj.responseText;
		setCount();
	}else{
		document.getElementById(rAreaTx).innerHTML = '<img src="./_img_bg/ajax_loader.gif" width="16" height="16" alt="" style="margin:5px 0 0 0;" />';
	}
}
//--------------------------------------商品数 cartInItem
function setCount(){
	CountArea = 'cartInItem';
	cntphp = 'set_cartInItem_num.php';
	httpObj = createXMLHttpRequest(displayCount);
	if (httpObj){
		httpObj.open("GET",cntphp,true);
		httpObj.send(null);
	}
}
function displayCount(){
	if ((httpObj.readyState == 4) && (httpObj.status == 200)){
		document.getElementById(CountArea).innerHTML = httpObj.responseText;
		movie_play();//ポーン
	}else{
		document.getElementById(CountArea).innerHTML = '<img src="./_img_bg/ajax_loader.gif" width="16" height="16" alt="" style="margin:5px 0 0 0;" />';
	}
}
//--------------------------------------Shopping Cart Quickview
function Quickview(){
	cartArea = 'cartQview';
	Quickviewphp = 'set_cart_quickview.php';
	httpObj = createXMLHttpRequest(displayQuickview);
	if (httpObj){
		httpObj.open("GET",Quickviewphp,true);
		httpObj.send(null);
	}
}
function displayQuickview(){
	if ((httpObj.readyState == 4) && (httpObj.status == 200)){
		document.getElementById(cartArea).innerHTML = httpObj.responseText;
		//movie_play();//ポーン
	}else{
		document.getElementById(cartArea).innerHTML = '';
	}
}
