Вот JS файл с настройками высоты шаблона:
function equalSize(){
//get Height of page
var winW = 0, winH = 0;
if (document.body && document.body.offsetWidth){
winW = document.body.offsetWidth;
winH = document.body.offsetHeight;
}
if (document.compatMode=='CSS1Compat' &&
document.documentElement &&
document.documentElement.offsetWidth ) {
winW = document.documentElement.offsetWidth;
winH = document.documentElement.offsetHeight;
}
if (window.innerWidth && window.innerHeight) {
winW = window.innerWidth;
winH = window.innerHeight;
}
//...
var wbody = document.getElementById('mega_body').offsetWidth - 17 ;
document.getElementById('mega_wwrapper').style.width = wbody + 'px';
if(document.getElementById('mega_hbanner') != null){
document.getElement('.mega_banner_w').style.width = wbody -460 + 'px';
}
if(document.getElementById('mega_extend1_w') != null){
document.getElementById('mega_extend1_w').style.width = wbody -460 + 'px';
}
if(document.getElementById('mega_extend2_w') != null){
document.getElementById('mega_extend2_w').style.width = wbody -460 + 'px';
}
document.getElement('.mega_mainbody_w').style.width = wbody -460 + 'px';
document.getElement('.mega_footer_w').style.width = wbody -460 + 'px';
if((document.getElementById('mega_hbanner') != null) && (document.getElementById('mega_hextend1') != null) && (document.getElementById('mega_hextend2') != null)){
//Extend1
document.getElementById('mega_hextend1').style.height = winH + 80 + 'px';
document.getElementById('mega_hextend1').style.top = winH + 80 + 'px';
//Extend2
document.getElementById('mega_hextend2').style.height = winH + 80 + 'px';
document.getElementById('mega_hextend2').style.top = winH*2 + 160 + 'px';
//Main body
document.getElementById('mega_hmainbody').style.height = winH + 80 + 'px';
document.getElementById('mega_hmainbody').style.top = winH*3 + 240 + 'px';
//Footer
document.getElementById('mega_hfooter').style.height = winH + 80 + 'px';
document.getElementById('mega_hfooter').style.top = winH*4 + 320 + 'px';
document.getElementById('mega_top_onclick').style.bottom = 0 + 'px';
//Set width
document.getElementById('mega_hextend1').style.width = wbody + 'px';
document.getElementById('mega_hextend2').style.width = wbody + 'px';
document.getElementById('mega_hmainbody').style.width = wbody + 'px';
document.getElementById('mega_hfooter').style.width = wbody + 'px';
document.getElementById('mega_wwrapper').style.height = winH*5 + 320 + 73 + 'px';
}else if((document.getElementById('mega_hbanner') != null) && (document.getElementById('mega_hextend1') != null) && (document.getElementById('mega_hextend2') == null)){
//Extend1
document.getElementById('mega_hextend1').style.height = winH + 80 + 'px';
document.getElementById('mega_hextend1').style.top = winH + 80 + 'px';
//Main body
document.getElementById('mega_hmainbody').style.height = winH + 80 + 'px';
document.getElementById('mega_hmainbody').style.top = winH*2 + 160 + 'px';
//Footer
document.getElementById('mega_hfooter').style.height = winH + 80 + 'px';
document.getElementById('mega_hfooter').style.top = winH*3 + 240 + 'px';
document.getElementById('mega_top_onclick').style.bottom = 0 + 'px';
//Set width
document.getElementById('mega_hextend1').style.width = wbody + 'px';
document.getElementById('mega_hmainbody').style.width = wbody + 'px';
document.getElementById('mega_hfooter').style.width = wbody + 'px';
document.getElementById('mega_wwrapper').style.height = winH*4 + 240 + 73 + 'px';
}else if((document.getElementById('mega_hbanner') != null) && (document.getElementById('mega_hextend1') == null) && (document.getElementById('mega_hextend2') != null)){
//Extend2
document.getElementById('mega_hextend2').style.height = winH + 80 + 'px';
document.getElementById('mega_hextend2').style.top = winH + 80 + 'px';
//Main body
document.getElementById('mega_hmainbody').style.height = winH + 80 + 'px';
document.getElementById('mega_hmainbody').style.top = winH*2 + 160 + 'px';
//Footer
document.getElementById('mega_hfooter').style.height = winH + 80 + 'px';
document.getElementById('mega_hfooter').style.top = winH*3 + 240 + 'px';
document.getElementById('mega_top_onclick').style.bottom = 0 + 'px';
//Set width
document.getElementById('mega_hextend2').style.width = wbody + 'px';
document.getElementById('mega_hmainbody').style.width = wbody + 'px';
document.getElementById('mega_hfooter').style.width = wbody + 'px';
document.getElementById('mega_wwrapper').style.height = winH*4 + 240 + 73 + 'px';
}else if((document.getElementById('mega_hbanner') != null) && (document.getElementById('mega_hextend1') == null) && (document.getElementById('mega_hextend2') == null)){
//Main body
document.getElementById('mega_hmainbody').style.height = winH + 80 + 'px';
document.getElementById('mega_hmainbody').style.top = winH + 80 + 'px';
//Footer
document.getElementById('mega_hfooter').style.height = winH + 80 + 'px';
document.getElementById('mega_hfooter').style.top = winH*2 + 160 + 'px';
document.getElementById('mega_top_onclick').style.bottom = 0 + 'px';
//Set width
document.getElementById('mega_hmainbody').style.width = wbody + 'px';
document.getElementById('mega_hfooter').style.width = wbody + 'px';
document.getElementById('mega_wwrapper').style.height = winH*3 + 160 + 73 + 'px';
}else if((document.getElementById('mega_hbanner') == null) && (document.getElementById('mega_hextend1') != null) && (document.getElementById('mega_hextend2') != null)){
//Extend2
document.getElementById('mega_hextend2').style.height = winH + 80 + 'px';
document.getElementById('mega_hextend2').style.top = winH + 80 + 'px';
//Main body
document.getElementById('mega_hmainbody').style.height = winH + 80 + 'px';
document.getElementById('mega_hmainbody').style.top = winH*2 + 160 + 'px';
//Footer
document.getElementById('mega_hfooter').style.height = winH + 80 + 'px';
document.getElementById('mega_hfooter').style.top = winH*3 + 240 + 'px';
document.getElementById('mega_top_onclick').style.bottom = 0 + 'px';
//Set width
document.getElementById('mega_hextend1').style.width = wbody + 'px';
document.getElementById('mega_hextend2').style.width = wbody + 'px';
document.getElementById('mega_hmainbody').style.width = wbody + 'px';
document.getElementById('mega_hfooter').style.width = wbody + 'px';
document.getElementById('mega_wwrapper').style.height = winH*4+ 240 + 73 + 'px';
}else if((document.getElementById('mega_hbanner') == null) && (document.getElementById('mega_hextend1') == null) && (document.getElementById('mega_hextend2') != null)){
//Main body
document.getElementById('mega_hmainbody').style.height = winH + 80 + 'px';
document.getElementById('mega_hmainbody').style.top = winH + 80 + 'px';
//Footer
document.getElementById('mega_hfooter').style.height = winH + 80 + 'px';
document.getElementById('mega_hfooter').style.top = winH*2 + 160 + 'px';
document.getElementById('mega_top_onclick').style.bottom = 0 + 'px';
//Set width
document.getElementById('mega_hmainbody').style.width = wbody + 'px';
document.getElementById('mega_hfooter').style.width = wbody + 'px';
document.getElementById('mega_wwrapper').style.height = winH*2 + 160 + 73 + 'px';
}else if((document.getElementById('mega_hbanner') == null) && (document.getElementById('mega_hextend1') != null) && (document.getElementById('mega_hextend2') == null)){
//Main body
document.getElementById('mega_hmainbody').style.height = winH + 80 + 'px';
document.getElementById('mega_hmainbody').style.top = winH + 80 + 'px';
//Footer
document.getElementById('mega_hfooter').style.height = winH + 80 + 'px';
document.getElementById('mega_hfooter').style.top = winH*2 + 160 + 'px';
document.getElementById('mega_top_onclick').style.bottom = 0 + 'px';
//Set width
document.getElementById('mega_hmainbody').style.width = wbody + 'px';
document.getElementById('mega_hfooter').style.width = wbody + 'px';
document.getElementById('mega_wwrapper').style.height = winH*2 + 160 + 73 + 'px';
}else if((document.getElementById('mega_hbanner') == null) && (document.getElementById('mega_hextend1') == null) && (document.getElementById('mega_hextend2') == null)){
//Main body
document.getElementById('mega_hmainbody').style.height = winH + 80 + 'px';
//Footer
document.getElementById('mega_hfooter').style.height = winH + 80 + 'px';
document.getElementById('mega_hfooter').style.top = winH + 80 + 'px';
document.getElementById('mega_top_onclick').style.bottom = 0 + 'px';
//Set width
document.getElementById('mega_hmainbody').style.width = wbody + 'px';
document.getElementById('mega_hfooter').style.width = wbody + 'px';
document.getElementById('mega_wwrapper').style.height = winH*2 + 80 + 73 + 'px';
}
}
window.addEvent ('load', function() {
equalSize();
});