document.mazdaMLIncludes = new Array();
function MazdaMLInclude(){
	this.isPlural = false;
}
MazdaMLInclude.prototype = {
	initialize:function(pId, uri){
		if(this.isPlural){
			document.mazdaMLIncludes[document.mazdaMLIncludes.length] = new MazdaMLInclude();
			document.mazdaMLIncludes[document.mazdaMLIncludes.length-1].initialize(pId, uri);
			return true;
		}
		this.isPlural = true;
		this.uaAjax = new UaAjax();
		this.elemId = pId;
		var prop = new Object();
		prop.url = uri;
		prop.cbObj = this;
		prop.callback = "showContent";
		prop.errCallback = "errHandler";
		prop.enableCallback = "enableHandler";
		prop.method = "GET";
		prop.isXML = false;
		this.uaAjax.httpRequest(prop);
	},
	showContent:function(pTxt){
		var elem = document.getElementById(this.elemId);
		if(elem){
			elem.innerHTML = pTxt;
		}
	},
	errHandler:function(msg){
		var elem = document.getElementById(this.elemId);
		if(elem){
			elem.innerHTML = (msg)?msg:"<div>現在関連情報が表示できません。</div>";
		}
	},
	enableHandler:function(msg){
		var elem = document.getElementById(this.elemId);
		if(elem){
			elem.innerHTML = (msg)?msg:"<div>お使いのブラウザでは正しくサイトをご覧いただけません。詳しくはこのサイトについてをご覧ください。</div>";
		}
	}
}

var mazdaMLInclude = new MazdaMLInclude();
