function newwin(x){
	OnClick=window.open("player.php?volume_id="+x,"player","toolbar=0,width=386,height=364,top=5,left=5");
}
function defaul_homepage()
{this.homepage.style.behavior='url(#default#homepage)';this.homepage.setHomePage('http://www.wangfan.com/');}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

isns = navigator.appName == "Netscape";
function ztstr(id,picurl,linkurl)
{
	this.id=id
	this.picurl=picurl
	this.linkurl=linkurl
}

zhuanti=new Array()
imgcount=1;
frequency=4*1000;//4秒，这里指的是两张图片的间隔时间

zhuanti[1]=new ztstr('1','images/image1.jpg','#')
zhuanti[2]=new ztstr('2','images/image2.jpg','#')
zhuanti[3]=new ztstr('3','images/image3.jpg','#')
zhuanti[4]=new ztstr('4','images/image4.jpg','#')
zhuanti[5]=new ztstr('5','images/image5.jpg','#')
zhuanti[6]=new ztstr('6','images/image6.jpg','#')


imgcount=zhuanti.length-1
for(i=1;i<=imgcount;i++)
{
	eval("img"+i+"=new Image()")
	eval("img"+i+".src=zhuanti["+i+"].picurl")
}
	
nn=1

var rand1 = 0;
var useRand = 0;

function swapPic() {
	var imgnum = zhuanti.length - 1;
	do {
		var randnum = Math.random();
		rand1 = Math.round((imgnum - 1) * randnum) + 1;
	} while (rand1 == useRand);
	useRand = rand1;
//	alert(useRand);
	nn=useRand;
	change_img();
//	pagestart();
}


function change_img()
{
	eval('document.pic.src=img'+nn+'.src');
	nn++;
	if(nn>imgcount) nn=1
	if(!isns)
	{
		pic.filters.item(0).apply()
		pic.style.visibility='visible'
		pic.filters.item(0).play()
		setTimeout("pic.style.visibility='hidden'",frequency);
	}
	else
	document.pic.visibility='visible'
	tt=setTimeout('change_img()',frequency)
}

function pictarget()
{
	tt=nn-1
	if(tt<1) tt=imgcount
	cururl=zhuanti[tt].linkurl
	window.open(cururl);
}
function ini()
{
if(!isns)
{
spacewidth=Math.round((divmask.offsetWidth-770)/2)
	dmwidth=770+spacewidth
	dmheight=divmask.offsetHeight
	totalstep=50
	timeout=50
	dmstepw=Math.round(770/totalstep)
	dmsteph=Math.round(dmheight/totalstep)
	setTimeout('hidimg()',3000)
}
else swapPic()
}

function hidimg()
{
dmwidth-=dmstepw
dmheight-=dmsteph
eval('divmask.style.clip="rect(0,'+dmwidth+','+dmheight+',0)"')
hdrun=setTimeout('hidimg()',timeout)
if(dmwidth<=spacewidth&&dmheight<=0)
{
	divmask.style.visibility='hidden'
	clearTimeout(hdrun)
	swapPic()
}
}

