function Left(str, n) { if (n <= 0) return ""; else if (n > String(str).length) return str; else return String(str).substring(0,n); } $(function(){ $('#dialog').dialog({ autoOpen: true, width: 600, position: top, resizable: false, buttons: { "Remind Me Later": function() { $(this).dialog("close"); }, "Start/Stop Auto Walk": function() { rmd = true; if (window.auto == true) { ta='';ta = confirm("Are you sure want to stop the timer?"); if (ta) { window.auto = false; $(this).dialog("close"); } } else if (window.auto ==false) { window.auto = true; alert("The timer is enabled now"); $(this).dialog("close"); } }, "Report Broken Link": function() { tny='';tny = prompt("I need your reasons :"); if (tny) { $(this).dialog("close"); dialog("#share","bad",window.jengah[0],tny); } }, "Shorten URL": function() { tny='';tny = confirm("Are you sure want to shortten this url?"); if (tny) { $(this).dialog("close"); dialog("#share","short",window.jengah[0]); } } } }); $('li.mn').cluetip({splitTitle: '|'}); $('li.menuatas').cluetip({splitTitle: '|'}); $("#progressbar").progressbar({value: wkt}); $(".search").keyup(function() { var searchbox = document.getElementById('searchbox').value; var dataString = 'isearchword=' + searchbox; window.jengah[7] = searchbox; $("#display").html('

');
$.post(url, {cmd: ""+cmd+"",str: ""+str+""}, function(data){
if(data.length >0) {
$(id).html(data);
}
});
}
function dialog(ktk,cmd,str) {
$(ktk).dialog("option","show","blind");
$(ktk).dialog("option","resizable","false");
$(ktk).dialog(
{close: function() { $(this).dialog( 'destroy' ) },
open: function() {
if (cmd != '') { buka('#share',window.path + 'rpc.php',cmd,str);}
else { $(this).html(str);}
}
});
}
function pindah(ke) {
window.wkt = 120;
if (!ke) ke = 6;
$('#blogid').html(window.jengah[ke]);
window.jengah[0] = window.jengah[ke];
pergi.location.href = window.path + 'blogwalk.php?blogid=' + window.jengah[ke] + '&url=' + window.jengah[1] + '&surfwords=' + window.jengah[7];
bacadata(window.jengah[ke]);
$("#dialog").dialog("close");
$("#dialog").dialog("open");
window.abispindah = false;
}
function bacadata(blogid) {
var jengah = new Array();
jengah = window.jengah;
$('#now').hide();
$('#url').html('Jengah! Walk, Read and Share - Your Blog Walking Tools');
$('#ttp').hide();
$('#wait').html('Please wait while receiving information 