I am playing with using WPAD.DAT to get the proxy settings and its working in a sense the first if works ie if its localy hosted don't use proxy, also the last/end return works. i cant get it to work on client ip. i have a section of ips 10.7.58.x that are reserved for networking kit and admin workstations so i was hoping to use WPAD to redirect them over another unfiltered proxy. and well i just can't see what im doing wrong :S i based some of my code on this site. http://www.novell.com/coolsolutions/feature/7949.html
anyone done anything like this before or know a way to see what the myIpAddress function is returning?

function FindProxyForURL(url, host) {
	var myip=myIpAddress();
	var ipbits=myip.split(".");
	var myseg=parseInt(ipbits[2]);
     if (isInNet(host, "", "")) {
        return "DIRECT";}
	//if (shExpMatch(host, "*microsoft.com*")){
     // return "PROXY unfilteredproxy:8080";}

    	//if (isInNet(myIpAddress(), "", "")) {
       // return "PROXY unfilteredproxy:8080";}
	if (myseg == 58) {
	 return "PROXY unfilteredproxy:8080; DIRECT";}

     return "PROXY proxy:8080; DIRECT";