/******* LinkRotate - Randomly select a URL for one or more specific links, each time the document loads. Demonstration and further details at http://scripterlative.com?linkrotate The following instructions may be removed, but not the above text. Please notify any suspected errors in this text or code, however minor. Description ~~~~~~~~~~~ Each time the document loads, LinkRotate will select a random URL for a specified link from a supplied list. LinkRotate can be used on multiple links in the same document, each with its own list of URLs. Where cookie support is available, there is no consecutive reselection of a URL. When an involved link is hovered, its currently selected URL is displayed in the Title Bar, along with a supplied text description pertinent to the range of selectable URLs. LinkRotate does not require any modification to the HTML, save that all involved links are given a name attribute. Installation ~~~~~~~~~~~~ Save this text/file as 'linkrotate.js' and place it in a suitable folder. In the section of your HTML document, add the following: Configuration ~~~~~~~~~~~~~ As well as being required for validation, to enable title bar modification, the document must have a title element in the section, i.e. My Website Ensure that each involved link has a unique 'name' attribute. Each link is configured by a call to the function LinkRotate.init(), passing parameters as described below. Example usage will follow. First parameter - The 'name' of the pertinent link. Second parameter - A text description pertaining to the range of selectable URLs. All subsequent parameters form the list of URLs from which a random selection is made. Example ------- A link with the name attribute 'rotator' will use the text description: 'One of a selection of search engines', and it will select from these URLs: "http://google.com", "http://search.yahoo.com" and "http://ask.com". At a point in the section BELOW all the links, insert the following: NOTE - Title Bar Display ------------------------ To prevent possible 'access denied' errors, by default the script writes to the title bar of its own document, which has no visible effect if the script is within a framed document. Under such circumstances, provided that all parent frames are in the same domain, writing to the title bar can be restored thus: Anywhere within the above