//var debugMode = true;
var debugMode = true;
function debug(msg) {
    if(debugMode) {
        alert(msg);
    }
}

function message(msg) {
    alert(msg);
}

function dummy(data) {
    //debug('dummy');
}

String.prototype.replaceAll = function(from, to){
    var i = this.indexOf(from);
    var c = this;

    while (i > -1){
        c = c.replace(from, to);
        i = c.indexOf(from);
    }
    return c;
}

