﻿function msg(info) {
    var p = document.createElement("DIV");
    if (!info) {
        info = '<h4 style=\'border-bottom:none;\'>*Only our VIP member can check the wholesale price for all items.</h4>';
        info += '<p></p><h4 style=\'border-bottom:none;\'>*To apply for our VIP member, you will be required to send us the company related proof or the volume of trade application for investigation. Merbmer Investigation Mail:<a style=\'font-weight:bold;\' href=\'mailto:member@westingames\'>member@westingames.com</a></h4>';
    }
    p.id = "p";
    p.style.position = "absolute";
    p.style.width = document.body.scrollWidth;
    p.style.height = (document.body.offsetHeight > document.body.scrollHeight) ? '100%' : document.body.scrollHeight;
    p.style.zIndex = '998';
    p.style.top = '0px';
    p.style.left = '0%';
    p.style.backgroundColor = "gray";
    p.style.opacity = '0.5';
    p.style.filter = "alpha(opacity=80)";
    document.body.appendChild(p);
    var p1 = document.createElement("DIV");
    var top = parseInt(parseInt(document.body.scrollHeight) * 0.25) + document.body.scrollTop;
    p1.style.position = "absolute";
    p1.style.width = "600px";
    p1.id = "p1";
    var left = Math.ceil(((document.body.scrollWidth) - parseInt(p1.style.width.replace('px', ''))) / 2) + document.body.scrollLeft;
    p1.style.height = "200px";
    p1.style.zIndex = '999';
    p1.style.top = top + 'px';
    p1.style.left = left + 'px';
    p1.style.border = "0px solid red";
    var html = "";
    html += "<center>"
    html += "<div class='p3' style='height:1px;overflow:hidden;background:red;width:594px;border-left:1px solid red;border-right:1px solid red;'></div>"
    html += "<div class='p2' style='height:1px;overflow:hidden;background:red;width:596px;border-left:1px solid red;border-right:1px solid red;'></div>"
    html += "<div class='p2' style='height:1px;overflow:hidden;background:red;width:598px;border-left:1px solid red;border-right:1px solid red;'></div>"
    html += "<div class='p1' style='height:20px;overflow:hidden;background:red;width:600px;border-left:1px solid red;border-right:1px solid red;color:#fff;font-size:9pt;font-weight:bold;text-align:left;'> ⊙ How to get a quick validation？</div>"
    html += "<div id='c' style='height:auto;width:580px;background-color:#FEEACB;overflow:hidden;border-left:1px solid red;border-right:1px solid red;padding-top:10px; padding-left:10px; padding-right:10px; text-align:left; FONT: 10px Calibri, Arial, Helvetica, sans-serif;'>" + info + "<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ <a href='javascript:this.cancle()'>Colse</a> ]<br><br></div>"
    html += "<div class='p1' style='height:1px;overflow:hidden;background:#FEEACB;width:598px;border-left:1px solid red;border-right:1px solid red;'></div>"
    html += "<div class='p2' style='height:1px;overflow:hidden;background:#FEEACB;width:596px;border-left:1px solid red;border-right:1px solid red;'></div>"
    html += "<div class='p3' style='height:1px;overflow:hidden;background:red;width:594px;border-left:1px solid red;border-right:1px solid red'></div>"
    html += "</center>"
    document.body.appendChild(p1);
    p1.innerHTML = html;
    var arr = document.getElementsByTagName("select");
    var i = 0;
    while (i < arr.length) {
        arr[i].style.visibility = 'hidden';
        i++;
    }
    this.cancle = function() {
        document.body.removeChild(document.getElementById('p'));
        document.body.removeChild(document.getElementById('p1'));
        var arr = document.getElementsByTagName("select");
        var i = 0;
        while (i < arr.length) {
            arr[i].style.visibility = 'visible';
            i++;
        }
    }
}
$(function() {
    //弹出服务条款
    $("#lnkReadServiceTerm").bind("click", function() {
        msg();
    });
});



