I am trying to make a widget for the website I'm building. I want it so when people change the color for the background it changes when the file is inported out of the .js file.

Example Code: (This is what I want to get working)

HTML Code:
<SCRIPT language="JavaScript">
bg_color = "#FFFFFF";
<SCRIPT TYPE="text/javascript" SRC="http://www2.domainname.com/file/file.js"></SCRIPT>
Now all I need is the codes that go into the Javascript file itself I made this but it does not work.

This is what is not working to make the other code work.

HTML Code:
function stamp(bg_color) {

document.write("<body bgcolor= "+ bg_color + ", ");
Any help would be great!