//swfLayerView
$(function() {
    //page inter connection canceled
    var previousPageFlag = getUriParameter();
    if(previousPageFlag > 0) {
        pageSwfTagWriter();
        return;
    }
    
    var scrollHeight = Math.max(document.documentElement.scrollHeight, document.body.scrollHeight)
    var swfLayerBlockBox = document.createElement("div");
    swfLayerBlockBox.setAttribute("id","swfLayerBlockBox");
    swfLayerBlockBox.style.height = scrollHeight+"px";
    swfLayerBlockBox.style.width = "100%";
    swfLayerBlockBox.style.backgroundColor = "#000000";
    swfLayerBlockBox.style.position = "absolute";
    swfLayerBlockBox.style.top = 0;
    swfLayerBlockBox.style.left = 0;
    swfLayerBlockBox.style.zIndex = 120;
    swfLayerBlockBox.style.filter = 'alpha(opacity=65)';
    swfLayerBlockBox.style.MozOpacity = 0.65;
    swfLayerBlockBox.style.opacity = 0.65;
    document.body.appendChild(swfLayerBlockBox);

    var swfLayerMessageBox = document.createElement("div");
    swfLayerMessageBox.setAttribute("id","swfLayerMessageBox");
    swfLayerMessageBox.style.backgroundColor = "#fff";
    swfLayerMessageBox.style.position = "fixed";
    swfLayerMessageBox.style.left = "50%";
    swfLayerMessageBox.style.top = "50%";
    swfLayerMessageBox.style.width = "668px";
    swfLayerMessageBox.style.height = "516px";
    swfLayerMessageBox.style.textAlign = "center";
    swfLayerMessageBox.style.marginTop = "-258px";
    swfLayerMessageBox.style.marginLeft = "-334px";
    swfLayerMessageBox.style.zIndex = 999;
    swfLayerMessageBox.innerHTML= '<p id="swfLayerMessageBoxBody">最新のFlashPlayerを入れてください</p>';
    document.body.appendChild(swfLayerMessageBox);
    swfobject.embedSWF("./common/swf/top_tvshow.swf", "swfLayerMessageBoxBody", "668px", "516px", "8", "./common/swf/expressInstall.swf",null,{allowScriptAccess:"always"});
});
function pageSwfTagWriter() {
    swfobject.embedSWF("./common/swf/header.swf", "identityBody", "919px", "446px", "8", "./common/swf/expressInstall.swf",{page:1,previous:getUriParameter()},{bgcolor: "#fbbab8"});
    swfobject.embedSWF("./common/swf/bottom.swf", "utilityBody", "983px", "475px", "8", "./common/swf/expressInstall.swf");
}
function closeSwfMovieLayer() {
    $("div#swfLayerBlockBox object").remove();
    $("div#swfLayerMessageBox").remove();
    $("div#swfLayerBlockBox").slideUp("slow",function() {
        $(this).remove();
        pageSwfTagWriter();
    });
}
