var totalads = 15;
var exchangetime = 4000;

theLink = new Array();
theLink[0] ="../member/membeindex.asp?intid=16721";
theLink[1] ="http://www.xzlszl.com";
theLink[2] ="http://www.gljxzl.com/ads/tslq/";
theLink[3] ="http://www.yatddj.cn";
theLink[4] ="../member/membeindex.asp?intid=13290";
theLink[5] ="http://www.gljxzl.com/member/membeindex.asp?intid=8526";
theLink[6] ="http://www.gljxzl.com/member/membeindex.asp?intid=6490";
theLink[7] ="http://www.gljxzl.com/ads/nmlslq/index.htm";
theLink[8] ="http://www.gljxzl.com/rent/xzgd/";
theLink[9] ="../ads/thlq/index.htm";
theLink[10] ="";
theLink[11] ="../ads/wxjx/";
theLink[12] ="../member/membeindex.asp?intid=22722";
theLink[13] ="../member/membeindex.asp?intid=22519";
theLink[14] ="http://www.gljxzl.com/member/membeindex.asp?intid=7542";
theLink[15] ="http://www.gljxzl.com/rent/xzgd/";

theSrc = new Array();
theSrc[0] = "../00zl/hblqzl.gif";
theSrc[1] = "../00zl/xzlsjx.gif";
theSrc[2] = "../00zl/taglj2c.gif";
theSrc[3] = "../00zl/yatddj.gif";
theSrc[4] = "../00zl/ljlq4c02.gif";
theSrc[5] = "../00zl/wtjx.gif"; 
theSrc[6] = "../00zl/crfeb1.gif";
theSrc[7] = "../00zl/nmls.gif";
theSrc[8] = "../00zl/xzgdjx.gif";
theSrc[9] = "../00zl/sdthlq.gif";
theSrc[10] = "../00zl/xzwxjx.gif";
theSrc[12] = "../00zl/lyzy.gif";
theSrc[13] = "../00zl/xzxqzl.gif";
theSrc[14] = "../00zl/hzky01.gif";
theSrc[15] = "../00zl/xzgdjx.gif";

theType = new Array();
theType[0] = 2;
theType[1] = 2;
theType[2] = 2;
theType[3] = 2;
theType[4] = 2;
theType[5] = 2;
theType[6] = 2;
theType[7] = 2;
theType[8] = 2;
theType[9] = 2;
theType[10] = 2;
theType[11] = 2;
theType[12] = 2;
theType[13] = 2;
theType[14] = 2;
theType[15] = 2;
 
theRatio = new Array();
theRatio[0] = 1;
theRatio[1] = 1;
theRatio[2] = 1;
theRatio[3] = 1;
theRatio[4] = 1;
theRatio[5] = 1;
theRatio[6] = 1;
theRatio[7] = 1;
theRatio[8] = 1;
theRatio[9] = 1;
theRatio[10] = 1;
theRatio[11] = 1;
theRatio[12] = 1;
theRatio[13] = 1;
theRatio[14] = 1;
theRatio[15] = 1;


 
totalRatio = new Array();
totalRatio[-1] = 0
 
for(var i=0;i<=totalads-1;i++)
{
  totalRatio[i] = totalRatio[i-1] + theRatio[i];
}
 
var num = Math.floor(Math.random() * totalRatio[totalads -1]);
i=0;

 
while(totalRatio[i] <= num) {i++;}
link = i;
num = i;

 
function change ()
{
  link = num;
  document.adimg.src=theSrc[link];
  num++;
  if (num >= totalads) {num = 0}
  setTimeout('change()',exchangetime * theRatio[link]);
}
 
function gogo ()
{
  if (theType[link] == 1)
  {parent.main.location=theLink[link]}
  else
  {
   window.open(theLink[link],'','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes');
  }
}
 
setTimeout('change()',exchangetime * theRatio[link]);
document.write('<a style=cursor:hand onClick=gogo()><img name=adimg src=' + theSrc[link] + '></a>');
