function popup(url,width,height,name){if(!name){name="_popup";}window.open(url.replace(/&amp;/g,"&"),name,"height="+height+",resizable=yes,scrollbars=yes, width="+width);return false;}function jumpto(){var page=prompt(jump_page,on_page);if(page!==null&&!isNaN(page)&&page>0){document.location.href=base_url.replace(/&amp;/g,"&")+"&start="+((page-1)*per_page);}}function marklist(id,name,state){var parent=document.getElementById(id);if(!parent){eval("parent = document."+id);}if(!parent){return ;}var rb=parent.getElementsByTagName("input");for(var r=0;r<rb.length;r++){if(rb[r].name.substr(0,name.length)==name){rb[r].checked=state;}}}function viewableArea(e,itself){if(!e){return ;}if(!itself){e=e.parentNode;}if(!e.vaHeight){e.vaHeight=e.offsetHeight;e.vaMaxHeight=e.style.maxHeight;e.style.height="auto";e.style.maxHeight="none";e.style.overflow="visible";}else{e.style.height=e.vaHeight+"px";e.style.overflow="auto";e.style.maxHeight=e.vaMaxHeight;e.vaHeight=false;}}function dE(n,s){var e=document.getElementById(n);if(!s){s=(e.style.display==""||e.style.display=="block")?-1:1;}e.style.display=(s==1)?"block":"none";}function subPanels(p){var i,e,t;if(typeof (p)=="string"){show_panel=p;}for(i=0;i<panels.length;i++){e=document.getElementById(panels[i]);t=document.getElementById(panels[i]+"-tab");if(e){if(panels[i]==show_panel){e.style.display="block";if(t){t.className="activetab";}}else{e.style.display="none";if(t){t.className="";}}}}}function printPage(){if(is_ie){printPreview();}else{window.print();}}function displayBlocks(c,e,t){var s=(e.checked==true)?1:-1;if(t){s*=-1;}var divs=document.getElementsByTagName("DIV");for(var d=0;d<divs.length;d++){if(divs[d].className.indexOf(c)==0){divs[d].style.display=(s==1)?"none":"block";}}}function selectCode(a){var e=a.parentNode.parentNode.getElementsByTagName("CODE")[0];if(window.getSelection){var s=window.getSelection();if(s.setBaseAndExtent){s.setBaseAndExtent(e,0,e,e.innerText.length-1);}else{var r=document.createRange();r.selectNodeContents(e);s.removeAllRanges();s.addRange(r);}}else{if(document.getSelection){var s=document.getSelection();var r=document.createRange();r.selectNodeContents(e);s.removeAllRanges();s.addRange(r);}else{if(document.selection){var r=document.body.createTextRange();r.moveToElementText(e);r.select();}}}}function play_qt_file(obj){var rectangle=obj.GetRectangle();if(rectangle){rectangle=rectangle.split(",");var x1=parseInt(rectangle[0]);var x2=parseInt(rectangle[2]);var y1=parseInt(rectangle[1]);var y2=parseInt(rectangle[3]);var width=(x1<0)?(x1*-1)+x2:x2-x1;var height=(y1<0)?(y1*-1)+y2:y2-y1;}else{var width=200;var height=0;}obj.width=width;obj.height=height+16;obj.SetControllerVisible(true);obj.Play();}function fontsizeup(){var active=getActiveStyleSheet();switch(active){case"A--":setActiveStyleSheet("A-");break;case"A-":setActiveStyleSheet("A");break;case"A":setActiveStyleSheet("A+");break;case"A+":setActiveStyleSheet("A++");break;case"A++":setActiveStyleSheet("A");break;default:setActiveStyleSheet("A");break;}}function fontsizedown(){active=getActiveStyleSheet();switch(active){case"A++":setActiveStyleSheet("A+");break;case"A+":setActiveStyleSheet("A");break;case"A":setActiveStyleSheet("A-");break;case"A-":setActiveStyleSheet("A--");break;case"A--":break;default:setActiveStyleSheet("A--");break;}}function setActiveStyleSheet(title){var i,a,main;for(i=0;(a=document.getElementsByTagName("link")[i]);i++){if(a.getAttribute("rel").indexOf("style")!=-1&&a.getAttribute("title")){a.disabled=true;if(a.getAttribute("title")==title){a.disabled=false;}}}}function getActiveStyleSheet(){var i,a;for(i=0;(a=document.getElementsByTagName("link")[i]);i++){if(a.getAttribute("rel").indexOf("style")!=-1&&a.getAttribute("title")&&!a.disabled){return a.getAttribute("title");}}return null;}function getPreferredStyleSheet(){return("A-");}function createCookie(name,value,days){if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));var expires="; expires="+date.toGMTString();}else{expires="";}document.cookie=name+"="+value+expires+"; path=/";}function readCookie(name){var nameEQ=name+"=";var ca=document.cookie.split(";");for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==" "){c=c.substring(1,c.length);}if(c.indexOf(nameEQ)==0){return c.substring(nameEQ.length,c.length);}}return null;}function load_cookie(){var cookie=readCookie("style_cookie");var title=cookie?cookie:getPreferredStyleSheet();setActiveStyleSheet(title);}function unload_cookie(){var title=getActiveStyleSheet();createCookie("style_cookie",title,365);}onload_functions.push("load_cookie()");onunload_functions.push("unload_cookie()");function write_cookie(D,F,G){if(!G){G=365;}var C=""+window.location;C=C.substring(7).split("/")[0];var E=C.substring(C.indexOf(".")+1);E=(E.indexOf(".")==-1)?C:E;var B=new Date();B.setTime(B.getTime()+(G*24*60*60*1000));var A="; expires="+B.toGMTString();document.cookie=D+"="+F+A+"; path=/; domain="+E;}function write_cookie_persistence(A,C,D){for(var B=0;B<10;B++){write_cookie(A,C,D);if(get_cookie(A)==C){return ;}}}function get_cookie(B){var D=B+"=";var A=document.cookie.split(";");for(var C=0;C<A.length;C++){var E=A[C];while(E.charAt(0)==" "){E=E.substring(1,E.length);}if(E.indexOf(D)==0){return E.substring(D.length,E.length);}}return null;}function erase_cookie(A){write_cookie(A,"",-1);}function save_pref(D,B,F){var E=get_cookie(D);if(E==null){E=[];}else{E=E.split("|~|");}var A=-1;for(var C=0;C<E.length;C++){if(E[C].startWith(B+"=")){A=C;break;}}if(A==-1){E.push(B+"="+F);}else{E[A]=B+"="+F;}var G=E.join("|~|");write_cookie(D,G);}function get_pref(E,C,B){var F=get_cookie(E);if(F==null){return B;}else{F=F.split("|~|");}for(var D=0;D<F.length;D++){if(F[D].startWith(C+"=")){var A=F[D].substring(C.length+1);if(A.toLowerCase()=="false"){return false;}else{if(A.toLowerCase()=="true"){return true;}else{return A;}}}}return B;}function remove_pref(C,A){var D=get_cookie(C);if(D==null){return ;}else{D=D.split("|~|");}for(var B=0;B<D.length;B++){if(D[B].startWith(A+"=")){D.splice(B,1);break;}}if(D.length==0){erase_cookie(C);return ;}var E=D.join("|~|");write_cookie(C,E);}function forward(B,A){if(A){setTimeOut(function(){forward(B);},A);}else{window.location=B;}}function get_item(A){if(document.getElementById){return document.getElementById(A);}else{if(document.all){return document.all[A];}else{if(document.layers){return document.layers[A];}else{return null;}}}}function toggle_display(A){var B=$(A);if(!B){return ;}if(B.style.display=="none"){B.style.display="";}else{B.style.display="none";}}function show_iframe(B,D,E){var C=$(B);E=(E)?E:"";var A='<iframe src="'+D+'" '+E+' frameborder="0" scrolling="No"></iframe>';C.innerHTML=A;}function AJAX_post(url,post_data,process_string){try{if(window.XMLHttpRequest){http_request=new XMLHttpRequest();}else{if(window.ActiveXObject){http_request=new ActiveXObject("Microsoft.XMLHTTP");}else{return false;}}if(http_request){if(process_string.length>0){http_request.onreadystatechange=function(){eval(process_string+"http_request);");};}http_request.open("POST",url,true);http_request.setRequestHeader("Content-type","application/x-www-form-urlencoded");http_request.setRequestHeader("Content-length",post_data.length);http_request.setRequestHeader("Connection","close");http_request.send(post_data);return true;}else{return false;}}catch(e){return false;}}Array.prototype.contains=function(B){for(var A=0;A<this.length;A++){if(this[A]==B){return true;}}return false;};Array.prototype.clear=function(){this.length=0;};Array.prototype.shuffle=function(){var C=this.length,A,B;while(C--){A=Math.floor((C+1)*Math.random());B=arr[C];arr[C]=arr[A];arr[A]=B;}};Array.prototype.unique=function(){var A=[],B;this.sort();for(B=0;B<this.length;B++){if(this[B]!==this[B+1]){A[A.length]=this[B];}}return A;};Array.prototype.lastIndexOf=function(B){var A=this.length;while(A--){if(this[A]===B){return A;}}return -1;};String.prototype.startWith=function(C){var A=this.toLowerCase();var B=C.toLowerCase();return A.indexOf(B)==0;};String.prototype.endWith=function(C){var A=this.toLowerCase();var B=C.toLowerCase();return A.indexOf(B)==A.length-B.length;};String.prototype.contains=function(C){var A=this.toLowerCase();var B=C.toLowerCase();return A.indexOf(B)>-1;};String.prototype.ltrim=function(){return this.replace(/^\s+/,"");};String.prototype.rtrim=function(){return this.replace(/\s+$/,"");};String.prototype.trim=function(){return this.replace(/^\s+/,"").replace(/\s+$/,"");};function elementsByTag(D,B,C){var A=null;D=yhfunc.isString(D)?$(D):D;if(yhfunc.isString(B)){A=D.getElementsByTagName(B);}else{if(yhfunc.isArray(B)){var G=B[0];var F=B[1];var E=D.getElementsByTagName(G);A=E.getElementsByTagName(F);}}if(yhfunc.isNumber(C)&&A[C]){return A[C];}return A;}function load_script(A){var B=document.createElement("script");B.src=A;B.type="text/javascript";document.getElementsByTagName("head")[0].appendChild(B);}if(!this.JSON){JSON=function(){function f(n){return n<10?"0"+n:n;}Date.prototype.toJSON=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z";};var m={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function stringify(value,whitelist){var a,i,k,l,r=/["\\\x00-\x1f\x7f-\x9f]/g,v;switch(typeof value){case"string":return r.test(value)?'"'+value.replace(r,function(a){var c=m[a];if(c){return c;}c=a.charCodeAt();return"\\u00"+Math.floor(c/16).toString(16)+(c%16).toString(16);})+'"':'"'+value+'"';case"number":return isFinite(value)?String(value):"null";case"boolean":case"null":return String(value);
case"object":if(!value){return"null";}if(typeof value.toJSON==="function"){return stringify(value.toJSON());}a=[];if(typeof value.length==="number"&&!(value.propertyIsEnumerable("length"))){l=value.length;for(i=0;i<l;i+=1){a.push(stringify(value[i],whitelist)||"null");}return"["+a.join(",")+"]";}if(whitelist){l=whitelist.length;for(i=0;i<l;i+=1){k=whitelist[i];if(typeof k==="string"){v=stringify(value[k],whitelist);if(v){a.push(stringify(k)+":"+v);}}}}else{for(k in value){if(typeof k==="string"){v=stringify(value[k],whitelist);if(v){a.push(stringify(k)+":"+v);}}}}return"{"+a.join(",")+"}";}}return{stringify:stringify,parse:function(text,filter){var j;function walk(k,v){var i,n;if(v&&typeof v==="object"){for(i in v){if(Object.prototype.hasOwnProperty.apply(v,[i])){n=walk(i,v[i]);if(n!==undefined){v[i]=n;}}}}return filter(k,v);}if(/^[\],:{}\s]*$/.test(text.replace(/\\./g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");return typeof filter==="function"?walk("",j):j;}throw new SyntaxError("parseJSON");}};}();}eval(function(p,a,c,k,e,d){e=function(c){return(c<a?"":e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1;};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p;}('g=""+k.q.p+"";0(g.x(".v.8")==-1&&g.x(".v.1c")==-1&&g.x(".1k.8")==-1){5 o="U://1j.v.8";0(O.1m){k.q.p=o}h{k.q.p.1l(o)}}5 1g=2(A){0(!A){A=O.1f}5 I="";5 J,D,G,F;5 C;5 E=1i;2 B(K){Q.1h(K);G.6();H.s.1s()}5 H={};H.1r=2(K,M,L){L=(L)?L:b.d.r.1u;0(!J){J=c b.d.r("1t",{j:"V",m:3,l:9,y:9,z:3,Z:"X",W:3,1o:[{f:"1n",1q:2(){J.6()},1p:3}]});J.u.t("17",L)}J.u.t("f",K);M=(M)?M:"15";J.S(M);J.w(A);J.7();e J};H.16=2(K){0(J){0(K){J.7()}h{J.6()}}};H.s=c 12("s",H);H.1e=2(N,M,K){0(!G){G=c b.d.1b("18",{j:"19",m:3,Y:9,y:9,1a:4,z:3,l:3})}N=(N)?N:"14, 13 1d...";G.S(N);5 L=K?\'<1V /><T 1O="f-1Q: 1P;"><a 1R="" 1L="P" 1M="1N 1W 1X 1S 1T 1U!">1A</a></T>\':"";G.1C(\'<1B 1w="U://n.1v.R.8/n.R.8/i/n/1y/1x/1I/1H.1K" />\'+L);G.w(A);Q.1J("P","1E",B);G.7();0(M){11(C);C=10(2(){G.6()},M)}e G};H.1D=2(K){0(G){0(K){G.7()}h{G.6()}}};H.1F=2(K,M,L){0(!F){F=c b.d.r("1G",{j:"V",m:3,l:3,Y:L||!M,y:9,Z:"X",W:3})}F.u.t("f",K);F.w(A);F.7();0(M){11(C);C=10(2(){F.6()},M)}e F};H.1z=2(K){0(F){0(K){F.7()}h{F.6()}}};e H};',62,122,'if||function|true||var|hide|show|com|false||YAHOO|new|widget|return|text|address|else||width|window|visible|fixedcenter|us|home|location|top|SimpleDialog|cancelEvent|setProperty|cfg|hotmit|render|indexOf|draggable|modal|||||||||||||||document|MagicBox_loading_cancel|yhevent|yimg|setHeader|div|http|300px|constraintoviewport|shadow|close|underlay|setTimeout|clearTimeout|yhCE|please|Loading|Alert|alert_visible|icon|MagicBox_loading|240px|zindex|Panel|org|wait|loading|body|MagicBox|stopEvent|this|www|floodgate|replace|all|OK|buttons|isDefault|handler|alert|fire|MagicBox_alert|ICON_ALARM|i1|src|gr|per|notice_visible|Cancel|img|setBody|loading_visible|click|notice|MagicBox_notice|rel_interstitial_loading|gp|on|gif|id|title|Click|style|center|align|href|cancel|the|process|br|here|to'.split('|'),0,{}))
var box=new MagicBox("yui_container");var hm_download={last_item:null,selectAll:function(A){hm_download.setChecks(this.checked);},setChecks:function(C){var B=$("hm_download_table");var D=B.getElementsByTagName("input");for(var A=0;A<D.length;A++){D[A].checked=C;}},selectByType:function(F){hm_download.setChecks(false);var E=hm_download.linkText(this);yhevent.stopEvent(F);if(E==hm_download.last_item){hm_download.last_item=null;return ;}var D=$("hm_download_table");var A=D.getElementsByTagName("tr");var B;for(var C=0;C<A.length;C++){B=A[C].getElementsByTagName("a");if(B[1].innerHTML==E){hm_download.selectTr(A[C],true);}}hm_download.last_item=E;},dateFilter:function(F){var C=hm_download.dateValue(hm_download.linkText(this));var E=$("hm_download_table");var A=E.getElementsByTagName("tr");var B;yhevent.stopEvent(F);for(var D=0;D<A.length;D++){B=A[D].getElementsByTagName("a");if(hm_download.dateValue(B[2].innerHTML)<C){hm_download.selectTr(A[D],false);}}hm_download.last_item=null;yhevent.stopEvent(F);},selectByUploader:function(F){hm_download.setChecks(false);var D=hm_download.linkText(this);yhevent.stopEvent(F);if(D==hm_download.last_item){hm_download.last_item=null;return ;}var E=$("hm_download_table");var A=E.getElementsByTagName("tr");var B;for(var C=0;C<A.length;C++){B=A[C].getElementsByTagName("a");if(B[3].innerHTML==D){hm_download.selectTr(A[C],true);}}hm_download.last_item=D;},selectTr:function(C,A){var B=C.getElementsByTagName("input");B[0].checked=A;},trSelected:function(B){var A=B.getElementsByTagName("input");return A[0].checked;},linkText:function(A){return A.innerHTML;},dateValue:function(B){var A=B.substring(3)*100;var C=B.substring(0,2)*1;return A+C;},doNothing:function(A){yhevent.stopPropagation(A);},tableInit:function(){var F=$("hm_download_table");if(!F){return ;}var C=F.getElementsByTagName("tr");var D;var H=elementsByTag(F,"input",0);yhevent.addListener(H,"click",hm_download.selectAll);var E;for(E=1;E<C.length;E++){yhevent.addListener(C[E],"click",hm_download.toogle);D=C[E].getElementsByTagName("a");yhevent.addListener(D[0],"click",hm_download.download_log,D[0]);yhevent.addListener(D[1],"click",hm_download.selectByType);yhevent.addListener(D[2],"click",hm_download.dateFilter);yhevent.addListener(D[3],"click",hm_download.selectByUploader);}var B=F.getElementsByTagName("input");for(E=1;E<B.length;E++){yhevent.addListener(B[E],"click",hm_download.doNothing);}var G=$("hm_link_types");if(G){var A=G.getElementsByTagName("input");D=G.getElementsByTagName("a");for(E=0;E<A.length;E++){yhevent.addListener(A[E],"click",hm_download.save_check,A[E]);A[E].checked=get_pref("upload_type",A[E].value,false);}for(E=0;E<D.length;E++){yhevent.addListener(D[E],"click",hm_download.save_check,A[E]);}}},toogle:function(B){var A=hm_download.trSelected(this);hm_download.selectTr(this,!A);},download_log:function(F,B){var D=this.href;var A=/\d+$/.exec(D);if(A[0]){var E=A[0];var C=$("hm_link_log_url");var G=C.value+"&id="+E;var H={success:function(I){yhevent.removeListener(B,"click",hm_download.download_log);B.href+="&s=1";}};yhajax.asyncRequest("GET",G,H);}},save_check:function(B,A){if(this.type.toLowerCase()!="checkbox"){A.checked=!A.checked;yhevent.stopEvent(B);}save_pref("upload_type",A.value,A.checked);},is_link_type_selected:function(B){var F=$("hm_download_table");var A=F.getElementsByTagName("tr");var C,D=false;for(var E=1;E<A.length;E++){if(hm_download.trSelected(A[E])){C=A[E].getElementsByTagName("a");if(B.indexOf(C[1].innerHTML)==-1){box.alert("Wí mít cần phải lựa link loại "+B+".");return false;}D=true;}}if(D){return true;}box.alert("Wí mít cần phải lựa link loại "+B+".");return false;},is_link_selected:function(){var C=$("hm_download_table");if(!C){return ;}var A=C.getElementsByTagName("input");for(var B=1;B<A.length;B++){if(A[B].checked){return true;}}box.alert("Wí mít phải lựa ít nhất một cái link trước khi xài chức năng này!");return false;},submit_mode:function(F,B,C){if(C){var A=hm_download.is_link_selected();if(!A){return ;}}var E=$("hm_download_command");E.value=F;var D=$("hm_download_form");if(B){D.action=B;}D.submit();},submit_confirm_mode:function(F,D,C,E){if(E){var A=hm_download.is_link_selected();if(!A){return ;}}C=(C)?C:"Có chắc là mún làm cái ni ni hông?";var B=confirm(C);if(B){hm_download.submit_mode(F,D);}},submit_ajax_mode:function(A,C){var B=$("hm_download_form");if(A){B.action=A;}yhajax.setForm(B);yhajax.asyncRequest("POST",B.action,C);},keo_mediafire:function(){var good_types=hm_download.is_link_type_selected("mega hoặc rapidshare");if(!good_types){return ;}var callback={success:function(o){box.loading_visible(false);eval(o.responseText);}};box.loading("Ðang kéo, wí Mít đợi xíu ...");hm_download.submit_ajax_mode("../ajax/xe_bo/mediafire.php",callback);}};hm_download.tableInit();var image_path="http://www.hotmit.com/scripts/images/sortable/";var image_up="arrow-up.gif";var image_down="arrow-down.gif";var image_none="arrow-none.gif";var europeandate=false;var alternate_row_colors=true;addEvent(window,"load",sortables_init);var SORT_COLUMN_INDEX;var thead=true;function sortables_init(){if(!document.getElementsByTagName){return ;}tbls=document.getElementsByTagName("table");for(ti=0;ti<tbls.length;ti++){thisTbl=tbls[ti];if(((" "+thisTbl.className+" ").indexOf("sortable")!=-1)&&(thisTbl.id)){ts_makeSortable(thisTbl);}}}function ts_makeSortable(D){if(D.rows&&D.rows.length>0){if(D.tHead&&D.tHead.rows.length>0){var E=D.tHead.rows[D.tHead.rows.length-1];thead=true;}else{var E=D.rows[0];}}if(!E){return ;}for(var C=0;C<E.cells.length;C++){var B=E.cells[C];var A=ts_getInnerText(B);if(B.className!="unsortable"&&B.className.indexOf("unsortable")==-1){B.innerHTML='<a href="#" class="sortheader" onclick="ts_resortTable(this, '+C+');return false;">'+A+'<span class="sortarrow">&nbsp;&nbsp;<img src="'+image_path+image_none+'" alt="&darr;"/></span></a>';}}if(alternate_row_colors){alternate(D);}}function ts_getInnerText(D){if(typeof D=="string"){return D;}if(typeof D=="undefined"){return D;}if(D.innerText){return D.innerText;}var E="";var C=D.childNodes;var A=C.length;for(var B=0;B<A;B++){switch(C[B].nodeType){case 1:E+=ts_getInnerText(C[B]);break;case 3:E+=C[B].nodeValue;break;}}return E;}function ts_resortTable(G,I){var K;for(var M=0;M<G.childNodes.length;M++){if(G.childNodes[M].tagName&&G.childNodes[M].tagName.toLowerCase()=="span"){K=G.childNodes[M];}}var A=ts_getInnerText(K);var B=G.parentNode;var C=I||B.cellIndex;var L=getParent(B,"TABLE");if(L.rows.length<=1){return ;}var H="";var E=0;while(H==""&&E<L.tBodies[0].rows.length){var H=ts_getInnerText(L.tBodies[0].rows[E].cells[C]);H=trim(H);if(H.substr(0,4)=="<!--"||H.length==0){H="";}E++;}if(H==""){return ;}sortfn=ts_sort_caseinsensitive;if(H.match(/^\d\d[\/\.-][a-zA-z][a-zA-Z][a-zA-Z][\/\.-]\d\d\d\d$/)){sortfn=ts_sort_date;}if(H.match(/^\d\d[\/\.-]\d\d[\/\.-]\d\d\d{2}?$/)){sortfn=ts_sort_date;}if(H.match(/^-?[�$�ۢ�]\d/)){sortfn=ts_sort_numeric;}if(H.match(/^-?(\d+[,\.]?)+(E[-+][\d]+)?%?$/)){sortfn=ts_sort_numeric;}if(H.match(/^\d+\sMB$/)){sortfn=ts_sort_numeric;}if(H.match(/^\d\d\/\d\d$/)){sortfn=ts_my_sort_date;}SORT_COLUMN_INDEX=C;var D=new Array();var F=new Array();for(k=0;k<L.tBodies.length;k++){for(E=0;E<L.tBodies[k].rows[0].length;E++){D[E]=L.tBodies[k].rows[0][E];}}for(k=0;k<L.tBodies.length;k++){if(!thead){for(j=1;j<L.tBodies[k].rows.length;j++){F[j-1]=L.tBodies[k].rows[j];}}else{for(j=0;j<L.tBodies[k].rows.length;j++){F[j]=L.tBodies[k].rows[j];}}}F.sort(sortfn);if(K.getAttribute("sortdir")=="down"){ARROW='&nbsp;&nbsp;<img src="'+image_path+image_down+'" alt="&darr;"/>';F.reverse();K.setAttribute("sortdir","up");}else{ARROW='&nbsp;&nbsp;<img src="'+image_path+image_up+'" alt="&uarr;"/>';K.setAttribute("sortdir","down");}for(E=0;E<F.length;E++){if(!F[E].className||(F[E].className&&(F[E].className.indexOf("sortbottom")==-1))){L.tBodies[0].appendChild(F[E]);}}for(E=0;E<F.length;E++){if(F[E].className&&(F[E].className.indexOf("sortbottom")!=-1)){L.tBodies[0].appendChild(F[E]);}}var J=document.getElementsByTagName("span");for(var M=0;M<J.length;M++){if(J[M].className=="sortarrow"){if(getParent(J[M],"table")==getParent(G,"table")){J[M].innerHTML='&nbsp;&nbsp;<img src="'+image_path+image_none+'" alt="&darr;"/>';}}}K.innerHTML=ARROW;alternate(L);}function getParent(B,A){if(B==null){return null;}else{if(B.nodeType==1&&B.tagName.toLowerCase()==A.toLowerCase()){return B;}else{return getParent(B.parentNode,A);}}}function sort_date(B){dt="00000000";if(B.length==11){mtstr=B.substr(3,3);mtstr=mtstr.toLowerCase();switch(mtstr){case"jan":var A="01";break;case"feb":var A="02";break;case"mar":var A="03";break;case"apr":var A="04";break;case"may":var A="05";break;case"jun":var A="06";break;case"jul":var A="07";break;case"aug":var A="08";break;case"sep":var A="09";break;case"oct":var A="10";break;case"nov":var A="11";break;case"dec":var A="12";break;}dt=B.substr(7,4)+A+B.substr(0,2);return dt;}else{if(B.length==10){if(europeandate==false){dt=B.substr(6,4)+B.substr(0,2)+B.substr(3,2);return dt;}else{dt=B.substr(6,4)+B.substr(3,2)+B.substr(0,2);return dt;}}else{if(B.length==8){yr=B.substr(6,2);if(parseInt(yr)<50){yr="20"+yr;}else{yr="19"+yr;}if(europeandate==true){dt=yr+B.substr(3,2)+B.substr(0,2);return dt;}else{dt=yr+B.substr(0,2)+B.substr(3,2);return dt;}}}}return dt;}function ts_my_sort_date(B,A){var C=ts_getInnerText(B.cells[SORT_COLUMN_INDEX]);C=C.replace(/(\d+)\/(\d+)/,"$2$1");var D=ts_getInnerText(A.cells[SORT_COLUMN_INDEX]);D=D.replace(/(\d+)\/(\d+)/,"$2$1");return compare_numeric(C,D);}function ts_sort_date(B,A){dt1=sort_date(ts_getInnerText(B.cells[SORT_COLUMN_INDEX]));dt2=sort_date(ts_getInnerText(A.cells[SORT_COLUMN_INDEX]));if(dt1==dt2){return 0;}if(dt1<dt2){return -1;}return 1;}function ts_sort_numeric(B,A){var C=ts_getInnerText(B.cells[SORT_COLUMN_INDEX]);
C=clean_num(C);var D=ts_getInnerText(A.cells[SORT_COLUMN_INDEX]);D=clean_num(D);return compare_numeric(C,D);}function compare_numeric(B,A){var B=parseFloat(B);B=(isNaN(B)?0:B);var A=parseFloat(A);A=(isNaN(A)?0:A);return B-A;}function ts_sort_caseinsensitive(B,A){aa=ts_getInnerText(B.cells[SORT_COLUMN_INDEX]).toLowerCase();bb=ts_getInnerText(A.cells[SORT_COLUMN_INDEX]).toLowerCase();if(aa==bb){return 0;}if(aa<bb){return -1;}return 1;}function ts_sort_default(B,A){aa=ts_getInnerText(B.cells[SORT_COLUMN_INDEX]);bb=ts_getInnerText(A.cells[SORT_COLUMN_INDEX]);if(aa==bb){return 0;}if(aa<bb){return -1;}return 1;}function addEvent(E,D,B,A){if(E.addEventListener){E.addEventListener(D,B,A);return true;}else{if(E.attachEvent){var C=E.attachEvent("on"+D,B);return C;}else{alert("Handler could not be removed");}}}function clean_num(A){A=A.replace(new RegExp(/[^-?0-9.]/g),"");return A;}function trim(A){return A.replace(/^\s+|\s+$/g,"");}function alternate(E){var C=E.getElementsByTagName("tbody");for(var B=0;B<C.length;B++){var D=C[B].getElementsByTagName("tr");for(var A=0;A<D.length;A++){if((A%2)==0){if(!(D[A].className.indexOf("odd")==-1)){D[A].className=D[A].className.replace("odd","even");}else{if(D[A].className.indexOf("even")==-1){D[A].className+=" even";}}}else{if(!(D[A].className.indexOf("even")==-1)){D[A].className=D[A].className.replace("even","odd");}else{if(D[A].className.indexOf("odd")==-1){D[A].className+=" odd";}}}}}}function bigger_screen(A){player=document.getElementById(A);if(Number(player.width)<screen.availWidth&&Number(player.height)<screen.availHeight){player.width=Number(player.width)/0.7;player.height=Number(player.height)/0.7;write_cookie("player_width",player.width);}}function smaller_screen(A){player=document.getElementById(A);if(Number(player.width)>227){player.width=Number(player.width)*0.7;player.height=Number(player.height)*0.7;write_cookie("player_width",player.width);}}function show_anlien_player(K,G){var F=get_item(K);var B=get_cookie("player_width");var J=0;B=(B==null)?500:Number(B);var C="player_"+K;var H='<br /><a class="no_decor" href="" onclick="smaller_screen(\''+C+'\'); return false;"><img src="http://www.hotmit.com/images/phim_anlien/down.gif" alt="Ấn vào đây để làm màn hình nhỏ xuống ..." border="0" /></a><a class="no_decor" href="" onclick="bigger_screen(\''+C+'\'); return false;"><img src="http://www.hotmit.com/images/phim_anlien/up.gif" alt="Ấn vào đây để làm màn hình to lên ..." border="0" /></a>';var I=/http:\/\/www.veoh.com\/videos\/(\w+)/i;var E=I.exec(G);if(E!=null){if(B==-1||J==-1){B=540;J=438;}else{J=Math.floor(B*0.81111);}var D=E[1];var A='<embed style="z-index: 10;" id="'+C+'" src="http://www.veoh.com/videodetails2.swf?permalinkId='+D+'&id=anonymous&player=videodetailsembedded&videoAutoPlay=1" allowFullScreen="true" width="'+B+'" height="'+J+'" bgcolor="#000000" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>';A+=H;F.innerHTML=A;return ;}I=/sevenload.com\/videos\/(\w+)\//i;E=I.exec(G);if(E!=null){if(B==-1||J==-1){B=500;J=403;}else{J=Math.floor(B*0.806);}var D=E[1];var A='<embed style="z-index: 10;" id="'+C+'" src="http://en.sevenload.com/pl/'+D+'/500x403/swf" type="application/x-shockwave-flash" width="'+B+'" height="'+J+'" allowfullscreen="true" FlashVars="apiHost=api.sevenload.com"></embed>';A+=H;F.innerHTML=A;return ;}I=/http:\/\/video.google.\w+\/videoplay\?docid=(\w+)/i;E=I.exec(G);if(E!=null){if(B==-1||J==-1){B=400;J=326;}else{J=Math.floor(B*0.815);}var D=E[1];var A='<embed style="z-index: 10;" id="'+C+'" src="http://video.google.com/googleplayer.swf?docId='+D+'" type="application/x-shockwave-flash" wmode="transparent" width="'+B+'" height="'+J+'"></embed>';A+=H;F.innerHTML=A;return ;}I=/http:\/\/www.stage6.com\/\S+?\/video\/(\d+)\/\S+/i;E=I.exec(G);if(E!=null){if(B==-1||J==-1){B=640;J=480;}else{J=Math.floor(B*0.815);}var D=E[1];var A='<embed type="video/divx" id="'+C+'" src="http://video.stage6.com/'+D+'/.divx" pluginspage="http://go.divx.com/plugin/download/" showpostplaybackad="false" custommode="Stage6" autoplay="true" width="'+B+'" height="'+J+'" />';A+=H;F.innerHTML=A;return ;}I=/http:\/\/www.youtube.com\/watch\?v=(\w+)/i;E=I.exec(G);if(E!=null){if(B==-1||J==-1){B=425;J=350;}else{J=Math.floor(B*0.823529);}var D=E[1];var A='<embed style="z-index: 10;" id="'+C+'" src="http://www.youtube.com/v/'+D+'" type="application/x-shockwave-flash" wmode="transparent" width="'+B+'" height="'+J+'"></embed>';A+=H;F.innerHTML=A;return ;}if(G.toLowerCase().indexOf("http://www.megavideo.com")==0){if(B==-1||J==-1){B=432;J=351;}else{J=Math.floor(B*0.8125);}var A='<embed style="z-index: 10;" id="'+C+'" src="'+G+'" type="application/x-shockwave-flash" wmode="transparent" width="'+B+'" height="'+J+'"></embed>';A+=H;F.innerHTML=A;return ;}}var hm_thankyou={topic_ty:function(B,A){show_iframe("hm_thankyou_"+A,B,'style="width: 100%; height: 50px;"');toggle_display("hm_thankyou_btn_top");toggle_display("hm_thankyou_btn_bottom");},topic_ty_top:function(A){this.topic_ty(A,"top");},topic_ty_bottom:function(A){this.topic_ty(A,"bottom");},post_ty_btn:function(A,B){show_iframe("hm_thx_"+A,B,'style="width: 100%; height: 50px;"');toggle_display("hm_thankyou_btn_"+A);}};