function checkEnvVars(){function compareData(fileData){var environment,difference=[],query={varList:[]};fileData.forEach(function(key){query.varList.push(key.name)});try{environment=JSON.parse(gSTB.GetEnv(JSON.stringify(query))).result}catch(e){echo(e,"env parse error"),environment=[]}return fileData.forEach(function(key){(void 0===environment[key.name]||environment[key.name]!==key.value)&&difference.push({name:key.name,value:key.value})}),difference}function parseFileData(response){var tmpArr,name,value,valPos,i,data=[];if(response)for(tmpArr=response.split("\n"),i=0;i<tmpArr.length;i++)valPos=tmpArr[i].indexOf("="),-1===tmpArr[i].indexOf(";")&&-1!==valPos&&(name=tmpArr[i].substring(0,valPos),value=tmpArr[i].substring(valPos+1),""!==name&&data.push({name:name,value:value}));return data}function setNewData(dataForChange){var newData={};dataForChange.length&&(dataForChange.forEach(function(key){newData[key.name]=key.value}),gSTB.SetEnv(JSON.stringify(newData)))}echo("checkEnvVars");var xhr,responseData;return xhr=new XMLHttpRequest,xhr.open("post",PATH_SYSTEM+"variables/vars.ini",!1),xhr.send(),echo(xhr.status,"xhr.status"),echo(xhr.responseText,"xhr.responseText"),responseData=parseFileData(xhr.responseText),responseData=compareData(responseData),setNewData(responseData),!0}