var calc = "calc" + "(" + (c + "%") + "-" + (5 + "px") + ")";
document.element.style.width = calc;
document.getElementById('js-canvas').style.width = 'calc(100% - 5px)';
var width = document.getElementById("id").parentNode.offsetWidth - 5;
document.getElementById("id").style.width = width + 'px';