function randomStr(str)//产生随机图片。
{
	var showId=Math.floor(Math.random()*str.length);
	var tempStr=str[showId];
	
	str[showId]=str[0];
	str[0]=tempStr;
	
}

function showStr(str,textWidth,num)
{
	if(!document.ns){document.write(str[0]+'<br>')}
	else{
		document.write('<table border=0 cellspacing=0 cellpadding=0>'
		+'<tr><td>'
		+'<div id="icefable1'+num+'">'
		+'<table width='+textWidth+' border=0 cellspacing=0 cellpadding=0>');
		for(i=0;i<str.length;i++)
		{
			document.write('<tr><td height='+marqueesHeight+'>'+str[i]+'</td></tr>');
		}

		document.write('</table>'
		+'</div>'
		+'<div id="icefable2'+num+'" style="position:absolute;z-index:1;visibility:hidden;width:400px;"></div>'
		+'</td></tr>'
		+'</table>');
	}
}

function init_srolltext(num)
{
	countnum=0
	eval('stopscroll'+num+'=false;')
	eval('icefable1'+num+'.scrollTop=0;')
	rotatenum=0
	//eval('icefable1'+num+'.style.width=0;')
	eval('icefable1'+num+'.style.height=marqueesHeight;')
	eval('icefable1'+num+'.style.overflowX="visible";')
	eval('icefable1'+num+'.style.overflowY="hidden";')
	eval('icefable1'+num+'.noWrap=true;')
	eval('icefable1'+num+'.onmouseover=new Function("stopscroll=true");')
	eval('icefable1'+num+'.onmouseout=new Function("stopscroll=false");')
	eval('preTop'+num+'=0; ')
	eval('currentTop'+num+'='+marqueesHeight+';')
	eval('stoptime'+num+'=0;')
	eval('icefable2'+num+'.innerHTML="";')
	eval('icefable2'+num+'.innerHTML+=icefable1'+num+'.innerHTML;')
	eval('icefable1'+num+'.innerHTML=icefable2'+num+'.innerHTML+icefable2'+num+'.innerHTML;')  
	eval('setInterval("scrollUp'+num+'()",4);') 
}

function scrollUp1()
{
  if(stopscroll1==true) return;
  currentTop1+=1;
  if(currentTop1==marqueesHeight+1)//当前行在第二个数组开始时,停止向上滚动。
 {
  	stoptime1+=1;
  	currentTop1-=1;
  	if(stoptime1==marqueesHeight*strArray1.length)//停止条件。
	{
  		currentTop1=0;
  		stoptime1=0;	
	}
  }
 
 else
 {
	  preTop1=icefable11.scrollTop;
	  icefable11.scrollTop+=1;//不停向上滚动。
	  if(icefable11.scrollTop==marqueesHeight*strArray1.length)//达到最多图片数
	  {
	    preTop1=0; currentTop1=marqueesHeight; stoptime1=0;icefable11.scrollTop=0;
	  }
  }
}