function imLoad (container, typeNo, ctxtId, count, reportId, verticalPos, clearFloat) {
	// ログイン情報読み込み
	$.getJSON("/overture/getIM/", {_ctxtId: ctxtId}, function(url){
		url += "&maxCount=" + count;
		url += "&type=" + reportId;
		url += "&ctxtUrl=" + encodeURIComponent(document.URL);
		url += "&ref=" + encodeURIComponent(document.referrer);
		var templateObject = new Template();
		$.getScript(url, function(){
			var i = 6;
			if (verticalPos) $("#"+container).append(templateObject.imText());
			while (i < zSr.length) {
				html = templateObject["type"+typeNo].call(templateObject ,zSr[i++], zSr[i++], zSr[i++], zSr[i++], zSr[i++], zSr[i++]);
				$("#"+container).append(html);
			}
			if (clearFloat) $("#"+container).append('<br class="imEnd">');
			if (!verticalPos) $("#"+container).append(templateObject.imText());
		});
	});
}

function Template() {}
Template.prototype.type1 = function(description, reserved1, url, title, host, reserved2){
	return '<a href="' + url + '" title="' + title + '" class="im1">'+
		   '<span class="title"><img src="/images/common/icon_arrowGreen.gif">' + title + '</span>' +
		   '<span class="description">' + description + '</span>' +
		   '<span class="host">' + host + '</span>' +
		   '</a>';
}

Template.prototype.type2 = function(description, reserved1, url, title, host, reserved2){
	return '<a href="' + url + '" title="' + title + '" class="im2">'+
		   '<span class="title"><img src="/images/common/icon_arrowGreen.gif">' + title + '</span>' +
		   '<span class="description">' + description + '</span>' +
		   '<span class="host">' + host + '</span>' +
		   '</a>';
}

Template.prototype.type3 = function(description, reserved1, url, title, host, reserved2){
	return '<a href="' + url + '" title="' + title + '" class="im3">'+
		   '<span class="title">' + title + '</span>' +
		   '<span class="description">' + description + '</span>' +
		   '<span class="host">' + host + '</span>' +
		   '</a>';
}

Template.prototype.type4 = function(description, reserved1, url, title, host, reserved2){
	return '<a href="' + url + '" title="' + title + '" class="im4">'+
		   '<span class="title"><img src="/images/common/icon_arrowGreenBgBlack.gif">' + title + '</span>' +
		   '<span class="description">' + description + '</span>' +
		   '<span class="host">' + host + '</span>' +
		   '</a>';
}

Template.prototype.type5 = function(description, reserved1, url, title, host, reserved2){
	return '<a href="' + url + '" title="' + title + '" class="im5">'+
		   '<span class="title"><img src="/images/common/icon_arrowGreen.gif">' + title + '</span>' +
		   '<span class="description">' + description + '</span>' +
		   '<span class="host">' + host + '</span>' +
		   '</a>';
}

Template.prototype.type6 = function(description, reserved1, url, title, host, reserved2){
	return '<a href="' + url + '" title="' + title + '" class="im6">'+
		   '<span class="title">' + title + '</span>' +
		   '<span class="host">' + host + '</span>' +
		   '<span class="description">' + description + '</span>' +
		   '</a>';
}

Template.prototype.type7 = function(description, reserved1, url, title, host, reserved2){
	return '<a href="' + url + '" title="' + title + '" class="im7">'+
		   '<span class="title">' + title + '</span>' +
		   '<span class="host">' + host + '</span>' +
		   '<span class="description">' + description + '</span>' +
		   '</a>';
}

Template.prototype.imText = function(){
	return '<div class="imText">インタレストマッチ&nbsp;-&nbsp;<a href="http://ov.yahoo.co.jp/service/int/index.html" title="広告の掲載について">広告の掲載について</a></div>';
}


