// jsPathto v0.0.2 08-02-09 15:04 by Jonathan Head of NimbleHost Themes (http://themes.nimblehost.com)
// Rewritten to more accurately strip the path's ending characters. Many thanks to Adam Merrifield
// for his help figuring this out.

// jsPathto v0.0.1 01-26-09 10:43
// A nifty bit'o code to make use of RapidWeaver's %pathto()% syntax in javascript files.
// Assembled for your RapidWeaver developing pleasure by Adam Merrifield (http://www.seydoggy.com)
function rtrim ( str, charlist ) {
    charlist = !charlist ? ' \s\xA0' : (charlist+'').replace(/([\[\]\(\)\.\?\/\*\{\}\+\$\^\:])/g, '\$1');
    var re = new RegExp('[' + charlist + ']+$', 'g');
    return (str+'').replace(re, '');
}

trimFromPatha = "/jspathto.js";
jsPathtoa = rtrim(rwPathto, trimFromPatha);
trimFromPathb = "scripts";
jsPathto = rtrim(jsPathtoa, trimFromPathb) + "/";
