Assume the base URL of the page is:
http://abc.sesta.com/page.html
Page Content
<script> menu.addItem(new NavBarMenuItem("All Available Information","JavaScript:top.location=\qhttp://abc.sesta.com\q")); </script>
Rules
<Function type="DJS" name="NavBarMenuItem" paramPatterns=",y"/> <Variable type="URL" name="top.location"/>
Output
<script> menu.addItem(new NavBarMenuItem("All Available Information", "JavaScript:top.location=\qgateway-URL/ http://abc.sesta.com\q")); </script>
Description
The first rule specifies that the second parameter of the function NavBarMenuItem which contains JavaScript needs is to be rewritten. Within the JavaScript, the variable top.location also needs to be rewritten. This variable is rewritten using the second rule.