var tabIds = [{ID:'myTab0',CountI:0}];
var tabStrs = '',tabFunc='';

function nTabs(thisObj,Num){ 
if(thisObj.className == "active")return; 
var tabObj = thisObj.parentNode.id;
for(var m=0;m<tabIds.length;m++)
{
    if(tabIds[m].ID==tabObj){
        tabIds[m].CountI=Num;
    }
}

var tabList = document.getElementById(tabObj).getElementsByTagName("li"); 
for(i=0; i <tabList.length; i++) 
{ 
  if (i == Num) 
  { 
   thisObj.className = "active"; 
      document.getElementById(tabObj+"_Content"+i).style.display = "block"; 
  }else{ 
   tabList[i].className = "normal"; 
   document.getElementById(tabObj+"_Content"+i).style.display = "none"; 
  } 
} 
}


for(var j=0;j<tabIds.length;j++){
	tabStrs += 'function RollTab' + j + '(){var tabList = document.getElementById("' + tabIds[j].ID + '").getElementsByTagName("li");nTabs(tabList[tabIds[' + j + '].CountI],tabIds[' + j + '].CountI);setTimeout("RollTab' + j + '();",8000);if(tabIds[' + j + '].CountI==tabList.length-1){ tabIds[' + j + '].CountI=0; }else{ tabIds[' + j + '].CountI++;}};'
	tabFunc += 'RollTab' + j + '();';
}

eval(tabStrs);

$(document).ready(function(){
eval(tabFunc);
});
