AS -> Javascript

I’m trying to include a simple action script command to send a string that contains ‘flashDiv’ to a javascript function hideFlash().

I have the code:

import flash.external.*;
function() {
ExternalInterface.call("hideFlash","flashDiv");
}

but i get all kinds of errors. i threw this little thing together based off information i found on some tutorial on writing from flash to JS. doesn’t seem to work =(