This is the script I am using

Code:
  <script language="JavaScript">
<!--
width=screen.width;

if(width<1024)
  table_width="98%";
else if(width<1152)
  table_width="96%";
else if(width<1280)
  table_width="94%";
else if(width<1600)
  table_width="92%";
else
  table_width="88%";

//-->
  </script>

<script language="javascript">document.write("<div style=\"width: "+table_width+";\">")</script>
Keeps on giving me error expeted ')'

Can some suggest or help please