

//对联广告位1
var msg1 = $.ajax({url:"/include/getAdv.jsp", data:"adv_id=100000000000016", async:false, success:function (msg) {
}}).responseText;
msg1 = $.trim(msg1);
var img1 = "<img src='../images/ad/ad_100x300.jpg' width='100' height='300' border='0'>";
var ahref = "<a href='http://www.itonghui.com/' target='_blank'>";
if (msg1 != "|") {
	var adv1 = msg1.split("|");
	img1 = "<img src='" + adv1[0] + "' width='100' height='300' border='0'>";
	ahref = "<a href='" + adv1[1] + "' target='_blank'>";
}



//对联广告位2
var msg2 = $.ajax({url:"/include/getAdv.jsp", data:"adv_id=100000000000017", async:false, success:function (msg) {
}}).responseText;
msg2 = $.trim(msg2);
var img2 = "<img src='../images/ad/ad_100x300.jpg' width='100' height='300' border='0'>";
var ahref2 = "<a href='http://www.itonghui.com/' target='_blank'>";
if (msg2 != "|") {
	var adv2 = msg2.split("|");
	img2 = "<img src='" + adv2[0] + "' width='100' height='300' border='0'>";
	ahref2 = "<a href='" + adv2[1] + "' target='_blank'>";
}
suspendcode = "<DIV id=lovexin1 style='Z-INDEX: 998; LEFT: 6px; POSITION: absolute; TOP: 105px; width: 100px; height: 300px;'><img src='../images/skin_coffee/close.gif' onClick='javascript:window.hide()' width='100' height='14' border='0' vspace='3' alt='\u5173\u95ed\u5bf9\u8054\u5e7f\u544a'>" + ahref + img1 + "</a></DIV>";
document.write(suspendcode);
suspendcode = "<DIV id=lovexin2 style='Z-INDEX: 999; RIGHT: 6px; POSITION: absolute; TOP: 105px; width: 100px; height: 300px;'><img src='../images/skin_coffee/close.gif' onClick='javascript:window.hide()' width='100' height='14' border='0' vspace='3' alt='\u5173\u95ed\u5bf9\u8054\u5e7f\u544a'>" + ahref2 + img2 + "</a></DIV>";
document.write(suspendcode);

//flash格式调用方法
//<EMBED src='flash.swf' quality=high  WIDTH=100 HEIGHT=300 TYPE='application/x-shockwave-flash' id=ad wmode=opaque></EMBED>
lastScrollY = 0;
function heartBeat() {
	diffY = document.documentElement.scrollTop;
	percent = 0.3 * (diffY - lastScrollY);
	if (percent > 0) {
		percent = Math.ceil(percent);
	} else {
		percent = Math.floor(percent);
	}
	document.all.lovexin1.style.pixelTop += percent;
	document.all.lovexin2.style.pixelTop += percent;
	lastScrollY = lastScrollY + percent;
}
function hide() {
	lovexin1.style.visibility = "hidden";
	lovexin2.style.visibility = "hidden";
}
window.setInterval("heartBeat()", 1);


