function trim(str) {while (str.charAt(0) == ' '){str = str.substring(1, str.length);}while (str.charAt(str.length - 1) == ' '){str = str.substring(0, str.length - 1);}return str;}
function removelast(str) {while (str.charAt(str.length - 1) == '#') {str = str.substring(0, str.length - 1);}return str;}

function dt() {return trim(document.title);}
function lf() {return removelast(location.href);}
function ct() {w=window;d=document;return w.getSelection?w.getSelection():(d.getSelection?d.getSelection():(d.selection?d.selection.createRange().text:''));}

function edt() {return encodeURIComponent(dt());}
function elf() {return encodeURIComponent(lf());}
function ect() {return encodeURIComponent(ct());}
