JavaScript Menu as Include in ASP.NET Master

I am using a JavaScript menu as an include file being called into a master file in ASP.NET. The problem is with the images. Because I have web pages in various folders I have to put copies of the 3 png images in each folder. Does anyone know of a way to modify the code so it will pull the images from a central image folder regardless of the folder level of the pages?

I do this with images in the master files with the following:

<asp:image runat="server" ImageURL="~/images/imagename.gif" alt="imagename" />

The code in the script for the menu calls the images in a string like this:

temp2.style.backgroundImage = (cookieArray.length>0)?((cookieArray[cookieCount]=="true")?"url(minus.png)":"url(plus.png)"):"url(plus.png)";

So again, the question is how do I modify this string, and others like it, in order to get the images to work regardless of the folder level of the pages?

Thanks!
 
Back
Top