Whats wrong with my Javascript?
<p>I have this bit of javascript and php:</p>

<pre><code>function change(){

var heading = "&lt;?= $heading ?&gt;";
var description = "&lt;?= $description ?&gt;";
var valid = "&lt;?= $valid ?&gt;";
var background = "&lt;?= $background ?&gt;";
alert("hi");
    switch(background){
        case 1:
        document.getElementById('main').style.backgroundImage = "(url"img/bg1.jpg")";
        break;

        case 2:

        break;

        case 3:

        break;

        default:
        break;
    }
}
</code></pre>

<p>If I remove the case 1, the line: <code>document.getElementById('main').style.backgroundImage = "(url"img/bg1.jpg")";</code> the function will work, I'll get the hi alert. But if its in there it doesn't work at all. But I've used that line of code before and its worked, why does it cause this script to stop working?</p>

<p>TIA</p>
