[b]this is not completed, i'm posting it before i click wrong and it is lost
var pageh = document.getElementById('page').Height;
var hsmlh = document.getElementById('hsml').Height;
var hlrgw = document.getElementById('hlrg').Width;
var wrknw = document.getElementById('wrkn').Width;
var hlrgh = var pageh - var hsmlh;
var tiliw = var hlrgw - var wrknw;
document.getElementById('hlrg').Height = var hlrgh;
document.getElementById('tili').Width = var tiliw;
First off, you need to remove the 'var' for the pageh and hsmlh variables when you are setting the hlrgh variable. Thisin itself will create an error, so change all of those variable definitions, and next is the actual styling statements. You must set what's on the right of the equals sign in quotes, unlike in CSS where you don't need them. Try it out and see how it goes.
ZIP is not useful. You have there server-side variables we can not reproduce.
Or: try to isolate the problem. Remove everything is not related with the problem. Do create a small HTML/CSS/JS file which shows only that the error. Isolating the problem is, usually, a good method to find yourself the solution.