// JavaScript Document
var max=0;
function textlist() {
max=textlist.arguments.length;
for (i=0; i<max; i++)
this[i]=textlist.arguments[i];
}
/*
tl = new textlist(
"公司行號採購人員最貼心的網站，明天要拜拜了，拜拜用品我們幫你準備好！"
);*/
var top_2m = document.getElementById('top_lz').value;
//alert(document.getElementById('top_lz'));
tl = new textlist(top_2m);
var x = 0; pos = 0;
var l = tl[0].length;
 function textticker() {
document.tickform.tickfield.value = tl[x].substring(0, pos) + "_";
if(pos++ == l) {
pos = 0;
setTimeout("textticker()", 2000);
if(++x == max) x = 0;
l = tl[x].length;
} else
setTimeout("textticker()", 100);
}



function cha(n){ 
nowN=n;
clearTimeout(timer);
docha(n)
timer=setTimeout(nextPic,stopTime*2);
}
function docha(n){ 
for(i=0;i<biaoshi.childNodes.length;i++) {
biaoshi.childNodes[i].style.display=""; 
biaoshi.childNodes[i].id=""; 
}
biaoshi.childNodes[n].id="show"; 
for(i=0;i<pic.childNodes.length;i++){ 

pic.childNodes[n].style.filter="progid:DXImageTransform.Microsoft.RandomDissolve(Duration=1,orientation=vertical)"; 
pic.childNodes[n].filters[0].Apply(); 
pic.childNodes[i].style.display="none"; 
pic.childNodes[n].filters[0].Play(); 
} 

pic.childNodes[n].style.filter="progid:DXImageTransform.Microsoft.RandomDissolve(Duration=1,orientation=vertical)";; 
pic.childNodes[n].filters[0].Apply(); 
pic.childNodes[n].style.display="block"; 
pic.childNodes[n].filters[0].Play(); 
} 
var nowN=-1,timer=null;
var stopTime=3000;
function nextPic(){
clearTimeout(timer);
nowN++;
if (nowN>(biaoshi.childNodes.length-1))nowN=0;
docha(nowN);
timer=setTimeout(nextPic,stopTime);
}
window.onload=function(){textticker(); };

