function FindProxyForURL(url, host) { if (isPlainHostName(host) || dnsDomainIs(host, ".aub.edu.lb") || dnsDomainIs(host, ".intmed.aubmc.org.lb") || dnsDomainIs(host, ".aubmc.org.lb") || dnsDomainIs(host, ".aubmc.org") || dnsDomainIs(host, ".comskills.info") || dnsDomainIs(host, ".solvemyproblem.net") || localHostOrDomainIs(host,"www1.aubmc.org.lb") ) return "DIRECT"; else if (isIpHost(host)) { if (isInNet(host, "192.168.0.0", "255.255.0.0") || isInNet(host, "193.188.129.0", "255.255.255.0")|| isInNet(host, "193.188.128.0", "255.255.255.0") || isInNet(host, "193.188.130.0", "255.255.255.0") || isInNet(host, "127.0.0.1", "255.255.255.255")) { return "DIRECT"; } else return "PROXY proxya.aub.edu.lb:3128; " + "PROXY proxy1.aub.edu.lb:3128; " + "PROXY proxy2.aub.edu.lb:3128; " + "PROXY proxy3.aub.edu.lb:3128"; } else return "PROXY proxya.aub.edu.lb:3128; " + "PROXY proxy1.aub.edu.lb:3128; " + "PROXY proxy2.aub.edu.lb:3128; " + "PROXY proxy3.aub.edu.lb:3128"; } function isIpHost(host){ var MyQuad = host.split("."); if (MyQuad.length != 4){ return false; } for (var i = 0; i < MyQuad.length; i++) { if (parseInt (MyQuad[i]) >= 0) { } else { return false; } } return true; }