var slideShowSize = "120";
var slideShowTarget;
var LbTitleIdx;
var LbTitleImages=new Array("title.png", "chat.png");
var slideShowSpeed = 3000;
var crossFadeDuration = 2;
var LeadingBoxRoot = "http://www.tinbusports.com/ujena/leadingbox";
var LBPic = new Array();
var preLoad = new Array();
var t;
var j = 0;
var p = LBPic.length;

function ShowModelLeadingBox (theWidth, theSpeed, theURL, lbIndex)
{
 slideShowSize = theWidth;
 slideShowSpeed = theSpeed;
 slideShowTarget = theURL;
 LbTitleIdx = lbIndex;

 LBPic[0] = LeadingBoxRoot+"/"+slideShowSize+"/01.png";
 LBPic[1] = LeadingBoxRoot+"/"+slideShowSize+"/02.png";
 LBPic[2] = LeadingBoxRoot+"/"+slideShowSize+"/03.png";
 LBPic[3] = LeadingBoxRoot+"/"+slideShowSize+"/04.png";
 LBPic[4] = LeadingBoxRoot+"/"+slideShowSize+"/05.png";
 LBPic[5] = LeadingBoxRoot+"/"+slideShowSize+"/06.png";
 LBPic[6] = LeadingBoxRoot+"/"+slideShowSize+"/07.png";
 LBPic[7] = LeadingBoxRoot+"/"+slideShowSize+"/08.png";
 LBPic[8] = LeadingBoxRoot+"/"+slideShowSize+"/09.png";
 LBPic[9] = LeadingBoxRoot+"/"+slideShowSize+"/10.png";
 LBPic[10] = LeadingBoxRoot+"/"+slideShowSize+"/11.png";
 LBPic[11] = LeadingBoxRoot+"/"+slideShowSize+"/12.png";

 p = LBPic.length;
 for (i = 0; i < p; i++){
  preLoad[i] = new Image();
  preLoad[i].src = LBPic[i];
 }

 var Tbl_Height;
 if (slideShowSize==90) {
  Tbl_Height=120;
 } else if (slideShowSize==120) {
  Tbl_Height=150;
 } else {
  Tbl_Height=290;
 }

 document.write ("<center><table width="+slideShowSize+" border=0 cellpadding=0 cellspacing=0>");
 document.write ("<tr><td><center>");
 document.write ("<a href=\""+slideShowTarget+"\">");
 document.write ("<img border=0 src=\""+LeadingBoxRoot+"/"+slideShowSize+"/"+LbTitleImages[LbTitleIdx]+"\"><br>");
 document.write ("<img border=0 src=\""+LBPic[0]+"\" name='LBSlideShow' width="+slideShowSize+"><br>");
 document.write ("<img border=0 src=\""+LeadingBoxRoot+"/"+slideShowSize+"/click.png"+"\"><br>");
 document.write ("</a></center></td></tr></table></center>");

 runModelSlideShow();
}
function runModelSlideShow(){
   if (document.all){
      document.images.LBSlideShow.style.filter="blendTrans(duration=2)";
      document.images.LBSlideShow.style.filter="blendTrans(duration=crossFadeDuration)";
      document.images.LBSlideShow.filters.blendTrans.Apply();
   }
   document.images.LBSlideShow.src = preLoad[j].src;
   if (document.all){
      document.images.LBSlideShow.filters.blendTrans.Play();
   }
   j = j + 1;
   if (j > (p-1)) j=0;
   t = setTimeout('runModelSlideShow()', slideShowSpeed);
}
