/************************************/
rnd.today=new Date(); 

    rnd.seed=rnd.today.getTime(); 

    function rnd() { 

　　　　rnd.seed = (rnd.seed*9301+49297) % 233280; 

　　　　return rnd.seed/(233280.0); 

    }; 

    function rand(number) { 

　　　　return Math.ceil(rnd()*number); 

    }; 

/************************************/

isns = navigator.appName == "Netscape";

function ztstr(id,picurl,linkurl,title,alt)
{	this.id=id;
	this.picurl=picurl;
	this.linkurl=linkurl;
	this.title = title;
	this.alt = alt;
	
}

	
	imgcount=1;
	//延晒撞楕
	frequency=6*1000;
	zhuanti=new Array();
	
function startPicShow()
{
	imgcount=zhuanti.length-1;
	for(i=1;i<=imgcount;i++)
	{
		eval("img"+i+"=new Image()")
		eval("img"+i+".src=zhuanti["+i+"].picurl")
		eval("img"+i+".alt=zhuanti["+i+"].alt")
	}

	swapPic();
}

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();
}

function change_img()
{
	//idLogo.className = "filter1";
	//idLogo.filters[0].Apply();
	//idLogo.filters.revealTrans.transition=23;
	//idLogo.filters.revealTrans.duration=1;
	//idLogo.src = imgsrc;
	//idLogo.filters[0].Play();
	
	document.ImagePart1_img.style.filter = 'revealtrans(duration=2.0,transition='+Math.floor(Math.random()*24)+')';
	eval('document.ImagePart1_img.src=img'+nn+'.src');
	eval('document.ImagePart1_img.alt=img'+nn+'.alt');
	eval('document.getElementById("ImagePart1_lblTitle").innerText=zhuanti['+nn+'].title');
	nn++;
	if(nn>imgcount) nn=1
	if(!isns)
	{
		document.ImagePart1_img.filters.item(0).apply();
		document.ImagePart1_img.style.visibility='visible';
		document.ImagePart1_img.filters.item(0).play();
		//document.getElementById("ImagePart1_lblTitle").style.visibility='visible';

		//setTimeout("document.ImagePart1_img.style.visibility='hidden';",frequency);
		

	}
	else
	{
		document.ImagePart1_img.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()',1500)
}
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()
}
}
