- <script LANGUAGE="javascript">
- <!--
- var cpAD=new Array();
- var cpADlink=new Array();
- var cpADmsg=new Array();
- //定义了5个数组
- var adNum=5;
- var coll=0;
- //ad/1.html 那时你链接的广告地址
- cpAD[0]="/banners/ad/1.gif";
- cpADlink[0]="http://count.chanet.com.cn/click.cgi?a=294504&d=131883&u=&e=";
- cpADmsg[0]="1";
- cpAD[1]="/banners/ad/2.gif";
- cpADlink[1]="http://count.chanet.com.cn/click.cgi?a=294504&d=18290&u=&e="
- cpADmsg[1]="2";
- cpAD[2]="/banners/ad/3.gif";
- cpADlink[2]="http://count.chanet.com.cn/click.cgi?a=294504&d=37894&u=&e=";
- cpADmsg[2]="3";
- var preloadedimages=new Array();
- for (i=1;i<cpAD.length;i++){
- preloadedimages[i]=new Image();
- preloadedimages[i].src=cpAD[i];
- }
- //跳转的URL地址
- function jump2url()
- {
- jumpUrl=cpADlink[adNum];
- jumpTarget='_blank';
- if (jumpUrl != '')
- {
- if (jumpTarget != '')
- window.open(jumpUrl,jumpTarget);
- else location.href=jumpUrl;
- }
- }
- //图片变化的函数
- function changeimg(n)
- {
- adNum=n;
- switch(adNum)
- {
- case 0:
- {
- window.img1.src="banners/1-2.gif";
- window.img2.src="banners/2.gif";
- window.img3.src="banners/3.gif";
- window.img4.src="banners/4.gif";
- window.img5.src="banners/5.gif";
- break;
- }
- case 1:
- {
- window.img1.src="banners/1.gif";
- window.img2.src="banners/2-2.gif";
- window.img3.src="banners/3.gif";
- window.img4.src="banners/4.gif";
- window.img5.src="banners/5.gif";
- break;
- }
- case 2:
- {
- window.img1.src="banners/1.gif";
- window.img2.src="banners/2.gif";
- window.img3.src="banners/3-2.gif";
- window.img4.src="banners/4.gif";
- window.img5.src="banners/5.gif";
- break;
- }
- case 3:
- {
- window.img1.src="banners/1.gif";
- window.img2.src="banners/2.gif";
- window.img3.src="banners/3.gif";
- window.img4.src="banners/4-2.gif";
- window.img5.src="banners/5.gif";
- break;
- }
- case 4:
- {
- window.img1.src="banners/1.gif";
- window.img2.src="banners/2.gif";
- window.img3.src="banners/3.gif";
- window.img4.src="banners/4.gif";
- window.img5.src="banners/5-2.gif";
- break;
- }
- }
- window.clearInterval(theTimer);
- adNum=adNum-1;
- nextAd();
- }
|