function nowarning()
{
  if (window.navigator.appName=="Microsoft Internet Explorer"&&(window.navigator.appVersion.indexOf("MSIE 6.0")!=-1||window.navigator.appVersion.indexOf("MSIE 5.0")!=-1))
  document.getElementById("nowarning").onclick=function()
  {
    document.getElementById("warning").style.display="none";
  }
}

function nav()
{
  document.getElementById("head").getElementsByTagName("li")[0].onmouseover=function()
  {
    document.getElementById("nav").style.display="block";
  }
  document.getElementById("nav").onmouseout=function()
  {
    document.getElementById("nav").style.display="none";
  }
}

var Fnum=1;Hei=300;x=0;sID=0;fID=0;y=0;  //需要根据图片而修改的部分
  function TimeControl()
  {
    y=document.getElementById("fn").getElementsByTagName("li").length-1;  
	sID=setInterval("scrollControl()",4000);
  }
  
  function scrollControl()
  {
    fID=setInterval("scroll()",10);
  }
  
  function scroll()
  {
    if (x==-Fnum*Hei)
	{
	  clearInterval(fID);
	  if (Fnum==y)
	    Fnum=0;
	  else
	    Fnum=Fnum+1;
	}
	else if (x>-Fnum*Hei)
	{
	  x=x-60;
	  for (var i=0;i<=y;i++)
	  {
	    document.getElementById("fn").getElementsByTagName("img")[i].style.left=x+"px";
	  }
    }
	else if (x<-Fnum*Hei)
	{
	  x=x+60;
	  for (var i=0;i<=y;i++)            
	  {
	    document.getElementById("fn").getElementsByTagName("img")[i].style.left=x+"px";
	  }
    }
  }
  
  function StopNMove()
  {
	for (var i=0;i<=y;i++)
	{
	  document.getElementById("fn").getElementsByTagName("img")[i].onmouseover=function ()
	  {
	    clearInterval(sID);
	  }
	  document.getElementById("fn").getElementsByTagName("img")[i].onmouseout=function ()
	  {
	    sID=setInterval("scrollControl()",4000);
	  }
	}
  }

window.onload=function()
{
  nowarning();
  nav();
  TimeControl();
  StopNMove();
}