﻿function ShowMessage()
{
    if(!document.getElementById("ms_box"))
    {
        var mydiv=document.createElement("div");
        mydiv.setAttribute("id","ms_box");
        mydiv.style.width="490px";
        mydiv.style.height="270px";
        mydiv.style.backgroundColor="white";
        mydiv.innerHTML="<div style='width:480px;height:20px;cursor:pointer; margin-left:4px;' title='点住此处可拖动' id='ms_td'><a id='guanbi' href=\"javascript:void(0)\" style=\"background-image:url(images/close_border.gif); display:block; height:20px; width:20px; left:float; margin-left:460px;\"></a></div><iframe id='ms_iframe' src='' width='490px' height='255px' scrolling='no' frameborder='0'  border='0' marginwidth='0' marginheight='0'></iframe>";
        document.body.appendChild(mydiv);
    }
     var windowElement = document.getElementById("ms_box");
     var shadowObj1 = new boxShadow(new boderTemplate_white(),false);
     var windowWidth = document.documentElement.clientWidth;   
     var windowHeight = document.documentElement.clientHeight;
     windowElement.style.position="absolute";
     windowElement.style.left=windowWidth/2-(490/2)+"px";
     windowElement.style.top=windowHeight/2-(270/2)+"px";
     shadowObj1.bind(windowElement,document.getElementById("form1"),false);
     document.getElementById("ms_iframe").contentWindow.document.write("<div style='font-size:14px;'>正在读取站内信...</div>");
     document.getElementById("ms_iframe").contentWindow.document.close();
     document.getElementById("ms_iframe").src="/Messgaes.aspx";
     shadowObj1.setCloseButton(document.getElementById("guanbi"),true);
     shadowObj1.setDragHanlder(document.getElementById("ms_td"));
}

 function ShowVcodePanle()
{
        if(!document.getElementById("chenre_v_code_panle"))
        {
            var mydiv=document.createElement("div");
            mydiv.setAttribute("id","chenre_v_code_panle");
            mydiv.style.width="450px";
            mydiv.style.height="150px";
            mydiv.style.backgroundColor="white";
            mydiv.innerHTML="<div style='width:450px;height:20px;cursor:move; margin-left:4px;' title='点住此处可拖动' id='ms_vcode_td'><a id='guanbi_vcode' href=\"javascript:void(0)\" style=\"background-image:url(images/close_border.gif); display:block; height:20px; width:20px; left:float; margin-left:420px;\"></a></div><iframe id='ms_vcode_iframe' width='450px' height='150px' scrolling='no' frameborder='0'  border='0' marginwidth='0' marginheight='0' src='/vmobilecode.aspx'></iframe>";
            document.body.appendChild(mydiv);
        }
        
        var windowElement = document.getElementById("chenre_v_code_panle");
        var shadowObj1 = new boxShadow(new boderTemplate_white(),false);
        var windowWidth = document.documentElement.clientWidth;   
        var windowHeight = document.documentElement.clientHeight;   
        var popupHeight =400;   
        var popupWidth =500;   
        windowElement.style.position="absolute";
        windowElement.style.top=((windowHeight-300)/2)+document.documentElement.scrollTop+document.body.scrollTop+"px";
        windowElement.style.left=windowWidth/2-popupWidth/2+"px";
        windowElement.style.display="block";
        windowElement.style.zIndex=900;
        shadowObj1.bind(windowElement);
        document.getElementById("ms_vcode_iframe").src="/vmobilecode.aspx";
        shadowObj1.setDragHanlder(document.getElementById("ms_vcode_td"));
        shadowObj1.setCloseButton(document.getElementById("guanbi_vcode"));
    }
