function $(id)   { return document.getElementById(id); }

function ie_min_width()
{ 
  if (/MSIE (5|6).+Win/.test(navigator.userAgent))
  {
    sObj = document.getElementsByTagName("body")[0].style; 
    sObj.width = (document.documentElement.clientWidth < 1000) ? "1000px" : "100%"; 

    if( document.body.clientWidth && $('page') && $('footer') )
      if( document.body.clientWidth < 1000 )
      {
        $("page").style.width   = "1000px" ;
        $("footer").style.width = "1000px" ;
      }
      else
      {
        $("page").style.width = "100%" ;
        $("footer").style.width = "100%" ;
      }
  }
} 

if (window.attachEvent && navigator.userAgent.indexOf("Opera")==-1) 
{
  window.attachEvent("onload",   ie_min_width);
  window.attachEvent("onresize", ie_min_width);
}
