// xClientWidth r5, Copyright 2001-2007 Michael Foster (Cross-Browser.com)

// Part of X, a Cross-Browser Javascript Library, Distributed under the terms of the GNU LGPL



function xClientWidth()

{

  var v=0,d=document,w=window;

  if((!d.compatMode || d.compatMode == 'CSS1Compat') && !w.opera && d.documentElement && d.documentElement.clientWidth)

    {v=d.documentElement.clientWidth;}

  else if(d.body && d.body.clientWidth)

    {v=d.body.clientWidth;}

  else if(xDef(w.innerWidth,w.innerHeight,d.height)) {

    v=w.innerWidth;

    if(d.height>w.innerHeight) v-=16;

  }

  return v;

}


