var scrollbarWidth,x,y,msiewidth;	

function getScrollerWidth() {
		
    var scr = null;
    var inn = null;
    var wNoScroll = 0;
    var wScroll = 0;

   
    scr = document.createElement('div');
    scr.style.position = 'absolute';
    scr.style.top = '-1000px';
    scr.style.left = '-1000px';
    scr.style.width = '100px';
    scr.style.height = '50px';
    
    scr.style.overflow = 'hidden';

   
    inn = document.createElement('div');
    inn.style.width = '100%';
    inn.style.height = '200px';

   
    scr.appendChild(inn);
    
    document.body.appendChild(scr);

   
    wNoScroll = inn.offsetWidth;
   
    scr.style.overflow = 'auto';
   
    wScroll = inn.offsetWidth;

    
    document.body.removeChild(
        document.body.lastChild);

   
    
    var scrollWidth=(wNoScroll - wScroll);
    
    if(scrollWidth==0)scrollWidth=msiewidth;
    
    
    
    return scrollWidth;
}
		
function regenerateBottom(){
	if(self.innerWidth) 
    {	
    	x=self.innerWidth;
    	y=self.innerHeight; 
	}
	else if(document.documentElement && document.documentElement.clientHeight) 
	{		
    	x=document.documentElement.clientWidth;
    	y=document.documentElement.clientHeight;
    }
	else if(document.body) 
	{		
   		x=document.body.clientWidth; 
   		y=document.body.clientHeight; 
    }    
    document.getElementById('foot').style.width=x-scrollBarWidth+'px';
    document.getElementById('pageTop').style.width=x-scrollBarWidth+'px';
   
    if(navigator.appName=='Microsoft Internet Explorer')
    {
    	document.getElementById('contentPadding').style.height=y-222-49+'px';
    }
    else
    {
   		document.getElementById('contentPadding').style.minHeight=y-222-49+'px';
    }
   	
}
	
window.onresize=function(){
	regenerateBottom();
}
	
	
window.onload=function(){
		
	if(navigator.appName=='Microsoft Internet Explorer')
	{
		msiewidth=(function(){
		var a,t=document.forms.f.elements.t;
  		t.wrap='off';
  		a=t.offsetHeight;
  		t.wrap='soft';
  		a-=t.offsetHeight;
 		return a;
		})();
	}

	scrollBarWidth=getScrollerWidth();
		
	
		
	regenerateBottom();
		
}
	