Well, the general way you get the value of a parameter is this:
Code:
<script type="text/javascript">
var pageParams = [];
if ( location.search.length > 1 )
{
var pairs = location.search.substring(1).split("&");
for ( var p = 0; p < pairs.length; ++p )
{
var pair = pairs[p].split("=");
if ( pair.length > 0 )
{
pageParams[ pair[0] ] = decodeURIComponent( pair[1] );
}
}
}
</script>
Now, any time you need that value of a querystring parameter, you just code
Code:
pageParams["endpage"]
(as an example).
So you could, for example, create the <A> tags you wanted thus:
Code:
<script type="text/javascript">
document.write('<a href="PageC.html?endpage=' + pageParams["endpage"] + '">Page C</a>');
...
document.write('<a href="' + pageParams["endpage"] + '">End Page</a>');
...
</script>
But there are other ways to do the equivalent, using DOM modifications instead of document.write.