Hello-

I am using Flash, and am using an else/if statement to substitute content if the user's browser does not have Flash. I am having an issue with the Syntax, and I can't figure out how to fix it, any help would be greatly appreciated! Thanks! I'm not an HTML expert...

I want to add the code as an alternative content:

<div id="swiffycontainer" style="width: 950px; height: 480px">
</div>
<script>

var stage = new swiffy.Stage(document.getElementById('swiffycontainer'),
swiffyobject);

stage.start();
</script>

I want to add this above code into the HTML below:

} else { // flash is too old or we can't detect the plugin
var alternateContent = 'I WANT TO PUT THE ABOVE CODE HERE'
+ '';
document.write(alternateContent); // insert non-flash content
}

But, when I add this code, I am getting a syntax error on the second line starting with "var alternateContent"

How can I correct?

Here is the code with the syntax error:

} else { // flash is too old or we can't detect the plugin
var alternateContent = '<div id="swiffycontainer" style="width: 950px; height: 480px">
</div>
<script>

var stage = new swiffy.Stage(document.getElementById('swiffycontainer'),
swiffyobject);

stage.start();
</script>'
+ '';
document.write(alternateContent); // insert non-flash content
}
}