// JavaScript Document onclick 点击 function mainfun(mainObj,t){ function $(id){return document.getElementById(id)} function getTag(tag,obj){return (typeof obj=='object'?obj:$(obj)).getElementsByTagName(tag); } function alph(obj,n){if(document.all){obj.style.filter="alpha(opacity="+n+")";}} var cut = 0; var timer=''; var num = getTag('li',getTag('div',$(mainObj))[0]).length; var getpic = getTag('li',getTag('div',$(mainObj))[0]); var getbtn = getTag('li',getTag('div',$(mainObj))[1]); var gettext = getTag('li',getTag('div',$(mainObj))[2]); for(i=0;i=num-1){cut=0}else{cut++} changePic(cut); } timer = setInterval(autoPlay,t); } function changeMenu(){ function $(id){return document.getElementById(id)} function getTag(tag,obj){return (typeof obj=='object'?obj:$(obj)).getElementsByTagName(tag); } var sel=0;var menu = $("menu");var getBtn = getTag("h2",menu); var getUl = getTag("ul",menu);var num = getTag("h2",menu).length;for(i=0;i