function gVarString(a,b){var c=b.split("&");for(var i=0;i<c.length;i++){var d=c[i].split("=");if(d[0]==a){return d[1]}}};function bindPages(){$(".pages_navigation a[href$='#comment']").bind("click",function(e){var f=$(this).attr("href").replace("#comment","");f=f.substring(f.indexOf(".php?")+5);var g=parseInt(gVarString("id",f));var h=parseInt(gVarString("dv",f));var i=parseInt(gVarString("recordstart",f));var j=parseInt(gVarString("recordstartcomment",f));var k=parseInt(gVarString("r",f));var l=parseInt(gVarString("tri",f));var m=parseInt(gVarString("cat",f));var n=window.location.pathname;if(!isNaN(h)){g=h}if(!isNaN(i)){srecordstart="&recordstart="+i}else{srecordstart=""}if(!isNaN(j)){srecordstartcomment="&recordstartcomment="+j}else{srecordstartcomment=""}if(!isNaN(k)){sretour="&r="+k}else{sretour=""}if(!isNaN(l)){stri="&tri="+l}else{stri=""}if(!isNaN(m)){scat="&cat="+m}else{scat=""}if(!isNaN(g)){e.preventDefault();var p=$("#cm .w100");$("#cm br:last").remove();p.css("opacity",0.5);$(".pages_navigation").eq(0).html("<br><img width='18' height='18' align='absmiddle' src='/x/loader.gif'> &nbsp;Un instant...");$.ajax({url:"xcommentpage.php",type:"GET",dataType:"html",data:"id="+g+srecordstart+srecordstartcomment+sretour+stri+scat+"&loc="+n,cache:false,success:function(a){p.replaceWith(a);$(".pages_navigation").eq(1).remove();bindPages();if(n.indexOf("forum")!=-1){bindZoom(".w100 ");var b=$("#passCell");if(b.length){var c=$(".forum_table")}else{var c=$("[name='comment']")}}else{var c=$("[name='comment']")}if(c.length){var d=c.offset().top;$('html,body').scrollTop(d)}},error:function(a){p.html("<span class=vidoff>Erreur! Es-tu encore branch&eacute;?</span>").css("opacity",1)}})}})}$(document).ready(function(){bindPages()});
