// 属性设置 
var E_strIFaderTransType = "reveal"; // "reveal" | "blend" 
var Filter_number = 23; // 滤镜种数 
var change_time = 3.000; // 滤镜转换过程为3.0秒延迟 
var wait_time = 5000; // 两种滤镜之间为5秒延迟 

var obj_Timer; 
var count_temp1 = 0; //记录当前是第几幅图片 
var count_temp2 = 0; //记录当前是第几幅图片 
var Img_arry1 = new Array(); //图片数组 
var Img_arry2 = new Array(); //图片数组 
var E_ie4 = document.all? true:false; 
var E_nn4 = document.layers? true:false; 

function Filt_set1() //设置滤镜 
{ 
   if(!E_ie4 && !E_nn4) return;
   if(E_ie4) { 
     var theImg = document.all["idImgFading1"]; 
     if(theImg == null) return; 
     with(document.all["idImgFading1"]) { 
       style.filter = (E_strIFaderTransType == "reveal")?"revealTrans":"blendTrans"; 
       style.filter.duration = change_time; 
       style.filter.transition = Filter_number; 
     } 
   } 
   obj_Timer = window.setInterval("use_Filter1()",wait_time); 
} 

function use_Filter1() //滤镜的启动 
{ 
   if(E_ie4) { 
     with(document.all["idImgFading1"]) { 
       if(E_strIFaderTransType == "reveal") { 
         filters(0).transition = Filter_number; 
       } 
       if(count_temp1 == (Img_arry1.length - 1)) { 
         count_temp1 = -1; 
       } 
       count_temp1++; 
       //title = Img_arry1[count_temp1].sAlt; 
   
       filters(0).apply(); 
       src = Img_arry1[count_temp1].sImgUrl; 
       filters(0).play(); 
     } 
   } 
   else if(E_nn4) { 
     if(count_temp1 == (Img_arry1.length - 1)) { 
       count_temp1 = -1; 
     } 
     count_temp1++; 
     document.images["idImgFading1"].src = Img_arry1[count_temp1].sImgUrl; 
   } 
} 
function Filt_set2() //设置滤镜 
{ 
   if(!E_ie4 && !E_nn4) return;
   if(E_ie4) { 
     var theImg = document.all["idImgFading2"]; 
     if(theImg == null) return; 
     with(document.all["idImgFading2"]) { 
       style.filter = (E_strIFaderTransType == "reveal")?"revealTrans":"blendTrans"; 
       style.filter.duration = change_time; 
       style.filter.transition = Filter_number; 
     } 
   } 
   obj_Timer = window.setInterval("use_Filter2()",wait_time); 
} 

function use_Filter2() //滤镜的启动 
{ 
   if(E_ie4) { 
     with(document.all["idImgFading2"]) { 
       if(E_strIFaderTransType == "reveal") { 
         filters(0).transition = Filter_number; 
       } 
       if(count_temp2 == (Img_arry2.length - 1)) { 
         count_temp2 = -1; 
       } 
       count_temp2++; 
       //title = Img_arry2[count_temp2].sAlt; 
   
       filters(0).apply(); 
       src = Img_arry2[count_temp2].sImgUrl; 
       filters(0).play(); 
     } 
   } 
   else if(E_nn4) { 
     if(count_temp2 == (Img_arry2.length - 1)) { 
       count_temp2 = -1; 
     } 
     count_temp2++; 
     document.images["idImgFading2"].src = Img_arry2[count_temp2].sImgUrl; 
   } 
} 

function obj_ClearTime() { 
   window.clearInterval(obj_Timer); 
} 
window.onunload = obj_ClearTime;//取消计时器，释放系统资源 

function Img_obj(sImgUrl,command,sAlt,sTarget) 
{ 
   this.sImgUrl = (sImgUrl == null)?"":sImgUrl; 
   this.command = (command == null || command == "")?"":command; 
   this.sAlt = (sAlt == null)?"":sAlt; 
   this.sTarget = (sTarget == null || sTarget == "")?"_self":sTarget; 
} 
