$(document).ready(function() { $("#link").val(document.location.href); var options={ success: showResponse, type: "post" }; }); function showResponse(responseText, statusText) { $('div.article-functions-box').tabtree('collapseAll'); } function changelidx(lidx) { href=document.location.href; if(lidx!='') { if(href.indexOf('?')>0) { href=href+"&lidx="+lidx; } else { href=href+"/lidx/"+lidx; } } else { var href= href.replace("/lidx/1/","/"); var href=href.replace("/lidx/1",""); var href=href.replace("?lidx=1&","?"); var href= href.replace("?lidx=1",""); var href=href.replace("&lidx=1&","&"); var href=href.replace("&lidx=1","");} document.location.href=href;}