function getDocHeight(){var n=document;return Math.max(n.body.scrollHeight,n.documentElement.scrollHeight,n.body.offsetHeight,n.documentElement.offsetHeight,n.body.clientHeight,n.documentElement.clientHeight)}function validateEmail(n){return/^[A-Z0-9._%+-]+@([A-Z0-9-]+\.)+[A-Z]{2,4}$/i.test(n)?!0:!1}function likenews(){Cookies.get("likenews"+$("#objectid").val())!=="y"?($.post("/LikeAction/"+$("#objectid").val()+"/0",""),Cookies.set("likenews"+$("#objectid").val(),"y",{expires:1e4}),$("#likednum").text(parseInt($("#likednum").text())+1),$("#likednum2").text($("#likednum").text())):alert("Bạn đã thích bài viết này!")}function likevideo(){Cookies.get("likevideo"+$("#objectid").val())!=="y"?($.post("/LikeAction/"+$("#objectid").val()+"/1",""),Cookies.set("likevideo"+$("#objectid").val(),"y",{expires:1e4}),$("#likednum").text(parseInt($("#likednum").text())+1)):alert("Bạn đã thích video này!")}function thumup(n){Cookies.get("thumup"+n)!=="y"&&($("#thumup"+n).text(parseInt($("#thumup"+n).text())+1),$.post("/likecomment/"+n+"/true/1",""),Cookies.set("thumup"+n,"y",{expires:1e4}),Cookies.get("thumdw"+n)==="y"&&($("#thumdw"+n).text(parseInt($("#thumdw"+n).text())-1),$.post("/likecomment/"+n+"/false/-1","")))}function thumdw(n){Cookies.get("thumdw"+n)!=="y"&&($("#thumdw"+n).text(parseInt($("#thumdw"+n).text())+1),$.post("/likecomment/"+n+"/false/1",""),Cookies.set("thumdw"+n,"y",{expires:1e4}),Cookies.get("thumup"+n)==="y"&&($("#thumup"+n).text(parseInt($("#thumup"+n).text())-1),$.post("/likecomment/"+n+"/true/-1","")))}function hide_frmpopgrey(){$("#loginbox").addClass("displayno");$("#loginbox").removeClass("displayyes")}function loadcmt(){$.get("/binh-luan/"+$("#objectid").val()+"/"+$("#objecttype").val()+"/"+page+"/"+cmttype,function(n){$("#NewsComments").append(n);var t=n.toString().match(/comcount/gi);t===null||t.length<10?($("#loadcmt").addClass("displayno"),$("#loadcmt").removeClass("viewmore"),$("#loadcmt").removeClass("displayyes")):($("#loadcmt").addClass("displayyes"),$("#loadcmt").addClass("viewmore"),$("#loadcmt").removeClass("displayno"));page=page+1})}function loadlivescore(n){if(n.includes("ngoai-hang-anh")||n.includes("bong-da-duc")||n.includes("bong-da-phap")||n.includes("bong-da-y")||n.includes("bong-da-tay-ban-nha")||n.includes("bong-da-viet-nam")){var t=n.indexOf("/");t>0&&(n=n.substring(0,t))}else n="bong-da-viet-nam";$.get("/htmlfiles/Livescore_"+n+".htm",function(n){$("#livescore_div").html(n)})}function loadtop5(){$.get("/htmlfiles/top5.htm",function(n){$("#top5_div").html(n)})}function loadvideoboxleft(){$.get("/htmlfiles/videoboxleft.htm",function(n){$("#videoboxleft_div").html(n)})}function showlatestcmt(){$("#NewsComments").html("");page=1;cmttype=1;$("#tablatest").addClass("active");$("#tabliked").removeClass("active");loadcmt()}function showtopliked(){$("#NewsComments").html("");page=1;cmttype=0;$("#tabliked").addClass("active");$("#tablatest").removeClass("active");loadcmt()}function sendpost(n,t,i,r,u,f,e){i!==""&&(r!==""||userid!=="")&&f!==""&&(Cookies.get("cmt"+n+"pnt"+u)!=="y"?$.post("/postcomment/",{objectid:n,objecttype:t,fullname:i,email:r,parentid:u,comment:f,reply2to:e}).done(function(){var t=new Date;t.setTime(t.getTime()+6e4);Cookies.set("cmt"+n+"pnt"+u,"y",{expires:t});$("#txtcomment"+u).val("");alert("Cảm ơn bạn đã gửi bình luận.");$(".cmterr").html("Cảm ơn bạn đã gửi bình luận");$("#txtcomment"+cmtid).html("")}).fail(function(){$(".cmterr").html("Đã xảy ra lỗi trong khi gửi bình luận")}):alert("Bạn chỉ có thể gửi một bình luận trong vòng một phút"))}function feedbk(n,t,i){reply2to=i;parentid=t;var u=$("#txtUserid").val(),r="";u===""?comtnotlogin===0?loginform():r='