(function() {
var playerLREC = function() {
}
playerLREC.prototype = {

    dispLREC : 'off',

    DISP_ON: function(src, space_id)
    {
        if( pl.dispLREC == 'on' ) return;
        pl.dispLREC = 'on';
		document.getElementById("LREC1").contentWindow.location.replace(src);
		if (document.all) {
			document.getElementById("LREC1").onreadystatechange = function () {
				if (this.readyState == "complete") {
					var html       = this.contentWindow.document.documentElement.innerHTML;
					var judgeLREC  = html.indexOf("<!-- SpaceID=" + space_id + " loc=LREC noad -->");
					var judgeSPREC = html.indexOf("<!-- SpaceID=" + space_id + " loc=SPREC noad -->");
					if( (judgeLREC == -1) && (judgeSPREC == -1) ) {
      					//$("#LREC1").show();
      					$("#LREC1").show().height(this.contentWindow.document.documentElement.scrollHeight+5);
					}
				}
			}
		}
		else {
			document.getElementById("LREC1").onload = function () {
				var html       = this.contentWindow.document.documentElement.innerHTML;
				var judgeLREC  = html.indexOf("<!-- SpaceID=" + space_id + " loc=LREC noad -->");
				var judgeSPREC = html.indexOf("<!-- SpaceID=" + space_id + " loc=SPREC noad -->");
				if( (judgeLREC == -1) && (judgeSPREC == -1) ) {
      				//$("#LREC1").show();
      				$("#LREC1").show().height(this.contentWindow.document.documentElement.scrollHeight+5);
				}
			}
		}
    },


    DISP_OFF: function()
    {
        if( pl.dispLREC == 'off' ) return;
        pl.dispLREC = 'off';
		//document.getElementById("LREC1").contentWindow.location.replace("");
        $("#LREC1").hide().height(0);
    }

}
window.pl = new playerLREC();
})();

