PAC file issues

Having problems making IE 9 read the following PAC file. Can anyone see where my problem(s) lie in this syntax:

function FindProxyForURL(url,host)
// set ws1 and ws2 to the 2 proxies
var ws1=""
var ws2=""
// find the 4th octet - if even, is ws1/ws2 else ws2/ws1
var myip=myIpAddress()
var ipbits=myip.split(".")
var myseg=parseInt(ipbits[3])
if(myseg==Math.floor(myseg/2)*2) {
      var proxone=ws1
      var proxtwo=ws2
else {
      var proxone=ws2
      var proxtwo=ws1
// if name has no dots, or is our domain, or starts 172., or if my
// current address does not start 10. don't use proxy
if(isPlainHostName(host) ||
      dnsDomainIs(host,"") ||
      myip.substring(0,3)!=="10." ||
      host.substring(0,3)=="172."      )
// alert("direct")
return "DIRECT";
else {
// alert("proxy")
      return "PROXY "+proxone+":8080; PROXY "+proxtwo+":8080" ;
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

cowarlickAuthor Commented:
Have gone to a basic PAC file to see if maybe it is another issue. It still does not work. See code below:
function FindProxyForURL(url, host)
  return "PROXY";
Have attempted to use this pac file locally via file://C:/pxy/proxy.pac in both IE9, IE10, and firefox with no luck. Am I missing something?
cowarlickAuthor Commented:
I have discovered my problem. The pac file was not in ANSI, which is required for IE and Firefox to read it.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Internet Protocols

From novice to tech pro — start learning today.