// JavaScript Document - Resize Frame

var displayWidth, docMargin, TextAdjust, textAdjLeft, textAdjRight;

function setDivMargin(elem,eLeft, eWidth){
 document.getElementById('h'+elem).style.left=eLeft+'px'; 
 document.getElementById(elem).style.left=eLeft+'px'; 
 document.getElementById('f'+elem).style.left=eLeft+'px'; 
 document.getElementById('h'+elem).style.width=eWidth+'px'; 
 document.getElementById(elem).style.width=eWidth+'px'; 
 document.getElementById('f'+elem).style.width=eWidth+'px'; 
}

function setMargins(elem) {
 docMargin=0; textAdjust=0; textAdjLeft=0; textAdjRight=0; displayWidth=document.body.clientWidth; displayHeight=document.body.clientHeight; if (displayWidth>=960) {docMargin=displayWidth/2-480;} 
 else if (displayWidth<600) {displayWidth=600;}
if (displayWidth<960){textAdjust=960-displayWidth;}
 
textAdjLeft=textAdjust*375/810; textAdjRight=(textAdjust-1)*436/810;
setDivMargin('LeftTabs',docMargin,55); 
setDivMargin('Menu',55+docMargin,375-textAdjLeft); 
setDivMargin('Binder',430+docMargin-textAdjLeft,50); 
setDivMargin('Content',480+docMargin-textAdjLeft,436-textAdjRight); 
setDivMargin('RightTabs',915+docMargin-textAdjust,45);

if (displayHeight>650) {document.getElementById('info').style.fontSizee='14';} else {document.getElementById('info').style.fontSize='10';}
document.getElementById('info').style.fontSize='16';
}

window.onresize = setMargins;setMargins();
