//设置广告块 
var divLeft=0;//设置广告块初始左边位置 
var divTop=0;//设置广告块初始顶部位置 
var divWidth=140;//设置广告块宽度 
var divHeight=60;//设置广告块高度 
//var divWidth=160;//设置广告块宽度 
//var divHeight=80;//设置广告块高度 
//var divImg="/images/midbanner.gif";//设置广告图片的URL地址 http://www.jc.net.cn/images/hbnotice.gif
//var divUrl="http://210.51.0.186:6060/cxgl/minfo/view.jsp?DMKID=2&ZLMBH=0&XXBH=8";//设置广告链接 
//var divTitle="企业信用等级评价"; http://www.jc.net.cn/images/xj2009.gif
var divImg="/images/zaojiaxinxi2010.gif";//设置广告图片的URL地址 http://www.jc.net.cn/images/hbnotice.gif
var divUrl="http://www.jc.net.cn/news/ShowNews.asp?id=121";//设置广告链接 
var divTitle="北京工程造价信息套装2010年征订中";
document.write("<DIV id=\"adDiv\" style=\"position:absolute;z-index:111;left:"+divLeft); 
document.write("px; top:"+divTop+"px; width:"+divWidth+"px; height:"+divHeight); 
document.write("px; z-index:1;\" onMouseOver=\"javascript:window.clearInterval(varId)\""); 
document.write(" onMouseOut=\"javascript:beginMoveAd();\"><a target=\"_blank\" href=\""+divUrl+"\">"); 
document.write("<img src=\""+divImg+"\" border=\"0\" alt=\""+divTitle+"\"></a></DIV>") 
//飘浮广告 
var _stepx=2;_stepy=2;//初始化每次偏离的象素 
var moveSpeed=40;//速度 
var varId;//获取setInterval的ID 
function moveAd(){//飘浮广告主函数
var adLeft=parseInt(adDiv.style.left);
var adTop=parseInt(adDiv.style.top);
var adWidth=parseInt(adDiv.style.width); 
var adHeight=parseInt(adDiv.style.height) 
var _bodyLeft=document.body.scrollLeft; 
var _bodyTop=document.body.scrollTop; 
var _bodyHeight=document.body.clientHeight+_bodyTop; 
var _bodyWidth=document.body.clientWidth+_bodyLeft; 
if(adLeft<=_bodyLeft){ 
_stepx=2; 
} 
if(adTop<=_bodyTop){ 
_stepy=2; 
} 
if((adLeft+adWidth)>=_bodyWidth){ 
_stepx=-2 
} 
if((adTop+adHeight)>=_bodyHeight){ 
_stepy=-2 
} 
adDiv.style.left=adLeft+_stepx; 
adDiv.style.top=adTop+_stepy; 
} 
function beginMoveAd(){//启动飘浮 
varId=window.setInterval("moveAd()",moveSpeed) 
} 
window.open=beginMoveAd();//给窗体的load事件附加飘浮函数