﻿<!--
var formeditarticle ="<table width=\'200\' height=\'100\' border=\'0\' align=\'center\' cellpadding=\'0\' cellspacing=\'0\' bgcolor=\'#FFcc33\'><tr><td width=\'12\'></td><td align=\'right\'><input type=\'button\' value=\'[×关闭]\' id=\'closewin_div\' class=\'buttonsumib\' onclick=\'PauseAction();close_div();\' style=\'border:0px solid;height:16px;background-color:transparent;color:#ff0000;\' /></td><td width=\'12\'></td></tr><tr><td width=\'12\' style=\'color:#000;cursor:pointer;\' onClick=\'PrevImg();PauseAction();iniFun()\' title=\'上一张\'><img src=\'images/pr.gif\' /></td><td align=\'center\' height=\'100px\'><div width=\'100%\' border=\'0\'  style=\'padding:10px;padding-bottom:6px;background:#fff;text-align:center;\'><a id=\'SlideImgLink\' href=\'\' target=\'_blank\'><img id=\'SlideImg\' onMouseOver=\'PauseAction();\' onMouseOut=\'iniFun();\' style=\'border:1px #999 solid;filter: revealtrans(duration=2.0,transition=12);\' alt=\'\' src=\'\' border=\'0\' name=\'SlideImg\'></a></div></td><td width=\'12\' style=\'color:#000;cursor:pointer;\' onClick=\'NextImg();PauseAction();iniFun()\' title=\'下一张\'><img src=\'images/ne.gif\' /></td></tr><tr><td width=\'12\' height=\'20px\'></td><td height=\'20px\' style=\'height:20px;border:0px #666 solid;font-weight:bold;padding:0px;color:#fff;font-size:12px;text-align:left;background-color:#999;\'><input type=\'button\' value=\'\' id=\'slideTitle\' style=\'border:2px solid #999;background-color:#999;color:#fff;width:100%;\' /></td><td width=\'12\' height=\'20px\'></td></tr><tr><td width=\'12\' height=\'16px\'></td><td height=\'10px\'></td><td width=\'12\' height=\'10px\'></td></tr></table>";
var callfun;
var ObjImg = new Image();
var imgIndex = 0;

//獲取元素id方法
function getEle(EleName){
   if(document.getElementById){
        return eval('document.getElementById("' + EleName + '")');
    }else if(document.layers){
        return eval("document.layers['" + EleName +"']");
    }else{
        return eval('document.all.' + EleName);
    }
}
function SlideImg(index){
    imgIndex = index;
    if ('Microsoft Internet Explorer' == navigator.appName){//圖片過度效果
        document.images["SlideImg"].filters[0].transition=23;
        document.images["SlideImg"].filters.item(0).Apply();
    }
    document.images["SlideImg"].src = ImgDataArr[index][0];
    document.images["SlideImg"].alt = ImgDataArr[index][1];
    getEle("slideTitle").value =ImgDataArr[index][1] ;
    getEle("SlideImgLink").href = ImgDataArr[index][2];
    if((index+1)<ImgDataArr.length) ObjImg.src = ImgDataArr[index+1][0];//preload;
    if ('Microsoft Internet Explorer' == navigator.appName){
         document.images["SlideImg"].filters.item(0).play();
    }
}
function NextImg(){
   imgIndex = ((imgIndex+1)>=ImgDataArr.length?0:(imgIndex+1));
   SlideImg(imgIndex);
}
function PrevImg(){
   imgIndex = ((imgIndex-1)<0?(ImgDataArr.length-1):(imgIndex-1));
   SlideImg(imgIndex);
}
function iniFun(){
   if(callfun==null) callfun = setInterval('NextImg()', 6000);//自動運行時間
}
function PauseAction(){
   clearInterval(callfun);
   callfun = null;
}
//點擊小圖播放大圖
function insertimg(num){
   document.getElementById("SlideImg").src=ImgDataArr[num][0];
   document.getElementById("slideTitle").value=ImgDataArr[num][1];
   document.getElementById("SlideImgLink").href=ImgDataArr[num][2];
}

//-->
