added external links js function