function $(e){return document.querySelectorAll(e)}var docHeight,docWidth,contentWidth,contentLeft,contentTop,headerHeight,footerHeight,contentHeight,$newsList,news_size,col_width,shown_size,tabStartIndexes,contentObj=document.getElementById("content"),headerObj=document.getElementById("header"),footerObj=document.getElementById("footer"),wrapperObj=document.getElementById("wrapper"),isVerticalSlide=!1,activeEl_firstIndex=0,activeEl_lastIndex=0,col_height=128,startingSize=$("#content li").length,titles=$("header li"),i=0;function setContentSize(){docHeight=window.innerHeight||html.clientHeight||body.clientHeight||screen.availHeight,docWidth=window.innerWidth||html.clientWidth||body.clientWidth||screen.availWidth,headerHeight=headerObj.offsetHeight||headerObj.clientHeight,wrapperObj.style.height=docHeight<200?"200px":docHeight+"px";wrapperObj.offsetHeight||wrapperObj.clientHeight;var e=getComputedStyle(document.getElementById("content_cont"),null);docHeight<=90?(headerObj.style.display="none",null==document.getElementById("content_cont").classList?(document.getElementById("content_cont").className+=" no-top-padding",footerObj.className+=" small"):(document.getElementById("content_cont").classList.add("no-top-padding"),footerObj.classList.add("small")),footerHeight=footerObj.offsetHeight||footerObj.clientHeight,contentObj.style.height=docHeight-footerHeight-parseFloat(e.getPropertyValue("padding-bottom"))+"px"):docHeight<=149?(null==document.getElementById("content_cont").classList?(document.getElementById("content_cont").className+=" no-titles",footerObj.className=footerObj.className.replace("small","")):(document.getElementById("content_cont").classList.add("no-titles"),footerObj.classList.remove("small")),footerHeight=footerObj.offsetHeight||footerObj.clientHeight,contentObj.style.height=docHeight-headerHeight-footerHeight-parseFloat(e.getPropertyValue("padding-top"))-parseFloat(e.getPropertyValue("padding-bottom"))+"px"):docHeight<=174?(null==document.getElementById("content_cont").classList?(document.getElementById("content_cont").className+=" one-title",footerObj.className=footerObj.className.replace("small","")):(document.getElementById("content_cont").classList.add("one-title"),footerObj.classList.remove("small")),footerHeight=footerObj.offsetHeight||footerObj.clientHeight,contentObj.style.height=docHeight-headerHeight-footerHeight-parseFloat(e.getPropertyValue("padding-top"))-parseFloat(e.getPropertyValue("padding-bottom"))+"px"):(headerObj.style.display="block",null==document.getElementById("content_cont").classList?(document.getElementById("content_cont").className=document.getElementById("content_cont").className.replace("no-top-padding","").replace("no-titles",""),footerObj.className=footerObj.className.replace("small","")):(document.getElementById("content_cont").classList.remove("no-top-padding"),document.getElementById("content_cont").classList.remove("no-titles"),footerObj.classList.remove("small")),footerHeight=footerObj.offsetHeight||footerObj.clientHeight,contentObj.style.height=docHeight-headerHeight-footerHeight-parseFloat(e.getPropertyValue("padding-top"))-parseFloat(e.getPropertyValue("padding-bottom"))+"px"),contentWidth=contentObj.clientWidth,contentHeight=contentObj.clientHeight,contentLeft=contentObj.getBoundingClientRect().left,contentTop=contentObj.getBoundingClientRect().top;var t=titles[0].offsetWidth||titles[0].clientWidth;if(null!=document.styleSheets[0].addRule?document.styleSheets[0].addRule("#header ul li::after","left: "+Math.floor((t-20)/2)+"px"):(document.styleSheets[0].deleteRule(0),document.styleSheets[0].insertRule("#header ul li::after{left: "+Math.floor((t-20)/2)+"px}",0)),isVerticalSlide?(document.getElementById("left_arrow").style.display="none",document.getElementById("right_arrow").style.display="none",document.getElementById("up_arrow").style.top=headerHeight+"px",document.getElementById("up_arrow").style.left=Math.floor((docWidth-40)/2)+"px",document.getElementById("down_arrow").style.bottom=footerHeight+"px",document.getElementById("down_arrow").style.left=Math.floor((docWidth-40)/2)+"px"):(document.getElementById("up_arrow").style.display="none",document.getElementById("down_arrow").style.display="none",document.getElementById("left_arrow").style.top=Math.floor((docHeight-40)/2)+"px",document.getElementById("right_arrow").style.top=Math.floor((docHeight-40)/2)+"px"),isVerticalSlide?(shown_size=Math.floor(contentHeight/col_height),col_width=contentWidth,null==document.getElementById("content").classList?document.getElementById("content").className=document.getElementById("content").className.replace("col-33","").replace("col-50",""):(document.getElementById("content").classList.remove("col-50"),document.getElementById("content").classList.remove("col-33")),contentObj.style.height=col_height*shown_size+"px",contentObj.style.marginBottom=contentHeight-col_height*shown_size+"px"):docWidth>=750?(col_width=contentWidth/3,shown_size=3,null==document.getElementById("content").classList?(document.getElementById("content").className=document.getElementById("content").className.replace("col-50",""),document.getElementById("content").className+=" col-33"):(document.getElementById("content").classList.remove("col-50"),document.getElementById("content").classList.add("col-33"))):docWidth>=500?(col_width=contentWidth/2,shown_size=2,null==document.getElementById("content").classList?(document.getElementById("content").className+=" col-50",document.getElementById("content").className=document.getElementById("content").className.replace("col-33","")):(document.getElementById("content").classList.add("col-50"),document.getElementById("content").classList.remove("col-33"))):(col_width=contentWidth,shown_size=1,null==document.getElementById("content").classList?document.getElementById("content").className=document.getElementById("content").className.replace("col-33","").replace("col-50",""):(document.getElementById("content").classList.remove("col-50"),document.getElementById("content").classList.remove("col-33"))),Array.prototype.forEach.call($(".empty-item"),function(e){e.parentNode.removeChild(e)}),Array.prototype.forEach.call(titles,function(e){if(0!=$(".list-"+e.className+" li").length)for(n=0;n<$(".list-"+e.className+" li").length%shown_size;n++)$(".list-"+e.className)[0].insertAdjacentHTML("beforeend",'
  • ')}),$newsList=$("#content li"),news_size=$newsList.length,tabStartIndexes=new Array,0==news_size&&(document.getElementById("no_item_cont").style.display="block",document.getElementById("navigation").style.display="none"),isVerticalSlide)for(var n=0;n=activeIndexes[n].lastTop?activeIndexes[n].curTop=activeIndexes[n].lastTop:activeIndexes[n].curTop+=innerSlide_amount,$newsList[parseInt(n)].style.top=activeIndexes[n].curTop+"px";for(var n in nextIndexes)nextIndexes[n].curTop+innerSlide_amount>=nextIndexes[n].lastTop?(t=!0,nextIndexes[n].curTop=nextIndexes[n].lastTop):nextIndexes[n].curTop+=innerSlide_amount,null==activeIndexes[n]?$newsList[parseInt(n)].style.top=nextIndexes[n].curTop+"px":activeIndexes[n].curTop>=contentTop+contentHeight&&delete activeIndexes[n]}else{for(var n in activeIndexes)activeIndexes[n].curLeft+innerSlide_amount>=activeIndexes[n].lastLeft?activeIndexes[n].curLeft=activeIndexes[n].lastLeft:activeIndexes[n].curLeft+=innerSlide_amount,$newsList[parseInt(n)].style.left=activeIndexes[n].curLeft+"px";for(var n in nextIndexes)nextIndexes[n].curLeft+innerSlide_amount>=nextIndexes[n].lastLeft?(t=!0,nextIndexes[n].curLeft=nextIndexes[n].lastLeft):nextIndexes[n].curLeft+=innerSlide_amount,null==activeIndexes[n]?$newsList[parseInt(n)].style.left=nextIndexes[n].curLeft+"px":activeIndexes[n].curLeft>=contentLeft+contentWidth&&delete activeIndexes[n]}if(t){clearInterval(slide_intervalObj),activeIndexes=new Array;var s=new Array;if(isVerticalSlide){for(var n in nextIndexes)s.push({ind:n,curTop:nextIndexes[n].curTop});for(n=s.length-1;n>=0;n--)activeIndexes[s[n].ind]={curTop:s[n].curTop}}else{for(var n in nextIndexes)s.push({ind:n,curLeft:nextIndexes[n].curLeft});for(n=s.length-1;n>=0;n--)activeIndexes[s[n].ind]={curLeft:s[n].curLeft}}for(n in activeEl_firstIndex=null,activeIndexes)null==activeEl_firstIndex&&(activeEl_firstIndex=n),activeEl_lastIndex=n;var i="";for(n in activeIndexes)-1==$newsList[parseInt(n)].className.indexOf("empty-item")&&(""!=i&&(i+=" - "),i+=$newsList[parseInt(n)].getAttribute("data-realindex"));document.getElementById("count_index").innerHTML=i,setActiveHeaders(),e&&slide_autoPlay()}},innerSlide_animTime)}function setActiveHeaders(){if(null==titles[0].classList){for(var e=0;e