I'm new to this forum, but maybe somebody (anybody!!!) out there could help me with a Javascript error I'm getting.

Except for the javascript error I'm getting when I link directly to this page the javascript is working perfectly.

If possible it would also be great to get the javascript in the URL string to anchor down to the expanded content on the next page.


========index.cfm page containing URL strings that will open the expandable content area on another page===========


Pass the variable on this page.<br /><br />

<a href="go-here2.cfm#expandAnchor0?menuName=menu0&menuTotal=0&id=0">Click here to see content 1</a>
<br /><br />
<a href="go-here2.cfm#expandAnchor1?menuName=menu1&menuTotal=1&id=1">Click here to see content 2</a>
<br /><br />
<a href="go-here2.cfm#expandAnchor2?menuName=menu2&menuTotal=2&id=2">Click here to see content 3</a>





========go-here2.cfm page which contains the expandable content sections===========


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
<title>Untitled</title>

<script language="JavaScript">

function parseQueryString(queryString) {
var queryObject = new Object();
queryString = queryString.replace(/^.*\?(.+)$/,'$1');

while ((pair = queryString.match(/([^=]+)=\'?([^\&\']*)\'?\&?/)) && pair[0].length) {
queryString = queryString.substring( pair[0].length );

if (/^\-?\d+$/.test(pair[2])) pair[2] = parseInt(pair[2]);
queryObject[pair[1]] = pair[2];
}
return queryObject;
}

// Expandable Navigation Javascript

if (document.getElementById && document.createTextNode) {canDOM=true}

if (canDOM) {
document.write('<style type="text/css">.domhidden{display:none;}</style>')
}

if (location.search) {
showContent=true;
}

if (showContent) {
var queryObj = parseQueryString( location.search );
document.write ( queryObj.menuName ); // will alert the text: joe
document.write ( queryObj.menuTotal ); // will alert the text: acme
aname = (queryObj.menuName);
am = (queryObj.menuTotal);

}

function DOMGetElement(xx)
{
if (document.getElementById) return document.getElementById(xx);
return nul;
}

function showmenu(name, m)
{
var ii;
var qq;
var stoNames;

HLMenu = new Array(m+1);
HLName = new Array(m+1);
for (ii=0; ii<=m; ii++) {
stoNames="menu" + ii;
HLName[ii]=stoNames;
if (name) {
if (stoNames==name) qq=ii;
}
}

if (document.getElementById) {
if (name) {
var Menu = DOMGetElement(name);
Menu.style.display='block';
}
for (ii=0; ii<=m; ii++) {
if (ii!=qq) {
HLMenu[ii] = DOMGetElement(HLName[ii]);
HLMenu[ii].style.display='none';
}
}
return true;
}

if (document.layers) {
alert ("We're sorry, but your browser is not optimized to display this page correctly. We suggest you upgrade your version of Netscape to Netscape 7.1.");
return true;
}
}
</script>

</head>

HI

<body onload="showmenu(aname,am);">
<br><br><br>


<a id="expandAnchor0" name="expandAnchor0"></a>
<a class="expandTitle" onclick="showmenu('menu0','2')" href="go-here2.cfm#expandAnchor0">PLACE TITLE HERE</a><br /><br />
<div class="domhidden" id="menu0">
PLACE EXPANDABLE CONTENT HERE
</div>

<a id="expandAnchor1" name="expandAnchor1"></a>
<a class="expandTitle" onclick="showmenu('menu1','2')" href="go-here2.cfm#expandAnchor1">PLACE TITLE HERE</a><br /><br />
<div class="domhidden" id="menu1">
PLACE EXPANDABLE CONTENT HERE
</div>

<a id="expandAnchor2" name="expandAnchor2"></a>
<a class="expandTitle" onclick="showmenu('menu2','2')" href="go-here2.cfm#expandAnchor2">PLACE TITLE HERE</a><br /><br />
<div class="domhidden" id="menu2">
PLACE EXPANDABLE CONTENT HERE
</div>



</body>
</html>