Change the background image and making it stay on every page
<p>I have created a site where the user can change the image of a page from 4 available imges(which works fine), but when you go to another page, the image changes back to the default. </p>

<p>I'm new at Javascript and trying to create an if else statement but I can't seem to get it to work.</p>

<p>This is something I am after:</p>

<pre><code>if (currentpage == body.style.backgroundImage="url('image1.png')")
 {
   allotherpages == body.style.backgroundImage="url('image1.png')";
 }
else if (currentpage == body.style.backgroundImage="url('image2.png')")
 {
   allotherpages == body.style.backgroundImage="url('image2.png')";
 }
</code></pre>

<p>I would appreciate any help or a point in the right direction. Thank you. </p>
