用js做的遮罩层解决办法

用js做的遮罩层
 <style> 
 div#mask{width:600px;height:415px;background:#e6e6e6;position:absolute; top:0%; left:30%;z-index:999} 
 </style> 
 <script> 
 window.onload=function(){ 
 var oDiv=document.getElementById('mask'); 
 oDiv.onclick=function(){ 
 var iHeight=css(oDiv,'height'); 
 var iTarget=-iHeight; 
 var timer=null; 
   
 timer=setInterval(function(){ 
 var iTop=css(oDiv,'top'); 
 var iSpeed=Math.floor((iTarget-iTop)/8); 
 var t=iTop+iSpeed; 
 if(iTop<=iTarget){ 
 clearInterval(timer); 
 }else{ 
 oDiv.style.top=t+'px';  
 } 
 },10); 
   
   
 } 
 } 
 function css(obj,attr){ 
 var result; 
 if(obj.currentStyle){ 
 alert( result=obj.currentStyle[attr]); 
  
 }else{ 
 alert(result=getComputedStyle(obj,false)[attr]); 
 } 
 return parseInt(result); 
 } 
 </script> 
</head> 
<body> 
11
 <div id="mask" ></div>

<style> 
 div#mask{width:600px;height:415px;background:#e6e6e6;position:absolute; top:0%; left:30%;z-index:999} 
 </style>
中的 div#mask什么意思?
为什么把这段代码放在discuz 的dicuz.htm做弹出页面,360的极速浏览器ie和极速模式就可以测试成功,而chrome则js没有反应不能上浮
------解决方案--------------------
经测试正常。
------解决方案--------------------

div#mask   ---- id = mask 的 div 

chrome36测试正常