First I cant answer this without stating that Philip, George, Sarah or Michael wont thank you for making their passwords visible in this way:
var pwArray = [Password1, Password2, Password3, Password4];
As others have said: If you were to code a page like this there is no point in using passwords as they would be visible to all users of the page.
However given the method you have used so far, you could do the following
var pwLocation = [location1, location2, location3, location4]; window.location = pwLocation[i];
To answer you question :
Use if statment to redirect each user to specific page based on their user name , for example if username is jamson then redirect jamson to his own page using the location where his page is found.
still this method is ardous if you have thousandth of users.
To answer your question though, change the line that says:
window.location = http://www.google.com;, to
window.location = un.toLowerCase()+.html;.