﻿// JScript 檔

function InQaOpen()
{
    if (top.document.body.lastChild.id != "tb_qa")
    {
        div1 = top.document.createElement("div");
        div1.style.position= "absolute";
        div1.style.width="100%";
        div1.style.height= top.document.body.scrollHeight;
        div1.style.left=0;
        div1.style.top=0;
        div1.style.backgroundColor="#FEFEFE";
        div1.style.filter="Alpha(Opacity=50)";
        div1.style.display="";
        top.document.body.appendChild(div1);
        
        div2 = top.document.getElementById("tb_qa");
        div2.style.display = "";
        div2.style.position = "absolute";
        div2.style.left = (top.document.body.scrollWidth - div2.scrollWidth) / 2;
        div2.style.top = (top.document.body.scrollHeight - div2.scrollHeight) / 2;
        //div2.style.top = (document.body.clientHeight - div2.offsetHeight) / 2;
        top.document.body.appendChild(div2);
    }
    else
    {
        top.document.body.childNodes[top.document.body.childNodes.length - 2].style.display = "";
        top.document.body.lastChild.style.display = "";
    }
}


function InQaClose()
{
    top.document.body.childNodes[top.document.body.childNodes.length - 2].style.display = "none";
    top.document.body.lastChild.style.display = "none";
}