//下面这句是为了底部浮定义的
var isie6 = window.XMLHttpRequest?false:true;
//定义完
window.onload = getMsg;
window.onresize = resizeDiv;
window.onerror = function(){}
var divTop,divLeft,divWidth,divHeight,docHeight,docWidth,objTimer,i = 0;
function getMsg()
{
try{
divTop = parseInt(document.getElementById("eMeng").style.top,10)
divLeft = parseInt(document.getElementById("eMeng").style.left,10)
divHeight = parseInt(document.getElementById("eMeng").offsetHeight,10)
divWidth = parseInt(document.getElementById("eMeng").offsetWidth,10)
docWidth = document.documentElement.clientWidth;
docHeight = document.documentElement.clientHeight;
document.getElementById("eMeng").style.top = parseInt(document.documentElement.scrollTop,10) + docHeight + 10;// divHeight
document.getElementById("eMeng").style.left = parseInt(document.documentElement.scrollLeft,10)
document.getElementById("eMeng").style.visibility="visible"
objTimer = window.setInterval("moveDiv()",10)

//下面是底部浮的内容开始
   var fixedwp = document.getElementById('fixedwp');
   if(isie6){
         fixedwp.style.position = 'absolute';
         window.onscroll = function(){
				fixedwp.style.background = 'transparent';
          }
   }else{
      fixedwp.style.position = 'fixed';
   }
     
      fixedwp.style.bottom = '0';
	  fixedwp.style.left = '0';
//下面是底部浮的内容完
}
catch(e){}
}

function resizeDiv()
{
i+=1
if(i>99999) closeDiv() //客户想不用自动消失由用户来自己关闭所以屏蔽这句
try{
divHeight = parseInt(document.getElementById("eMeng").offsetHeight,10)
divWidth = parseInt(document.getElementById("eMeng").offsetWidth,10)
docWidth = document.documentElement.clientWidth;
docHeight = document.documentElement.clientHeight;
document.getElementById("eMeng").style.top = docHeight - divHeight + parseInt(document.documentElement.scrollTop,10)
document.getElementById("eMeng").style.left = parseInt(document.documentElement.scrollLeft,10)
}
catch(e){}
}

function moveDiv()
{
try
{
if(parseInt(document.getElementById("eMeng").style.top,10) <= (docHeight - divHeight + parseInt(document.documentElement.scrollTop,10)))
{
window.clearInterval(objTimer)
objTimer = window.setInterval("resizeDiv()",1)
}
divTop = parseInt(document.getElementById("eMeng").style.top,10)
document.getElementById("eMeng").style.top = divTop - 1
}
catch(e){}
}
function closeDiv()
{
document.getElementById('eMeng').style.visibility='hidden';
if(objTimer) window.clearInterval(objTimer)
}
//window.setInterval("closeDiv()",100000)
document.writeln("<DIV id=eMeng style=\"Z-INDEX:99999; LEFT: 2px; VISIBILITY: hidden; WIDTH: 400px; POSITION: absolute; TOP: 1px; HEIGHT: 250px;\"><div></div><div></div></DIV>");


//另一个漂浮js
/*
document.writeln("<div id=\"aa\" style=\"width:400px;height:250px;\" ><a href=\"http://www.ql91.com/dongtai/news/201004233082.shtml\" target=\"_blank\"><img src=\"http://www.ql91.com/js/fangyituo/fangzhajuan.jpg\" alt=\"提醒广大市民：谨防借我院名义“诈捐”陷阱\" border=\"0\" usemap=\"#Map\" />");
document.writeln("<map name=\"Map\" id=\"Map\"><area shape=\"rect\" coords=\"365,9,391,34\" onclick=closezj() /></map></a></div>");

function closezj()
{
document.getElementById('aa').style.visibility='hidden';
}

    function scroll(p){
    	var d = document,w = window,o = d.getElementById(p.id),ie6 = /msie 6/i.test(navigator.userAgent);
    	if(o){
    		o.style.cssText +=";position:"+(p.f&&!ie6?'fixed':'absolute')+";"+(p.r?'left':'right')+":0;"+(p.t!=undefined?'top:'+p.t+'px':'bottom:0');
    		if(!p.f||ie6){
    			-function(){
	        		var t = 500,st = d.documentElement.scrollTop||d.body.scrollTop,c;
	                c = st  - o.offsetTop + (p.t!=undefined?p.t:(w.innerHeight||d.documentElement.clientHeight)-o.offsetHeight);//如果你是html 4.01请改成d.body,这里不处理以减少代码
	            	c!=0&&(o.style.top = o.offsetTop + Math.ceil(Math.abs(c)/10)*(c<0?-1:1) + 'px',t=10);//修正c为负数时，比如c=-9时Math.ceil(c/10)为0
	            	setTimeout(arguments.callee,t)
        		}()	
    		}
    	}  
    }
    scroll({
    	id:'aa'
    	
    })
*/