﻿// JScript 文件

var linkarr=new Array();
var picarr=new Array();
var textarr=new Array();
var focus_width;
var focus_height;
var text_height;
var pics = "";
var links = "";
var texts = "";
var defJpeg = "";
var counts=4;
var nn=0;
var key=0;
var tt=2000;

function InitPic(arrayLink,arrayPic,arrayText,width,height,textHeight){

    
//    linkarr=arrayLink;
//    picarr=arrayPic;
//    textarr=arrayText;
    linkarr=arrayLink.split("|");
    picarr=arrayPic.split("|");
    textarr=arrayText.split("|");
    focus_width=width;
    focus_height=height;
    text_height=textHeight;
    counts=picarr.length;
}

function changeimg(n)
{
    nn=n;window.clearInterval(tt);change_img();
}
function change_img(){
    if(key==0)
    {
        key=1;
    }
    else if(document.all)
    {
        document.getElementById("pic").filters[0].Apply();
        document.getElementById("pic").filters[0].Play(duration=2);
    }
    eval('document.getElementById("pic").src=picarr['+nn+']');
    eval('document.getElementById("url").href=linkarr['+nn+']');
    eval('document.getElementById("pic").alt=textarr['+nn+']');
    eval('document.getElementById("titlelink").href=linkarr['+nn+']');
    //IE
    eval('document.getElementById("titlelink").innerHTML=textarr['+nn+']');
    //FF
    //eval('document.getElementById("titlelink").textContent=textarr['+nn+']');
    for (var i=0;i<counts;i++)
    {
        document.getElementById("xxjdjj"+i).className='axx';
    }
    document.getElementById("xxjdjj"+nn).className='bxx';
    nn++;
    if(nn>=counts)
    {
        nn=0;
    }
    tt=setTimeout('change_img()',4000);
}
function mkjsslice()
{
    document.write('<style>');
    document.write('.axx{padding:1px 7px;border-left:#cccccc 1px solid;}');
    document.write('a.axx:link,a.axx:visited{text-decoration:none;color:#fff;line-height:12px;font:10px sans-serif;background-color:#666;}');
    document.write('a.axx:active,a.axx:hover{text-decoration:none;color:#fff;line-height:12px;font:10px sans-serif;background-color:#999;}');
    document.write('.bxx{padding:1px 7px;border-left:#cccccc 1px solid;}');
    document.write('a.bxx:link,a.bxx:visited{text-decoration:none;color:#fff;line-height:12px;font:10px sans-serif;background-color:#7d0000;}');
    document.write('a.bxx:active,a.bxx:hover{text-decoration:none;color:#fff;line-height:12px;font:10px sans-serif;background-color:#D34600;}');
    document.write('</style>');
    document.write('<div style="border:#222 1px solid; width:'+focus_width+'px;height:'+focus_height+'px;overflow:hidden;text-overflow:clip;">');
    document.write('<div><a id="url"><img id="pic" style="border:0px;filter:progid:dximagetransform.microsoft.wipe(gradientsize=1.0,wipestyle=4, motion=forward)" width='+focus_width+' height='+focus_height+' /></a></div>');
    document.write('<div style="filter:alpha(style=1,opacity=10,finishOpacity=80);background:#888888;width:100%-2px;text-align:right;top:-12px;position:relative;margin:1px;height:12px;padding:0px;margin:0px;border:0px;padding-right:1px">');
    for(var i=0;i<counts;i++)
    {
        document.write('<a href="javascript:changeimg('+i+');" id="xxjdjj'+i+'" class="axx" target="_self">'+(i+1)+'</a>');
    }
    document.write('</div>');
    document.write('</div>');
    document.write('<div align="center"><table><tr><td align="center" height="16"><a id="titlelink"></a></td></tr></table></div>');
    change_img();
}