var NowImg = 0;
var bStart;
var Nowshow;
function fnToggle() 
{
	try
	{
		oTransContainer.filters[0].Apply();	
		oTransContainer.filters[0].Play(duration=2); 
		if(NowImg==list.length) 
		{
		   document.getElementById("p"+(list.length-1)).className='';
		   Nowshow=1;
		   NowImg = 0;
		   document.images['oDIV1'].src =list[NowImg].split(',')[1]+"";
		   document.getElementById("people").innerHTML="<a href='"+list[NowImg].split(',')[2]+"'>"+list[NowImg].split(',')[0]+"</a>";		
		   document.getElementById("people").title=list[NowImg].split(',')[0];
		   document.getElementById("titleUrl").href=list[NowImg].split(',')[2];
		 
		}else
		{			
		   document.images['oDIV1'].src =list[NowImg].split(',')[1]+"";
		   document.getElementById("people").innerHTML="<a href='"+list[NowImg].split(',')[2]+"'>"+list[NowImg].split(',')[0]+"</a>";		
		   document.getElementById("people").title=list[NowImg].split(',')[0];
		   document.getElementById("titleUrl").href=list[NowImg].split(',')[2];
		   Nowshow=NowImg+1;
		   if(Nowshow>1)
		   {
			   document.getElementById("p"+(Nowshow-1)).className='';
		   }
		   NowImg++;
		}
		document.getElementById("p"+Nowshow).className='showNowPage';
		bStart=setTimeout('fnToggle()', 3000);
	}
	catch(e)
	{
	}
}
function getPageCount()
{
	//
	var count=list.length;
	if(count>10)
	  count=10;
	for(i=1;i<=count;i++)
	{//<li style='list-style:none;color:red;'>
	   document.getElementById("nav").innerHTML+="<a href='javascript:toggleTo("+i+")' id='p"+i+"' target='_self'>"+i+"</a>";
	}	
}
function toggleTo(img)
{
	try
	{
	 document.images['oDIV1'].src =list[img-1].split(',')[1]+"";
	 document.getElementById("people").innerHTML="<a href='"+list[NowImg].split(',')[2]+"'>"+list[img-1].split(',')[0]+"</a>";		
	 document.getElementById("titleUrl").href=list[img-1].split(',')[2];
	 NowImg=img-1;
	}catch(e)
	{
		}
}
