// This will work in Safari. function Foo(){ alert("In Foo Method"); function Bar(){ alert("In Bar Method"); } Bar(); } Foo();