var OldNum=new Array();OldNum[0]=0;OldNum[1]=0;OldNum[2]=829; function LoadUpdate(){ var sUp=parseInt($Obj('s1').innerHTML); var sDown=parseInt($Obj("s2").innerHTML); var sTotal=sUp+sDown; if(sTotal>0){ var spUp=(sUp/sTotal)*100; spUp=Math.round(spUp*10)/10; var spDown=100-spUp; spDown=Math.round(spDown*10)/10; $Obj('sp1').innerHTML=spUp+'%'; $Obj('sp2').innerHTML=spDown+'%'; $Obj('eimg1').style.width = parseInt((sUp/sTotal)*55)+'px'; $Obj('eimg2').style.width = parseInt((sDown/sTotal)*55)+'px'; } } function LoadRes(){ $Obj('s1').innerHTML=parseInt(OldNum[0]); $Obj('s2').innerHTML=parseInt(OldNum[1]); $Obj('ClickNum').innerHTML=parseInt(OldNum[2]); LoadUpdate(); } LoadRes();