<HTML>
<Head>
<Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312"/>
<SCRIPT Lanuage = 'javascript '>
Function controlimg (imgid)
{
This. objid = imgid;
This. imgnum = 0;
This. imgarr = new array ();
}
Controlimg. Prototype. Add = addimg;
Controlimg. Prototype. loadpic = preload;
Controlimg. Prototype. Convert = changeimg;
Function addimg (imgsrc, href)
{
This. imgarr [This. imgarr. Length] = {
"Imgsrc": imgsrc,
"Href": href
}
}
Function preload (){
For (I = 0; I <this. imgarr. length; I ++)
{
Eval ("IMG _" + this. objid + "_" + I + "= new image ()");
Eval ("IMG _" + this. objid + "_" + I + ". src = This. imgarr [I]. imgsrc ");
}
}
Function changeimg (PICPOS)
{
If (this. imgnum> = This. imgarr. length)
{
This. imgnum = 0;
}
/* If (PICPOS. length! = 0)
{
This. imgnum = math. Round (PICPOS );
}*/
VaR obj_img = Document. getelementbyid (this. objid );
Obj_img.style.filter = (obj_img.style.filter = "revealtrans ")? "Revealtrans": "blendtrans ";
Obj_img.style.filter.duration = 3.0000;
Obj_img.style.filter.transition = 23;
Obj_img.filters (0). Apply ();
Obj_img.src = This. imgarr [This. imgnum]. imgsrc;
Obj_img.parentnode.href = This. imgarr [This. imgnum]. href;
Obj_img.filters (0). Play ();
This. imgnum = This. imgnum + 1;
// Window. setTimeout ("changeimg ()", 3000 );
}
VaR obj_convert;
Function Init ()
{
Obj_convert = new controlimg ("IMG ")
Obj_convert.add ("images/00logo.gif", "http://www.google.com ");
Obj_convert.add ("images/0.gif"," http://www.baidu.com ");
Obj_convert.add ("images/06top_42.gif", "http://www.csdn.net ");
Obj_convert.loadpic ();
Window. setinterval ("Maid ()", 3000 );
}
</SCRIPT>
</Head>