document.write("<div id=ads style='DISPLAY: none; MARGIN: auto; OVERFLOW: hidden; WIDTH: 760px; POSITION: relative; TOP: 0px; HEIGHT: 0px; BACKGROUND-COLOR: #fafafa; TEXT-ALIGN: center'>");
document.write("<a href='http://www.pis.cn/shop' target=_blank><IMG src='/adshop.jpg' width='760px' border='0'></a>");
document.write("<div id=close style='RIGHT: 20px; CURSOR: hand; BOTTOM: 20px; POSITION: absolute'>");
document.write("<IMG onclick='javascript:document.getElementById(\"ads\").style.display =\"none\";document.getElementById(\"close\").style.display =\"none\";' height=14 src='/Images/pageclose.gif' width=14 vspace=3 border=0></div>");
document.write("</div>");
var time = 500; //
var hight=354; 
var stop=15000;//下了停留显示时间
var flush=60; //缓存每隔1分钟可以下拉出现一次
var h = 0;
var date = new Date();
var a;
var b;
var c;
var d;
function addCount() {
    if (time > 0) {
        time--;
        h = h + 5;
    }
    else {
        return;
    }
    if (h >= hight)  //高度
    {
        return;
    }
    document.getElementById("ads").style.display = "";
    document.getElementById("ads").style.height = h + "px";
    setTimeout("addCount()", 30);

}

window.onload = function showAds() {
    if (window.name == "") {
        window.name = "0";
    }
    else {
        window.name = eval(window.name) + 1;
    }
    a = date.getMinutes() * 60;
    if (window.name == "0") {
        addCount();
        setTimeout("noneAds()", stop);
        b = date.getMinutes() * 60;
        window.document.cookie = b = date.getMinutes() * 60;
    }
    var strcookie = window.document.cookie;
    var arrcookie = strcookie.split("; ");
    for (var i = 0; i < arrcookie.length; i++) {
        var arr = arrcookie[i].split(";");
    }
    c = a - arrcookie[2];
    if (window.name > 0) {
        if (c >= flush) {
            addCount();
            setTimeout("noneAds()", stop);
            b = date.getMinutes() * 60;
            window.document.cookie = b = date.getMinutes() * 60;
        }

    }
}

function noneAds() {
    if (hight > 0) {
        hight--;
        hight = hight - 5;
    }
    else {
        return;
    }
    if (hight <= 0) {
        document.getElementById("ads").style.display = "none";
        return;
    }

    document.getElementById("ads").style.height = hight + "px";
    setTimeout("noneAds()", 30);
}



