//////////////主页左侧网站热点下方 2个图片链接第（2）个
function leftSide_2() {
    var imgsrc = "/root/images/njbysjycy.gif";
    var href = "http://www.njbys.gov.cn";
    var title = "毕业生就业创业";
    var style = "width: 220px; height: 60px; border: 0px;";
    var s = "<a href='" + href + "' target='_blank'>";
    s += "<img src='" + imgsrc + "' alt='" + title + "' style='" + style + "' /></a>";
    document.writeln(s);
}


////-----------------banner广告 位置一  ------------------------------------------------------------------------------------------------------------------------------
function showBannerAD() {
    if (isDateIn("2012-1-30", "2012-2-29")) {
        document.write("<a href='http://www.njpxjy.com/info/showNewsDetail.asp?newsid=4564' target='_blank'><img src='/Root/Tempfiles/Banners/hgC.gif' alt='' style='border:solid 1px #9EE7FF;width:330px; height:58px;vertical-align:-10%;' /></a> ");
    }
    else {
        //网上办公服务
        document.write("<a href='/Service/' target='_blank'><img src='/Root/Tempfiles/Banners/Banner_B2_banner2.gif' alt='' style='border:0px; width:330px; height:58px;vertical-align:-10%;' /></a> ");
    }

    ////===================Banner广告 位置二  ===============================================================================================================================
	if (isDateIn("2011-8-30", "2011-9-10")) {
	    document.write("<a href='http://www.nbrc.com.cn/zczp/13gqh/' target='_blank'><img src='/root/Tempfiles/Banners/nanjing.gif' style='border:solid 1px #eeeeee; width:330px; height:58px;vertical-align:-10%;' /></a> &nbsp;&nbsp;");
		//document.write("<a href='http://www.njrsrc.com/Service/' target='_blank'><img src='/root/Tempfiles/Banners/Banner_B2_banner2.gif' style='border:solid 1px #eeeeee; width:330px; height:58px;vertical-align:-10%;' /></a> &nbsp;&nbsp;");
		//document.write("<a href='http://www.njrsrc.com/News/NewsInfo.aspx?u=NjM0Mw==&l=A3A3E8B30DD6EADFC78C77BB2B8E6B60' target='_blank'><img src='/root/Tempfiles/Banners/5_18.gif' alt='企业员工心理危机干预及极端事件控制研讨班邀请函' style='border:solid 1px #eeeeee; width:330px; height:58px;vertical-align:-10%;' /></a> &nbsp;&nbsp;");
        //厦门人才
        //document.write("<a href='http://www2.xmrc.com.cn/xmrc/height/2011/index.html' target='_blank'><img src='/root/Tempfiles/Banners/330_58.gif' alt='厦门第六届台湾专业人才对接会' style='border:solid 1px #eeeeee; width:330px; height:58px;vertical-align:-10%;' /></a> &nbsp;&nbsp;");

    }
    else {
        //2010年招聘信息
        document.write("<a href='/root/event/2010/' target='_blank'><img src='/Root/Tempfiles/Banners/10zp.gif' alt='' style='border:solid 1px #9EE7FF; width:330px; height:58px;vertical-align:-10%;' /></a> &nbsp;&nbsp;");
        //网上求职指南
        //document.write ("<a href='/webOffice/help/help.aspx' target='_blank'><img src='/Root/images/wsqzzn.gif' alt='' style='border:0px; width:355px; height:58px;vertical-align:-10%;' /></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");

    }



}



/////主页滑动大广告-----------

var intervalId = null;

function slideAd(id, nStayTime, sState, nMaxHth, nMinHth) {
    this.stayTime = nStayTime * 1000 || 10;
    this.maxHeigth = nMaxHth || 300;
    this.minHeigth = nMinHth || 1;
    this.state = sState || "down";
    var obj = document.getElementById(id);
    if (intervalId != null) window.clearInterval(intervalId);
    function openBox() {
        var h = obj.offsetHeight;
        if (h < 32) {
            obj.style.height = 0;
            document.getElementById('top_slideAD_small').style.display = "";
            document.getElementById('top_slideAD_small').style.visibility = 'visible';
        }
        else {
            obj.style.height = ((this.state == "down") ? (h + 4) : (h - 36)) + "px";
        }
        if (obj.offsetHeight > this.maxHeigth) {
            window.clearInterval(intervalId);
            intervalId = window.setInterval(closeBox, this.stayTime);
        }
        if (obj.offsetHeight < this.minHeigth) {
            window.clearInterval(intervalId);
            obj.style.display = "none";

        }
    }

    function closeBox() {
        slideAd(id, this.stayTime, "up", nMaxHth, nMinHth);
    }
    intervalId = window.setInterval(openBox, 60);
}

function closebtn() {
    document.getElementById('top_slideAD_big').innerHTML = '';
    document.getElementById('top_slideAD_small').innerHTML = '';
    document.getElementById('top_slideAD_small').style.display = "none";
}

function showcl() {
    window.location.reload();
}

function showSlideAD() {
    if (isDateIn("2010-11-23", "2011-3-17")) {
        var showtime = 10; ////大图片显示的时间 单位：秒
        var bigimg = "/Root/Tempfiles/HomeADs/gstl_big.gif";
        var smallimg = "/Root/Tempfiles/HomeADs/gstl_small.gif";
        var targeturl = "/News/NewsInfo.aspx?u=NjI0NA==&l=21F4C3B5591DA245AF90A2FD52FA1A55";

        document.write("<div class='La1' id='top_slideAD_big' style='background:#ffffff;overflow:hidden; margin-top:0px; margin-bottom:0px;'>");
        document.write("<a href='" + targeturl + "' target='_blank'><img src='" + bigimg + "' alt='' style='border:0px;' /></a>");
        document.write("</div>");
        document.write("<div class='La2' id='top_slideAD_small' style='background:#FFE597;overflow:hidden; margin:0px;display:none;'>");
        document.write("<a href='" + targeturl + "' target='_blank'><img src='" + smallimg + "' alt='' style='border:0px;' /></a><span style='cursor:pointer; font-size: 12px; color:#cccccc;text-decoration: none' onclick='showcl();'><img src='/root/ad/a.gif' alt='' /></span><a href='javascript:void(0);' onclick='closebtn();'><img src='/root/ad/b.gif' alt='' style='border:0;' /></a>");
        document.write("</div>");

        slideAd('top_slideAD_big', showtime);
    }
}


