function $a(id) { return document.getelementbyid(id); } function addloadevent(func){ var oldonload = window.onload; if (typeof window.onload != 'function') { window.onload = func; } else { window.onload = function(){ oldonload(); func(); } } } function moveelement(elementid,final_x,final_y,interval) { if (!document.getelementbyid) return false; if (!document.getelementbyid(elementid)) return false; var elem = document.getelementbyid(elementid); if (elem.movement) { cleartimeout(elem.movement); } if (!elem.style.left) { elem.style.left = "0px"; } if (!elem.style.top) { elem.style.top = "0px"; } var xpos = parseint(elem.style.left); var ypos = parseint(elem.style.top); if (xpos == final_x && ypos == final_y) { return true; } if (xpos < final_x) { var dist = math.ceil((final_x - xpos)/10); xpos = xpos + dist; } if (xpos > final_x) { var dist = math.ceil((xpos - final_x)/10); xpos = xpos - dist; } if (ypos < final_y) { var dist = math.ceil((final_y - ypos)/10); ypos = ypos + dist; } if (ypos > final_y) { var dist = math.ceil((ypos - final_y)/10); ypos = ypos - dist; } elem.style.left = xpos + "px"; elem.style.top = ypos + "px"; var repeat = "moveelement('"+elementid+"',"+final_x+","+final_y+","+interval+")"; elem.movement = settimeout(repeat,interval); } function classnormal(ifocusbtnid,ifocustxid){ var ifocusbtns= $a(ifocusbtnid).getelementsbytagname('li'); var ifocustxs = $a(ifocustxid).getelementsbytagname('li'); for(var i=0; i=2) { ifocusbtns[1].onmouseover = function() { moveelement('ifocus_piclist',0,-245,5); classnormal('ifocus_btn','ifocus_tx'); classcurrent('ifocus_btn','ifocus_tx',1); } } if (listlength>=3) { ifocusbtns[2].onmouseover = function() { moveelement('ifocus_piclist',0,-490,5); classnormal('ifocus_btn','ifocus_tx'); classcurrent('ifocus_btn','ifocus_tx',2); } } if (listlength>=4) { ifocusbtns[3].onmouseover = function() { moveelement('ifocus_piclist',0,-735,5); classnormal('ifocus_btn','ifocus_tx'); classcurrent('ifocus_btn','ifocus_tx',3); } } } setinterval('autoifocus()',5000); var atuokey = false; function autoifocus() { if(!$a('ifocus')) return false; if(atuokey) return false; var focusbtnlist = $a('ifocus_btn').getelementsbytagname('li'); var listlength = focusbtnlist.length; for(var i=0; i