if(!window.ccs){window.ccs={};} ccs.SchedulePanel=function(pageId,forTime,sectionDirName){var self;var timers;var pageId;var forTime;var servletName;var sectionDirName;function constructorFn(pageId,forTime,sectionDirName){self=this;self.timers=new Object();self.pageId=pageId;self.forTime=forTime;self.servletName=servletName;self.sectionDirName=sectionDirName;Event.observe(window,'load',function(){$$('div.ccs_schedule_panel').each(function(div){ccs.schedulePanel.getContent(div.attributes['clipid'].value,div.attributes['layout_area_id'].value);});});} constructorFn.prototype.getContent=function(clipId,layoutAreaId){var url=ccs.contextPath+"/scheduled/"+ccs.appName+"/"+ccs.languageCode+"/page"+self.pageId+"?layout_area_id="+layoutAreaId+"§ionDirName="+self.sectionDirName+"&clipid="+clipId+forTime;new Ajax.Request(url,{method:'get',onSuccess:function(transport){var response=transport.responseText||"no response text";$("c"+self.pageId+"_"+clipId).innerHTML=response;$("c"+self.pageId+"_"+clipId).innerHTML.evalScripts();var nextTimeMillis=$(self.pageId+'_'+clipId).innerHTML*1;var rndSeconds=Math.round(Math.random()*100)*1000;nextTimeMillis+=rndSeconds;self.timers[self.pageId+'_'+clipId]=setTimeout(function(){self.getContent(clipId)},nextTimeMillis);},onFailure:function(){}});} return new constructorFn(pageId,forTime,sectionDirName);}