actually what you're doing is creating a wshnetwork object in javascript code and showing properties of that object to the user.
WSH » Objects » wshnetwork - DevGuru Quick Reference ActiveXObject Object
you really want to use server side code to complete this task because the server will always show the public ip given by the isp as opposed to the private ip given by the home router or set by the user.