javascript to separate file