Although you can prefix your paths with "/" to map to the domain root, domain root does not always equal application root in ASP.NET. It also makes your scripts fragile if the structure of your development environment doesn't match your production environment.
Instead, use:
var arrowImages = { down: ['downarrowclass', '<%= Page.ResolveClientUrl("~/images/AppNavDownArrow.gif") %>', 23], right: ['rightarrowclass', '<%= Page.ResolveClientUrl("~/images/AppNavRightArrow.gif") %>'] }
That will ensure that your paths point to the root of the current application context in IIS, be that the domain root or a virtual directory.
If you don't want to put the script on your page and keep it in a .js file instead, in your masterpage/layout/whatever, create a variable that points to your application root and then reference that variable in your script file:
<script type="text/javascript">
var configuration = {
applicationRoot: '<%= Page.ResolveClientUrl("~/") %>',
currentPath: '<%= HttpContext.Current.Request.Path %>'
}
</script>
In your script file:
var arrowImages = { down: ['downarrowclass', configuration.applicationRoot +'/images/AppNavDownArrow.gif', 23], right: ['rightarrowclass', configuration.applicationRoot +'/images/AppNavRightArrow.gif'] }