Functions

OK, I don’t use javascript much but basically I’ve created the following function and it’s not working…

function randompic(passednumber) {	 maincell2.style.backgroundImage='url(bgimages/bgimage_[passednumber].jpg)';
}

And I’m using the following code to access it:

<a href="JavaScript: randompic('3');">Randomize

[url=“javascript%3Cb%3E%3C/b%3E:%20randompic%28%273%27%29;”]

I’m pretty sure it’s the “[passednumber]” bit that I’m messing up so if anyone has any ideas, I’d really appreciated it.

P.S. 200 POSTS!