// JavaScript Document
function img1(x){	//获得数组记录数
	    this.length=x;
    }
    //申请数组并且给数组元素赋值，也就是把图片的相对路径保存起来
    //若是图片较多，可以增加数组元素的个数
    //在这个例子中用了4张图片，使用数组元素的个数为4
    iname = new img1(4);

    iname[1] = "images/flash1.gif";
    iname[2] = "images/flash2.gif";
    iname[3] = "images/flash3.gif";
    iname[0] = "images/flash4.jpg";
	
    var mytimeoout;
    var i = 0;

    function play() {
        
        if (i == 3) {
            i = 0;
        }
        else {
            i++;
        }
        
        switch (i) {
            case 1: 
                document.getElementById("img1").src = "images/flashs1on.gif";
                document.getElementById("img2").src = "images/flashs2.gif";
                document.getElementById("img3").src = "images/flashs3.gif";
                document.getElementById("img4").src = "images/flashs4.gif";
		document.getElementById("linkURL").href = "javascript:void(location.href='fur/ps400.htm')";
                break;
            case 2:
                document.getElementById("img2").src = "images/flashs2on.gif";
                document.getElementById("img1").src = "images/flashs1.gif";
                document.getElementById("img3").src = "images/flashs3.gif";
                document.getElementById("img4").src = "images/flashs4.gif";
		document.getElementById("linkURL").href = "javascript:void(location.href='fur/cl500.htm')";
                break;
            case 3: 
                document.getElementById("img3").src = "images/flashs3on.gif";
                document.getElementById("img1").src = "images/flashs1.gif";
                document.getElementById("img2").src = "images/flashs2.gif";
                document.getElementById("img4").src = "images/flashs4.gif";
		document.getElementById("linkURL").href = "javascript:void(location.href='fur/mbox3.htm')";
                break;
            case 0: 
                document.getElementById("img4").src = "images/flashs4on.gif";
                document.getElementById("img1").src = "images/flashs1.gif";
                document.getElementById("img2").src = "images/flashs2.gif";
                document.getElementById("img3").src = "images/flashs3.gif";
		document.getElementById("linkURL").href = "javascript:void(location.href='fur/truewise.htm')";
                break;
        }
        
        img.filters[0].apply();
        img.src = iname[i];
        img.filters[0].play();
	    mytimeoout=setTimeout("play()",4000);
	    
	    //设置演示时间，4秒
	    //这个时间值要大于滤镜中设置的转换时间值，这样当转换结束后能停留一段时间，看清楚图片。
	}

	function changeImg(j) {
	    clearTimeout(mytimeoout);
	    i = j - 1;
	    mytimeoout = setTimeout("play()", 100);
	    
	    
	    //play();
	}
