var tcsell=new Array();
window.onload=function(){
// for (isell=1;isell<13;isell++){   
//  var n=isell;
// var o=document.getElementById('sell'+n);
// window.setInterval(function(){window.clearTimeout(tcsell[isell]); scrollup(document.getElementById('sell'+isell),18,0,tcsell[isell]);},5000); 
// }
SCOCQSCOOSSCO();
 var osell =new Array();
 var obuy =new Array();
 var onew =new Array();
 var ohot =new Array();
 osell[1]=document.getElementById('sell'+1); window.setInterval(function(){window.clearTimeout(tcsell[1]); scrollup(osell[1],18,0,tcsell[1]);},8000); 
 osell[2]=document.getElementById('sell'+2); window.setInterval(function(){window.clearTimeout(tcsell[2]); scrollup(osell[2],18,0,tcsell[2]);},8000); 
 osell[3]=document.getElementById('sell'+3); window.setInterval(function(){window.clearTimeout(tcsell[3]); scrollup(osell[3],18,0,tcsell[3]);},8000); 
 osell[4]=document.getElementById('sell'+4); window.setInterval(function(){window.clearTimeout(tcsell[4]); scrollup(osell[4],18,0,tcsell[4]);},8000); 
 osell[5]=document.getElementById('sell'+5); window.setInterval(function(){window.clearTimeout(tcsell[5]); scrollup(osell[5],18,0,tcsell[5]);},8000); 
 osell[6]=document.getElementById('sell'+6); window.setInterval(function(){window.clearTimeout(tcsell[6]); scrollup(osell[6],18,0,tcsell[6]);},8000); 
 osell[7]=document.getElementById('sell'+7); window.setInterval(function(){window.clearTimeout(tcsell[7]); scrollup(osell[7],18,0,tcsell[7]);},8000); 
 osell[8]=document.getElementById('sell'+8); window.setInterval(function(){window.clearTimeout(tcsell[8]); scrollup(osell[8],18,0,tcsell[8]);},8000); 
 osell[9]=document.getElementById('sell'+9); window.setInterval(function(){window.clearTimeout(tcsell[9]); scrollup(osell[9],18,0,tcsell[9]);},8000); 
 osell[10]=document.getElementById('sell'+10); window.setInterval(function(){window.clearTimeout(tcsell[10]); scrollup(osell[10],18,0,tcsell[10]);},8000); 
 osell[11]=document.getElementById('sell'+11); window.setInterval(function(){window.clearTimeout(tcsell[11]); scrollup(osell[11],18,0,tcsell[11]);},8000); 
 osell[12]=document.getElementById('sell'+12); window.setInterval(function(){window.clearTimeout(tcsell[12]); scrollup(osell[12],18,0,tcsell[12]);},8000); 
 obuy[1]=document.getElementById('buy'+1); window.setInterval(function(){window.clearTimeout(tcsell[13]); scrollup(obuy[1],18,0,tcsell[13]);},7000); 
 obuy[2]=document.getElementById('buy'+2); window.setInterval(function(){window.clearTimeout(tcsell[14]); scrollup(obuy[2],18,0,tcsell[14]);},7000); 
 obuy[3]=document.getElementById('buy'+3); window.setInterval(function(){window.clearTimeout(tcsell[15]); scrollup(obuy[3],18,0,tcsell[15]);},7000); 
 obuy[4]=document.getElementById('buy'+4); window.setInterval(function(){window.clearTimeout(tcsell[16]); scrollup(obuy[4],18,0,tcsell[16]);},7000); 
 obuy[5]=document.getElementById('buy'+5); window.setInterval(function(){window.clearTimeout(tcsell[17]); scrollup(obuy[5],18,0,tcsell[17]);},7000); 
 obuy[6]=document.getElementById('buy'+6); window.setInterval(function(){window.clearTimeout(tcsell[18]); scrollup(obuy[6],18,0,tcsell[18]);},7000); 
 obuy[7]=document.getElementById('buy'+7); window.setInterval(function(){window.clearTimeout(tcsell[19]); scrollup(obuy[7],18,0,tcsell[19]);},7000); 
 obuy[8]=document.getElementById('buy'+8); window.setInterval(function(){window.clearTimeout(tcsell[20]); scrollup(obuy[8],18,0,tcsell[20]);},7000); 
 obuy[9]=document.getElementById('buy'+9); window.setInterval(function(){window.clearTimeout(tcsell[21]); scrollup(obuy[9],18,0,tcsell[21]);},7000); 
 obuy[10]=document.getElementById('buy'+10); window.setInterval(function(){window.clearTimeout(tcsell[22]); scrollup(obuy[10],18,0,tcsell[22]);},7000); 
 obuy[11]=document.getElementById('buy'+11); window.setInterval(function(){window.clearTimeout(tcsell[23]); scrollup(obuy[11],18,0,tcsell[23]);},7000); 
 obuy[12]=document.getElementById('buy'+12); window.setInterval(function(){window.clearTimeout(tcsell[24]); scrollup(obuy[12],18,0,tcsell[24]);},7000); 
 onew[1]=document.getElementById('new'+1); window.setInterval(function(){window.clearTimeout(tcsell[25]); scrollup(onew[1],18,0,tcsell[25]);},7000); 
 onew[2]=document.getElementById('new'+2); window.setInterval(function(){window.clearTimeout(tcsell[26]); scrollup(onew[2],18,0,tcsell[26]);},7000); 
 onew[3]=document.getElementById('new'+3); window.setInterval(function(){window.clearTimeout(tcsell[27]); scrollup(onew[3],18,0,tcsell[27]);},7000); 
 onew[4]=document.getElementById('new'+4); window.setInterval(function(){window.clearTimeout(tcsell[28]); scrollup(onew[4],18,0,tcsell[28]);},7000); 
 onew[5]=document.getElementById('new'+5); window.setInterval(function(){window.clearTimeout(tcsell[29]); scrollup(onew[5],18,0,tcsell[29]);},7000); 
 onew[6]=document.getElementById('new'+6); window.setInterval(function(){window.clearTimeout(tcsell[30]); scrollup(onew[6],18,0,tcsell[30]);},7000); 
 onew[7]=document.getElementById('new'+7); window.setInterval(function(){window.clearTimeout(tcsell[31]); scrollup(onew[7],18,0,tcsell[31]);},7000); 
 onew[8]=document.getElementById('new'+8); window.setInterval(function(){window.clearTimeout(tcsell[32]); scrollup(onew[8],18,0,tcsell[32]);},7000); 
 onew[9]=document.getElementById('new'+9); window.setInterval(function(){window.clearTimeout(tcsell[33]); scrollup(onew[9],18,0,tcsell[33]);},7000); 
 onew[10]=document.getElementById('new'+10); window.setInterval(function(){window.clearTimeout(tcsell[34]); scrollup(onew[10],18,0,tcsell[34]);},7000); 
 onew[11]=document.getElementById('new'+11); window.setInterval(function(){window.clearTimeout(tcsell[35]); scrollup(onew[11],18,0,tcsell[35]);},7000); 
 onew[12]=document.getElementById('new'+12); window.setInterval(function(){window.clearTimeout(tcsell[36]); scrollup(onew[12],18,0,tcsell[36]);},7000); 
 ohot[1]=document.getElementById('hot'+1); window.setInterval(function(){window.clearTimeout(tcsell[37]); scrollup(ohot[1],18,0,tcsell[37]);},6000); 
 ohot[2]=document.getElementById('hot'+2); window.setInterval(function(){window.clearTimeout(tcsell[38]); scrollup(ohot[2],18,0,tcsell[38]);},6000); 
 ohot[3]=document.getElementById('hot'+3); window.setInterval(function(){window.clearTimeout(tcsell[39]); scrollup(ohot[3],18,0,tcsell[39]);},6000); 
 ohot[4]=document.getElementById('hot'+4); window.setInterval(function(){window.clearTimeout(tcsell[40]); scrollup(ohot[4],18,0,tcsell[40]);},6000); 
 ohot[5]=document.getElementById('hot'+5); window.setInterval(function(){window.clearTimeout(tcsell[41]); scrollup(ohot[5],18,0,tcsell[41]);},6000); 
 ohot[6]=document.getElementById('hot'+6); window.setInterval(function(){window.clearTimeout(tcsell[42]); scrollup(ohot[6],18,0,tcsell[42]);},6000); 
 ohot[7]=document.getElementById('hot'+7); window.setInterval(function(){window.clearTimeout(tcsell[43]); scrollup(ohot[7],18,0,tcsell[43]);},6000); 
 ohot[8]=document.getElementById('hot'+8); window.setInterval(function(){window.clearTimeout(tcsell[44]); scrollup(ohot[8],18,0,tcsell[44]);},6000); 
 ohot[9]=document.getElementById('hot'+9); window.setInterval(function(){window.clearTimeout(tcsell[45]); scrollup(ohot[9],18,0,tcsell[45]);},6000); 
 ohot[10]=document.getElementById('hot'+10); window.setInterval(function(){window.clearTimeout(tcsell[46]); scrollup(ohot[10],18,0,tcsell[46]);},6000); 
 ohot[11]=document.getElementById('hot'+11); window.setInterval(function(){window.clearTimeout(tcsell[47]); scrollup(ohot[11],18,0,tcsell[47]);},6000); 
 ohot[12]=document.getElementById('hot'+12); window.setInterval(function(){window.clearTimeout(tcsell[48]); scrollup(ohot[12],18,0,tcsell[48]);},6000); 
}
function scrollup(o,d,c,tc){
 if(d==c){
  var t=o.firstChild.cloneNode(true);
  o.removeChild(o.firstChild);o.appendChild(t);
  t.style.marginTop=o.firstChild.style.marginTop='0px';
//  hscroll(o,tc);
 }
 else{
  ch=false;var s=3,c=c+s,l=(c>=d?c-d:0);
  o.firstChild.style.marginTop=-c+l+'px';
  window.setTimeout(function(){scrollup(o,d,c-l,tc)},50);
 }
}
function hscroll(o,tc){
 var w1=o.firstChild.offsetWidth,w2=o.offsetWidth;
 if(w1<=w2)return;
 tc=window.setTimeout(function(){hs(o,w1-w2,0,w1-w2,tc)},2000);
}
function hs(o,d,c,p,tc){
 c++;var t=(c>0?-c:c);o.firstChild.style.marginLeft=t+'px';
 if(c==d){if(d==0){tc=window.setTimeout(function(){if (o.firstChild.offsetWidth>o.offsetWidth) hs(o,p,0,p,tc);else window.clearTimeout(tc);},3000);}else tc=window.setTimeout(function(){if (o.firstChild.offsetWidth>o.offsetWidth) hs(o,0,-p,p,tc);else window.clearTimeout(tc);},2000);}
 else tc=window.setTimeout(function(){ if (o.firstChild.offsetWidth>o.offsetWidth) hs(o,d,c,p,tc);else window.clearTimeout(tc);},5);
}  