ok i finally found a work around for this. It took me forever to get the qoutes right.
If you want to put a pic on a web and have it as some % of the screen width. Say for like a banner. Use the code below inside of an echo.
with this, the document.write is surrounded by " marks. all other quotes inside of that are '
EXCEPT the marks around the screen_width variable when its used in the img line. Here you need to put the screen_width inside " marks then inside ' marks
<script language=\"JavaScript1.2\">
<!--\
screen_width = screen.width*.95;
screen_height = screen.height;
document.write(\"<center><img width='\"+screen_width+\"' src='http://www.website.com/photo.jpg'><\center>\");
// -->\
</script>