<!--
/******************************************************************
说明：向上平滑滚动，换幅自动停顿，移动鼠标暂停，移动时间与停留时间相同，为高度值*stime(毫秒)
objID：包含内容的容器
height：高度
stime：多少毫秒向上滚动1像素
	
示例：
<DIV id=ztc>
	<table height="140" cellSpacing="0" cellPadding="0" width="900" align="center" border="0">
		<tr>
			<td width="21" height="140"></td>
			<td align="center" width="144"><IMG src="images/pic19.gif" border="0"></td>
			<td align="center" width="144"><IMG src="images/pic20.gif" border="0"></td>
			<td width="18"></td>
		</tr>
	</table>
</DIV>
<script language="javascript" src="../../Include/ScrollUP.js"></script>
<script>ScrollUP("ztc",140,5);</script>
*/

var Int;
var marqueesHeight=140;
var icefable_ztc;
var steptime=5;
function ScrollUP(objID,height,stime)
{
icefable_ztc=document.getElementById(objID)
marqueesHeight=height?height:140;
steptime=stime?stime:5;
stopscroll_ztc=false; 
with(icefable_ztc){ 
      style.height=marqueesHeight; 
      style.overflowX="visible"; 
      style.overflowY="hidden"; 
      noWrap=true; 
      onmouseover=new Function("stopscroll_ztc=true"); 
      onmouseout=new Function("stopscroll_ztc=false"); 
  } 
  preTop_ztc=0; currentTop_ztc=marqueesHeight; stoptime_ztc=0; 
  icefable_ztc.innerHTML+=icefable_ztc.innerHTML; 
  init_srolltext_ztc(); 
 }  
function init_srolltext_ztc(){ 
  icefable_ztc.scrollTop=0; 
  clearInterval(Int);
  Int=setInterval("scrollUp_ztc()",steptime);
}

function scrollUp_ztc(){ 

  if(stopscroll_ztc==true) return; 
  currentTop_ztc+=1; 
  if(currentTop_ztc==marqueesHeight+1) 
  { 
      stoptime_ztc+=1; 
      currentTop_ztc-=1; 
      if(stoptime_ztc==marqueesHeight)  
      { 
          currentTop_ztc=0; 
          stoptime_ztc=0;           
      } 
  } 
  else {       
      preTop_ztc=icefable_ztc.scrollTop; 
      icefable_ztc.scrollTop+=1; 
      if(preTop_ztc==icefable_ztc.scrollTop){ 
        icefable_ztc.scrollTop=marqueesHeight; 
        icefable_ztc.scrollTop+=1; 
      } 
  } 
} 
//-->
var isHidden = true;
function freeTicket(ev,lay){
	var oEvent = window.event?window.event:ev;
	var l = document.getElementById(lay);
	var x = oEvent.x ? oEvent.x : oEvent.pageX;
	x = (x > document.body.clientWidth/2) ? (x - 312) : x;
	var y = oEvent.y ? oEvent.y : oEvent.pageY;
	
	if(isHidden){
		l.style.display='block';
		l.style.left = x;
		l.style.top = y;
	}else
		l.style.display = 'none';
	isHidden = !isHidden;
}
