Calling javascript

Hi all, I’m in need of a little help…

I’ve written this little javascript:


<script type="text/javascript">
var myvar;
function barkie() {
  document.getElementById('barkie1').style.display = 'none';
  document.getElementById('barkie2').style.display = 'none';
  document.getElementById('barkie3').style.display = 'none';
}
function showBarkie (i) {
  barkie();
  if (myvar == i) {
        document.getElementById(i).style.display = 'none';
        myvar = '';
    }
  else {
        document.getElementById(i).style.display = 'block';
        myvar = i;
    }
}
</script>

<body onload="barkie();">

Simply what this code does; it makes all divs invisible.
So when I use click, the div Barkie 1 appears correctly.

Now my problem is that I want my swf to be calling the javascript.

In flash 8 I made a button called launchScript and on frame 1 I put this Actionscript:


launchScript.onRelease = function() {
    getURL("javascript:showBarkie('barkie1')");
}

When I click the button in my browser, nothing happens.
Also I’ve tried doing it with on(release) … directly on the button, but here also nothing happens.

I did check google on this and so far I’ve found stuff about ExternalCall or something, but I’m 100% sure That calling a javascript from a swf does work with a ‘basic’ getUrl.

Someone here who could help me with this?