EvalScript runs in the global scope. So when you use "var myVar", it does create global variable myVar. If that's not desired, you can use local function to limit the scope. For example:
Code: C#
EvalScript(@"
var evalFx = function()
{
var priceBox = document.getElementById('priceBox');
return priceBox == null || priceBox.offsetParent == null;
};
evalFx();");
The above code defines an anonymous function evalFx and then call it. variable "evalFx" is still global but all other variables are inside the anonymous function.