The first time you load the page, the code in JavaScript gathers the screen resolution, puts them into two variables and reload itself while submitting these variables to itself, then it will be able to read the variable values in the ASP code and write them into the text file.
So you are...