If the variable is really global you can access it via global.name even if there are collisions with a local variable. For example
// notice there is not "var" here
variable = 'global';
function someScope() {
var variable = 'local';
console.log(variable); // local
console.log(global.variable); // global
}
someScope();
However, if you define your variable with "var" at the top of the file (as you have it in your code) then it won't be global and you will get different results (i.e. global.variable will print undefined.)