﻿String.prototype.replaceAll = function(whatToReplace, replaceWith) {
    var str = this;
    while (str.indexOf(whatToReplace) > -1) {
        str = str.replace(whatToReplace, replaceWith);
    }
}

ToggleDisplayElement = function(show, element) {
    if (!element.id) {
        element = document.getElementById(element);
    }
    if (show) {
        element.style.display = '';
    }
    else {
        element.style.display = 'none';
    }
}
