Added javascript 'loc' variable