<!--
var imageLoaded = 0;
var timer = null;
var rId = 0;
var pre = 0;
var sT = 2.5;

function addPreload(id)
{
  if (id == 0)
    document.getElementById('r0').style.display = 'block';

  imageLoaded++;
}
function checkPreload()
{
  if (imageLoaded >= imageCount)
  {
    timer = setTimeout('play();', timeList[0]*1000);
  }
	else
	{
		timer = setTimeout('checkPreload();', 200);
	}
}
var isIE = (navigator.appName == "Microsoft Internet Explorer");

function play()
{
  pre = rId;
  rId++;
  if (rId >= imageCount) rId = 0;

  var filterValue = filterId[rId];
  var imgContent = document.getElementById('recImageContainer');
  if (isIE && filterValue > 0)
  {
    var docContent = document.getElementById('recImageContainer').style;
    switch (filterValue)
    {
      case 1://双开门 - 水平 向外
        docContent.filter = 'progid:DXImageTransform.Microsoft.Barn(duration='+sT+', motion="out", orientation="vertical")'
        break;
      case 2://双开门 - 水平 向内
        docContent.filter = 'progid:DXImageTransform.Microsoft.Barn(duration='+sT+', motion="in", orientation="vertical")'
        break;
      case 3://双开门 - 垂直 向外
        docContent.filter = 'progid:DXImageTransform.Microsoft.Barn(duration='+sT+', motion="out", orientation="horizontal")'
        break;
      case 4:
        docContent.filter = 'progid:DXImageTransform.Microsoft.Stretch(duration='+sT+')'
        break;
      case 5:
        docContent.filter = 'progid:DXImageTransform.Microsoft.gradientWipe(duration='+sT+', gradientsize=0.5)';
        break;
      case 6:
        docContent.filter = 'revealTrans(Transition=12,duration='+sT+')';
        break;
      case 7:
        docContent.filter = 'progid:DXImageTransform.Microsoft.Fade(duration='+sT+')';
        break;
      case 8:
        docContent.filter = 'progid:DXImageTransform.Microsoft.Slide(duration='+sT+', bands="8")'
        document.getElementById('recImageContainer').filters[0].slideStyle = 'PUSH'; //['HIDE','','']swap
        break;
      case 9:
        docContent.filter = 'progid:DXImageTransform.Microsoft.Wheel(duration='+sT+', spokes=4)'
        break;
      case 10:
        docContent.filter = 'progid:DXImageTransform.Microsoft.CheckerBoard(duration='+sT+', direction="left")'
        break;
      case 11:
        docContent.filter = 'progid:DXImageTransform.Microsoft.RadialWipe(duration='+sT+')'
        document.getElementById('recImageContainer').filters[0].wipeStyle = 'WEDGE';
        break;
      case 12:
        docContent.filter = 'progid:DXImageTransform.Microsoft.RadialWipe(duration='+sT+')'
        document.getElementById('recImageContainer').filters[0].wipeStyle = 'RADIAL';
        break;
      case 13:
        docContent.filter = 'progid:DXImageTransform.Microsoft.Iris(duration='+sT+')'
        document.getElementById('recImageContainer').filters[0].irisstyle = 'CROSS';
        break;
      case 14:
        docContent.filter = 'progid:DXImageTransform.Microsoft.Iris(duration='+sT+')'
        document.getElementById('recImageContainer').filters[0].irisstyle = 'DIAMOND';//'DIAMOND','CIRCLE','CROSS','PLUS','SQUARE','STAR'
        break;
      case 15:
        docContent.filter = 'progid:DXImageTransform.Microsoft.Iris(duration='+sT+')'
        document.getElementById('recImageContainer').filters[0].irisstyle = 'STAR';
        break;
      case 16:
        docContent.filter = 'progid:DXImageTransform.Microsoft.Blinds(duration='+sT+',direction="down")'
        document.getElementById('recImageContainer').filters[0].bands = Math.random()*12 + 3;
        break;
      case 17://对角线 - 右下→左上
        docContent.filter = 'progid:DXImageTransform.Microsoft.Strips(duration='+sT+', motion="leftup")'
        break;
    }
    imgContent.filters[0].apply()
  }
  document.getElementById('r'+pre).style.display = 'none';
  document.getElementById('r'+rId).style.display = 'block';
  document.getElementById('rt'+pre).style.display = 'none';
  document.getElementById('rt'+rId).style.display = 'block';
  document.getElementById('ri'+pre).className = '';
  document.getElementById('ri'+rId).className = 'curID';
  if (isIE && filterValue > 0)
  { 
    imgContent.filters[0].play()
  }

  timer = setTimeout('play();', timeList[pre]*1000);
}

function goRecID(id)
{
	if (rId != id)
	{
		clearTimeout(timer);
		pre = rId;
		rId = id == 0 ? imageCount - 1 : id - 1;
  document.getElementById('r'+pre).style.display = 'none';
  document.getElementById('r'+rId).style.display = 'block';
  document.getElementById('rt'+pre).style.display = 'none';
  document.getElementById('rt'+rId).style.display = 'block';
  document.getElementById('ri'+pre).className = '';
  document.getElementById('ri'+rId).className = 'curID';
		play();
	}	
}
//-->