functions scope.

functions scope.

if i have a function...
 
function alert_function(){
alert('dave');
}
 
I can call this function from any other javscript code i write...
however if i wrap that funciton within a
 
$(document).ready()
function alert_function(){
alert('dave');
}
})
 
I can no longer trigger that function from external javascript...
how can i make it so that i can still trigger that function from external scripts..
kind regards J