var rollingBlend = (function(){function _class(id,len) { var _self = this; var precell, timer; var blendIdx = -1; this.delay = 5000; this.img = new Array(); this.link = new Array(); this.colorset = ['#ffffff','#000000']; this.mouseevent = "onclick"; this.mode = "auto"; this.href = ""; this.exec = function() { if (this.color) this.colorset[1] = this.color; this.len = this.img.length; this.navi(); this.blendAuto(); } this.add = function(img,link) { this.img[this.img.length] = img; this.link[this.link.length] = link; } this.navi = function() { var obj = document.getElementById(id); //obj.style.filter = "blendTrans(duration=1)"; obj.useMap = "#"; obj.onmouseover = _self.stop; obj.onmouseout = _self.start; this.href = obj.parentNode; var obj = document.getElementById(id + '_bar'); if (obj){ if (this.naviMode != "img"){ var sample = obj.childNodes[0]; if (sample.tagName!="IMG"){ this.colorset[0] = sample.style.background; for (var i=1;i=_self.len) blendIdx = 0; if (document.getElementById(id + '_bar')){ var cell = (_self.naviMode!="img") ? document.getElementById(id + '_bar').childNodes[blendIdx] : document.getElementById(id + '_bar').getElementsByTagName('img')[blendIdx]; } else var cell = ""; _self.chg(cell,blendIdx,1); if (_self.mode=="auto") timer = setTimeout(_self.blendAuto,_self.delay); } this.golink = function() { clearTimeout(timer); if (_self.link[blendIdx]){ if (_self.href.tagName=="A") _self.href.href = _self.link[blendIdx]; else location.href = _self.link[blendIdx]; } else _self.href.href = "#"; } this.nodeIndex = function(obj) { //var parent = obj.parentNode; var parent = document.getElementById(id + '_bar'); var div = (this.naviMode=="img") ? parent.getElementsByTagName('img') : parent.childNodes; for (var i=0;i