I have an external script.
On my web page I try to call it this way:
Code:
<script type='text/javascript' src="http://www.bizmox-systems.com/mhra/icon.js" >
followed by this function:
Code:
function toggle_dynmenu(id)  {
	if (GetElementById(id + '_sub')) {
		var dom = GetElementById(id + '_sub').style.display;
		if (dom == 'none') {
			GetElementById(id + '_sub').style.display = 'inline';
			GetElementById(id + '_sign').src   = 'mhra/minus.gif';
			GetElementById(id + '_folder').src = 'mhra/tree_open.gif';
		} else if (dom == 'inline') {
			GetElementById(id + '_sub').style.display = 'none';
			GetElementById(id + '_sign').src   = 'mhra/plus.gif';
			GetElementById(id + '_folder').src = 'mhra/tree_close.gif';
		}
	}
}
</script>
then there is some html code icluding;
and then the following:

Code:
<script type='text/javascript'>
toggle_dynmenu('Internet');
toggle_dynmenu('forum');
toggle_dynmenu('macro');
toggle_dynmenu('perl');
</script>
I am trying to call the toggle_dynmenu function at the top which uses functions and variables in an external script. Is this possible?