var blogTitleCache=new Array();var blogDescCache=new Array();var blogDescTitleCache=new Array();var blogColumnIndex=0;var blogRowIndex=0;var blogTitle="";var blogWidgetId=0;var blogTimer=null;var totalBlogRecords=0;function launchBlogPanel(A){totalBlogRecords=0;document.getElementById("blogTitlePanel").style.visibility="hidden";showBlogPanel();blogWidgetId=A;document.getElementById("statusMessagePanel").innerHTML="";document.getElementById("statusMessagePanel").innerHTML="please wait...";showStatusPanel();getBlogInfo(A,blogRowIndex)}function updateBlogPanel(){if(blogActive==false){return }var C="";document.getElementById("blogTitlePanel").style.visibility="visible";document.getElementById("blogCat0").innerHTML=blogTitle;var A=0;for(var B=0;B<blogDescCache.length;B++){C+=(B==0?"":"<BR/>")+"<div style='color:MediumAquaMarine;overflow:hidden;padding-left:15px;' onclick='return false;'>"+blogDescTitleCache[B]+"</div>";C+="<div style='color:white;overflow:hidden;padding-left:15px;font-weight:normal;' onclick='return false;'>"+blogDescCache[B]+"</div>"}document.getElementById("blogsData").innerHTML='<div id="mycustomscroll" class="flexcroll" >'+C+"</div>";fleXenv.globalInit();fleXenv.initialized=false;document.getElementById("mycustomscroll").focus();window.document.getElementById("mycustomscroll").focus()}function getBlogInfo(B,A){var C="method=getBlogsInfo&serial="+serial+"&widgetId="+B+"&currIndex="+A;createAjaxRequest();if(ajaxRequest==null){return }ajaxRequest.onreadystatechange=function(){if(ajaxRequest.readyState==4){if(ajaxRequest.status==200){if(ajaxRequest.responseText=="recall"){getBlogInfo(B,A)}else{var E=ajaxRequest.responseText;if(E.length>0){try{hideStatusPanel();var F=E.split("-?#-");blogTitle=F[0];blogDescCache=F[1].split("-@#-");blogDescTitleCache=F[2].split("-@#-");totalBlogRecords=F[3];totalBlogRecords=(totalBlogRecords<=0?0:totalBlogRecords);updateBlogPanel()}catch(D){failedCondition();if(blogTimer){window.clearTimeout(blogTimer);blogTimer=null}blogTimer=window.setTimeout('getBlogInfo("'+B+'", "'+blogRowIndex+'");hideStatusPanel();',10*1000)}}else{failedCondition();if(blogTimer){window.clearTimeout(blogTimer);blogTimer=null}blogTimer=window.setTimeout('getBlogInfo("'+B+'", "'+blogRowIndex+'");hideStatusPanel();',10*1000)}}}else{if(ajaxRequest.status==500){failureInfo()}}}};ajaxRequest.open("POST","/TvHandler",true);ajaxRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");ajaxRequest.send(C);return false}function blogKeyHandler(A){switch(A){case rcLEFT:--blogRowIndex;blogRowIndex=(blogRowIndex<0?totalBlogRecords:blogRowIndex);hideStatusPanel();document.getElementById("statusMessagePanel").innerHTML="";document.getElementById("statusMessagePanel").innerHTML="please wait...";showStatusPanel();getBlogInfo(blogWidgetId,blogRowIndex);break;case rcRIGHT:hideStatusPanel();++blogRowIndex;blogRowIndex=(blogRowIndex>totalBlogRecords?0:blogRowIndex);document.getElementById("statusMessagePanel").innerHTML="";document.getElementById("statusMessagePanel").innerHTML="please wait...";showStatusPanel();getBlogInfo(blogWidgetId,blogRowIndex);break;case rcMENU:if(blogTimer){blogTimer=null;window.clearTimeout(blogTimer)}document.getElementById("blogTitlePanel").style.visibility="hidden";resetBlogPanel();showGoPanel();blogActive=false;showGuidePanel();break}}function resetBlogPanel(){document.getElementById("blogsData").innerHTML="";document.getElementById("blogCat0").innerHTML="";blogTitleCache=new Array();blogDescCache=new Array();blogDescTitleCache=new Array();blogColumnIndex=0;blogRowIndex=0}function failedCondition(){showStatusPanel();document.getElementById("statusMessagePanel").innerHTML="";document.getElementById("statusMessagePanel").innerHTML=records.key270+". <br>"+((companyName!=null&&companyPhoneNum!=null)?""+records.key271+" "+companyName+" "+records.key272+" "+companyPhoneNum+".":"")}function showBlogArraow(A){document.getElementById("moveBlog"+A).style.background="#fcf3b8"}function hideBlogArrow(A){document.getElementById("moveBlog"+A).style.background="none"}function moveBlogPage(A){if(A==1){blogKeyHandler(rcLEFT)}else{blogKeyHandler(rcRIGHT)}}function showBlog(B){var A="";A=(B==1?"#fcf3b8":"none");document.getElementById("blogHome").style.background=A}function escapeBlogPanel(){keyActionHandler(rcMENU)}function disableBlogInfo(){showStatusPanel();document.getElementById("statusMessagePanel").innerHTML="";document.getElementById("statusMessagePanel").innerHTML=records.key374}