function isdefined( variable) { return (typeof(window[variable]) == “undefined”)? false: true; } Javascript IsDefined Function