﻿function ShowSEWindow(msg,type)
{
    var innerHTML = "<div style='background-color: #f8e1c1;height: 19px;padding: 3px 4px 0 10px;'>";
    innerHTML  += "<div style='float:left;font-size:12px;'>提示信息</div>";
    innerHTML  += "<div style='float:right;'>";
    innerHTML  += "<a href='javascript:HiddenSEWindow();'><img src='Images/window_close.gif' alt='关闭窗口' /> </a>";
    innerHTML  += "</div></div>";
    innerHTML  += "<div style='text-align:center;font-size:12px;' id='divMassage'>";
    if(type == "error")
    {
        innerHTML  +="<p><img src='images/error.gif' style='margin-top:10px;margin-bottom:10px;' /></p><p>";
    }
    else
    {            
        innerHTML  +="<p><img src='images/right.gif' style='margin-top:10px;margin-bottom:10px;' /></p><p>";
    }    
    innerHTML  += msg;
    innerHTML  += "</p></div></div>";
        
    if(!document.getElementById("divMsg"))
    {
        
        
        var div = document.createElement('div');
        div.id = 'divMsg';
        div.setAttribute('style','bottom:230px; left:250px; width:160px; height:100px; position: absolute;z-index: 100; background-color:#FFFFFF;border: 2px solid #f8e1c1;');              
        div.setAttribute('innerHTML',innerHTML); 
        div.innerHTML = innerHTML;
        document.body.appendChild(div);
        with(document.getElementById("divMsg").style)
        {
            bottom="230px";
            left="250px";
            width="160px";
            height="100px";
            position="absolute";            
            background="#FFFFFF";
            border="2px solid #f8e1c1";
        }
    }
    else{
        document.getElementById("divMsg").style.display = "block";
        document.getElementById("divMsg").setAttribute('innerHTML',innerHTML); 
        document.getElementById("divMsg").innerHTML = innerHTML;
    }
    setTimeout(HiddenSEWindow,2000);
}

function HiddenSEWindow()
{
     if(document.getElementById("divMsg"))
    {
        document.getElementById("divMsg").style.display = "none";
    }
}