var rssParam={param1:{checkCount:0,checkCountMax:60,loadTime:1000,postUrl:"/ajax/voice/usertop/rssroleone",updateAreaId:"",updateDivIdHead:"favorite_",MESS_UPG_RSS_LOADING:"favorite RSS loading...",MESS_UPG_RSS_COMPLETE:"favorite RSS load complete.",MESS_UPG_RSS_UNLOAD:"favorite RSS is unloaded.",totalCount:0,getCount:0,arr:new Array(),colNum:0,rssKbn:0},param2:{checkCount:0,checkCountMax:60,loadTime:1000,postUrl:"/ajax/voice/rssroleone",updateAreaId:"",updateDivIdHead:"favorite_",MESS_UPG_RSS_LOADING:"favorite RSS loading...",MESS_UPG_RSS_COMPLETE:"favorite RSS load complete.",MESS_UPG_RSS_UNLOAD:"favorite RSS is unloaded.",totalCount:0,getCount:0,arr:new Array(),colNum:0,rssKbn:0}};var rssUpdateTimer;var getRssList=Class.create();getRssList.prototype={initialize:function(){var a=document.URL;if(a.indexOf("iza.ne.jp/favorite/")!=-1){this.param=rssParam.param2;this.pageType="favorite";}else{if(a.indexOf("iza.ne.jp/")!=-1){this.param=rssParam.param1;this.pageType="top";}}},update:function(){if(!this.param){return false;}if(arguments.length==2){if(arguments[1]&&arguments[1]!=""){this.param.arr=arguments[1];this.param.totalCount=this.param.arr.length;}this.param.colNum=arguments[0];}else{if(arguments.length==3){if(arguments[2]&&arguments[2]!=""){this.param.arr=arguments[2];this.param.totalCount=this.param.arr.length;}this.param.rssKbn=arguments[0];this.param.colNum=arguments[1];}else{return false;}}clearInterval(rssUpdateTimer);window.status=this.param.MESS_PPL_RSS_LOADING;rssUpdateTimer=setInterval("rssList.loadingCheck()",this.param.loadTime);var a={};if(this.param.colNum){a.colNum=this.param.colNum;}if(this.param.arr){a.rssSeq=this.param.arr[this.param.getCount];}if(this.param.rssKbn){a.rssKbn=this.param.rssKbn;}new Ajax.Request(this.param.postUrl,{method:"post",postBody:$H(a).toQueryString(),onComplete:this.completeHandler});},completeHandler:function(a){var b=a.responseText.match(/<!--RSS=([0-9]+)-->/);var f=RegExp.$1;var e=a.responseText.match(/<!--STATE=([A-Z]+)-->/);var c=RegExp.$1;rssList.param.getCount++;if(rssList.param.checkCount>rssList.param.checkCountMax){clearInterval(rssUpdateTimer);window.status=rssList.param.MESS_UPG_RSS_UNLOAD;}else{window.status=rssList.param.MESS_UPG_RSS_COMPLETE;$(rssList.param.updateDivIdHead+f).innerHTML=a.responseText;if(c=="MISS"){var d=$(rssList.param.updateDivIdHead+f);d.parentNode.removeChild(d);}}if(rssList.param.getCount>=rssList.param.totalCount){clearInterval(rssUpdateTimer);}else{if(rssList.pageType=="top"){rssList.update(rssList.param.colNum,"");}else{if(rssList.pageType=="favorite"){rssList.update(rssList.param.rssKbn,rssList.param.colNum,"");}}}},deleteHandler:function(a){clearInterval(rssUpdateTimer);},moveHandler:function(a){clearInterval(rssUpdateTimer);},editHandler:function(a){clearInterval(rssUpdateTimer);},loadingCheck:function(){this.param.checkCount++;if(this.param.checkCount>this.param.checkCountMax){clearInterval(rssUpdateTimer);window.status=this.param.MESS_UPG_RSS_UNLOAD;}}};var rssList=new getRssList();
