var chdfltimg_url= "http://img.jrjimg.cn/2016/01/20160115160156074.gif"; //这里写图片URL(可以用jpg,gif,swf,html格式)
var chdfltimg_wdh= 100; //图片宽度
var chdfltimg_hgt= 100; //图片高度
var float_pos="left"; //漂浮左右
var float_x= 30; //距浏览器侧边距
var float_y= 10; //距浏览器底部边距
var flash_swch = 1; //swf监测开关,默认就行
var padinghgt = chdfltimg_hgt+15;
var padinghgt_ie = chdfltimg_hgt+12;
if(chdfltimg_url.toLowerCase().indexOf('.swf')>0){
var floatcore='';
if(flash_swch == 1)
{
floatcore+='';
}
}
else if(chdfltimg_url.toLowerCase().indexOf('.jpg')>0||chdfltimg_url.toLowerCase().indexOf('.gif')>0||chdfltimg_url.toLowerCase().indexOf('.png')>0){
floatcore='
';
}
else{
floatcore='';
}
floatcore+='
';
var floathtml=''+floatcore+'
';
var Thirdhtml = document.createElement("div");
Thirdhtml.style.cssText = 'z-index:7777; position:fixed; width:'+chdfltimg_wdh+'px; height:'+chdfltimg_hgt+'px; bottom:'+float_y+'px; '+float_pos+':'+float_x+'px; /* for ie6 */ _position:absolute; _top:expression(eval(document.documentElement.scrollTop+document.documentElement.clientHeight-150));overflow:visible;'
Thirdhtml.innerHTML = floathtml;
document.body.insertBefore(Thirdhtml,document.body.childNodes[0]);
function add_agent(oTarget,sEventType,fnHandler){
if (oTarget!=null){
if(oTarget.addEventListener){oTarget.addEventListener(sEventType,fnHandler,false);}
else if(oTarget.attachEvent){oTarget.attachEvent("on"+sEventType,fnHandler);}
else{
if (sEventType=="load"){
var oldonload = oTarget.onload;
if (typeof oTarget.onload != 'function'){oTarget.onload = fnHandler;}
else{
oTarget.onload = function(){oldonload();fnHandler;};
}
}
else{
oTarget["on"+sEventType] = fnHandler;
}
}
}
}
(function float_pic(){
var closebtn=document.getElementById("google_clsbtn7055");
var floatdiv=document.getElementById("bottomblk7055");
add_agent(closebtn,"click",function(){floatdiv.style.display="none";});
var w = window.innerWidth || (document.documentElement && document.documentElement.clientWidth) || document.body.clientWidth;
if (w<1000){floatdiv.style.display="none";}
else if (w>1016){floatdiv.style.display="block";}
})();