Test if a javascript function has been defined before calling it
on Thursday 16th April, 2009 Gabe speculated thusly…
if (typeof yourFunctionName == 'function')
{
yourFunctionName();
}
if (typeof yourFunctionName == 'function')
{
yourFunctionName();
}