var counts = 4; //大图and链接地址// var bigimg = new array(); var linkurl = new array(); bigimg[0] = '/content/homepage/imgs/homepage/banner.jpg'; linkurl[0] = ""; bigimg[1] = '/content/homepage/imgs/homepage/bannerone.jpg'; linkurl[1] = ""; bigimg[2] = '/content/homepage/imgs/homepage/bannertwoe.jpg'; linkurl[2] = ""; bigimg[3] = '/content/homepage/imgs/homepage/bannersam.jpg'; linkurl[3] = ""; //节日替换图(覆盖前值) //bigimg[0] = 'http://www.bangjianzhan.com/main/holidayres/newyear2014.jpg'; bigimg[2] = bigimg[0]; //bigimg[1] = 'http://www.bangjianzhan.com/main/holidayres/newyear2012.jpg'; bigimg[3] = bigimg[1]; var smallimg = new array(); //小图 smallimg[0] = '/content/homepage/imgs/homepage/cha1.gif'; smallimg[1] = '/content/homepage/imgs/homepage/cha2.gif'; smallimg[2] = '/content/homepage/imgs/homepage/cha3.gif'; smallimg[3] = '/content/homepage/imgs/homepage/cha4.gif'; //// var nn = 1; var key = 0; function change_img() { if (key == 0) { key = 1; } else if (document.all) { document.getelementbyid("v_pic").filters[0].apply(); document.getelementbyid("v_pic").filters[0].play(duration = 2); } document.getelementbyid("v_pic").src = bigimg[nn - 1]; if (linkurl[nn - 1] == "") { document.getelementbyid("v_url").style.cursor = "default"; } else { document.getelementbyid("v_url").href = linkurl[nn - 1]; document.getelementbyid("v_url").target = "_blank"; document.getelementbyid("v_url").style.cursor = "pointer"; } for (var i = 1; i <= counts; i++) { document.getelementbyid("xxjdjj" + i).classname = 'axx'; } document.getelementbyid("xxjdjj" + nn).classname = 'bxx'; nn++; if (nn > counts) { nn = 1; } tt = settimeout('change_img()', 5000); //延迟10秒。 } function changeimg(n) { nn = n; window.clearinterval(tt); change_img(); } function imageshow() { document.write('
'); change_img(); }