//  ========================================================
//  tlab-recommend.js ---- recommend view class
//  Copyright 2008 TEAM-LAB
//  ========================================================

/*************************************************************
//sumple
<html>
<head>
<script type="text/javascript" src="http://www.teamlab-recommend.jp/wellness/js/tlab-recommend.js"></script>
</head>
<body>
    <div id="recommend_divid">
        write recommend here!
    </div>
    <script>(new TLAB.Recommend("recommend_divid", "item10")).sendRequest();</script>

    <div id="history_divid">
        write history here!
    </div>
    <script>(new TLAB.History("history_divid")).sendRequest();</script>

    <div id="personal_divid">
        write history here!
    </div>
    <script>(new TLAB.Personal("personal_divid")).sendRequest();</script>

    <div id="ranking_divid">
        write ranking here!
    </div>
    <script>(new TLAB.Ranking("ranking_divid", "1")).sendRequest();</script>

</body>
</html>
*************************************************************/


if ( typeof(TLAB) == 'undefined' ) TLAB = function() {};

TLAB.Recommend = function (arg1, arg2) {
	this.divtag = arg1;
	this.itemid = escape(arg2);
	this.width = 600;
	this.height = 180;
	this.url = "http://www.teamlab-recommend.jp/wellness/recommend.html?item=" + this.itemid;
	return this;
}

TLAB.Recommend.prototype.sendRequest = function () {
	document.getElementById(this.divtag).innerHTML = "<iframe id='teamlab_recommend_frame' width='" + this.width + "' height='" + this.height + "' name='teamlab_recommend_frame' frameborder='0' scrolling='no' src='" + this.url + "'></iframe>";
}

TLAB.History = function (arg1) {
	this.divtag = arg1;
	this.width = 170;
	this.height = 321;
	this.url = "http://www.teamlab-recommend.jp/wellness/history.html";
	return this;
}

TLAB.History.prototype.sendRequest = function () {
	document.getElementById(this.divtag).innerHTML = "<iframe id='teamlab_recommend_frame' width='" + this.width + "' height='" + this.height + "' name='teamlab_recommend_frame' frameborder='0' scrolling='no' src='" + this.url + "'></iframe>";
}

TLAB.Personal = function (arg1) {
	this.divtag = arg1;
	this.width = 600;
	this.height = 180;
	this.url = "http://www.teamlab-recommend.jp/wellness/personal.html";
	return this;
}

TLAB.Personal.prototype.sendRequest = function () {
	document.getElementById(this.divtag).innerHTML = "<iframe id='teamlab_recommend_frame' width='" + this.width + "' height='" + this.height + "' name='teamlab_recommend_frame' frameborder='0' scrolling='no' src='" + this.url + "'></iframe>";
}

TLAB.Ranking = function (arg1, arg2) {
	this.divtag = arg1;
	this.typeid = escape(arg2);
	this.width = 600;
	this.height = 180;
	this.url = "http://www.teamlab-recommend.jp/wellness/ranking.html?type=" + this.typeid;
	return this;
}

TLAB.Ranking.prototype.sendRequest = function () {
	document.getElementById(this.divtag).innerHTML = "<iframe id='teamlab_recommend_frame' width='" + this.width + "' height='" + this.height + "' name='teamlab_recommend_frame' frameborder='0' scrolling='no' src='" + this.url + "'></iframe>";
}

