<SCRIPT language=javascript type=text/javascript>


//Ê×Ò³ÂÖ²¥Ð§¹û
function moduleRotatingShow(_themeId){
 this.emId  = _themeId + "_focusImg";
 var conList  = [
 {imgUrl:img1,lingUrl:Link1,title:text1} ,
 {imgUrl:img2,lingUrl:Link2,title:text2} ,
 {imgUrl:img3,lingUrl:Link3,title:text3} £¬
{imgUrl:img4,lingUrl:Link4,title:text4} £¬
{imgUrl:img5,lingUrl:Link5,title:text3} 

 ];
 var local  = conList.length-1;
 var obj   = {
  showImg  : jQuery("#"+this.emId+" img"),
  showNav  : jQuery("#"+this.emId+" h2 i"),
  showLink : jQuery("#"+this.emId+" h2 a")
 };
 var timer   = null; 
 
 function funPlay(){
  clearInterval(timer);
  timer = setInterval(funGo,5000);
 };
 
 function funPause(){
  clearInterval(timer);
 };
 
 function funGo(){
  funShow(local);
  
  var img = new Image();
  img.src = conList[funNextLocal(local)].imgUrl;
  
  if (img.complete) {
   local = funNextLocal(local);
   return;
  }
  img.onload = function () {
   local = funNextLocal(local);  
  };
  
 };
 
 this.inits    = function(){
  funShow(local);
  local = funNextLocal(local);
  funPlay();
  
  obj.showNav.each(function(i){
   jQuery(this).bind("mouseover",function(){
    funPause();
    funShow(i);
    funPlay();
   })        
  })
  
 }
 function funNextLocal(_local){
  var index = _local;
  index  -= 1;
  if( index < 0 ) index = conList.length-1;
  return index;
 }
 
 function funShow(_local){
  with(obj){
   showImg.attr("src",conList[_local].imgUrl);
   showLink.html(conList[_local].title);
   showLink.attr("href",conList[_local].lingUrl);
   showImg.parent().attr("href",conList[_local].lingUrl);
   showNav.removeClass("cur");
   jQuery(obj.showNav[_local]).addClass("cur");
  }
 };
}
</SCRIPT>