土耳其个人旅游签证|土耳其自助游签证|土耳其自由行签证
marque(160,35,"icefable1","icefable2")//320是滚动的宽度。30是一次滚动的高度,也就是行高
var scrollElemh;
var stopscrollh;
var stoptimeh;
var preToph;
var leftElemh;
var currentToph;
var marqueesHeighth;
function marque(width,height,marqueName,marqueCName){
try{
marqueesHeighth = height;
stopscrollh = false;
scrollElemh = document.getElementById(marqueName);
with(scrollElemh){
style.width = width;
style.height = marqueesHeighth;
style.overflow = 'hidden';
noWrap = true;
}
scrollElemh.onmouseover = new Function('stopscrollh = true');
scrollElemh.onmouseout = new Function('stopscrollh = false');
preToph = 0;
currentToph = 0;
stoptimeh = 0;
leftElemh = document.getElementById(marqueCName);
scrollElemh.appendChild(leftElemh.cloneNode(true));
init_srolltexth();
}catch(e) {}
}
function init_srolltexth(){
scrollElemh.scrollTop = 0;
setInterval('scrollUph()', 20);
}
function scrollUph(){
if(stopscrollh) return;
currentToph += 1;
if(currentToph == marqueesHeighth+1) {
stoptimeh += 1;
currentToph -= 1;
if(stoptimeh == (marqueesHeighth)*3) {//停顿时间
currentToph = 0;
stoptimeh = 0;
}
}else{
preToph = scrollElemh.scrollTop;
scrollElemh.scrollTop += 1;
if(preToph == scrollElemh.scrollTop){
scrollElemh.scrollTop = marqueesHeighth;
scrollElemh.scrollTop += 1;
}
}
}