function checkbr()
{
       var cookie = " " + document.cookie;
       var search = " LibLoc=";
       var myLoc = 99;
       var offset = 0;
       var end = 0;
       if (cookie.length > 0) {
               offset = cookie.indexOf(search);
               if (offset != -1) {
                       offset += search.length;
                       end = cookie.indexOf(";", offset)
                       if (end == -1) {
                               end = cookie.length;
                       }
                       myLoc = unescape(cookie.substring(offset, end));
               }
	};
	var jbr = 99;
	var ip = document.queryscreen.myip.value;
	var ips = ip.split (".");
	var thisrange = ips[0] + "." + ips[1] + "." + ips[2] + ".";
	var thisip = ips[0] + "." + ips[1] + "." + ips[2] + "." + ips[3];

	if (thisrange == "156.29.127." || thisrange == "156.29.128." || thisip == "10.9.9.14") {
		jbr = 88
		document.queryscreen.here.value = "8888"
	};
	if (thisrange == "156.29.126." || thisrange == "10.21.0." || thisrange == "10.21.1.") {	/* Central Library */
		jbr = 0
		document.queryscreen.here.value = "0201"
	};
	if (thisip == "98.173.36.135" || thisip == "10.33.10.83") {	/* Central Library */
		jbr = 0
		document.queryscreen.here.value = "0201"
	};
	if (thisip == "72.214.5.167" || thisrange == "10.21.32.") {	/* Allied Gardens/Benjamin */
		jbr = 1
		document.queryscreen.here.value = "0204"
	};
	if (thisip == "66.27.52.134" || thisrange == "10.21.17.") {	/* Balboa */
		jbr = 2
		document.queryscreen.here.value = "0202"
	};
	if (thisip == "66.27.52.138" || thisrange == "10.21.13.") {	/* Carmel Mountain Ranch */
		jbr = 3
		document.queryscreen.here.value = "0206"
	};
	if (thisip == "66.27.52.142" || thisrange == "10.21.23.") {	/* Carmel Valley */
		jbr = 4
		document.queryscreen.here.value = "0218"
	};
	if (thisip == "68.15.29.164" || thisrange == "10.21.34.") {	/* City Heights */
		jbr = 5
		document.queryscreen.here.value = "0209"
	};
	if (thisip == "66.27.52.146" || thisrange == "10.21.30.") {	/* Clairemont */
		jbr = 6
		document.queryscreen.here.value = "0207"
	};
	if (thisip == "98.173.35.18" || thisrange == "10.21.24.") {	/* College-Rolando */
		jbr = 7
		document.queryscreen.here.value = "0208"
	};
	if (thisip == "70.166.7.194" || thisrange == "10.21.26.") {	/* Kensington */
		jbr = 8
		document.queryscreen.here.value = "0217"
	};
	if (thisip == "66.27.48.50" || thisrange == "10.21.21.") {	/* La Jolla */
		jbr = 9
		document.queryscreen.here.value = "0211"
	};
	if (thisip == "66.27.52.154" || thisrange == "10.21.15.") {	/* Linda Vista */
		jbr = 10
		document.queryscreen.here.value = "0212"
	};
	if (thisip == "98.173.35.115" || thisrange == "10.21.27.") {	/* Logan Heights */
		jbr = 11
		document.queryscreen.here.value = "0214"
	};
	if (thisip == "66.27.52.158" || thisrange == "10.21.10.") {	/* Mira Mesa */
		jbr = 12
		document.queryscreen.here.value = "0215"
	};
	if (thisip == "68.105.255.20" || thisrange == "10.21.12.") {	/* Mission Hills */
		jbr = 13
		document.queryscreen.here.value = "0216"
	};
	if (thisip == "66.27.52.190" || thisrange == "10.21.35.") {	/* Mission Valley */
		jbr = 14
		document.queryscreen.here.value = "0245"
	};
	if (thisip == "98.173.39.130" || thisrange == "10.21.8.") {	/* Mountain View/Beckwourth */
		jbr = 15
		document.queryscreen.here.value = "0203"
	};
	if (thisip == "66.27.52.162" || thisrange == "10.21.31.") {	/* North Clairemont */
		jbr = 16
		document.queryscreen.here.value = "0219"
	};
	if (thisip == "70.166.7.178" || thisrange == "10.21.2.") {	/* North Park */
		jbr = 17
		document.queryscreen.here.value = "0220"
	};
	if (thisip == "67.52.155.130" || thisrange == "10.21.38.") {	/* North University Community */
		jbr = 18
		document.queryscreen.here.value = "0247"
	};
	if (thisip == "72.214.1.98" || thisrange == "10.21.19.") {	/* Oak Park */
		jbr = 19
		document.queryscreen.here.value = "0221"
	};
	if (thisip == "98.173.45.98" || thisip == "68.15.8.133" || thisrange == "10.21.25.") {	/* Ocean Beach */
		jbr = 20
		document.queryscreen.here.value = "0222"
	};
	if (thisip == "72.214.9.66" || thisrange == "10.21.29.") {	/* Otay Mesa-Nestor */
		jbr = 21
		document.queryscreen.here.value = "0223"
	};
	if (thisip == "66.27.48.94" || thisrange == "10.21.33.") {	/* Pacific Beach */
		jbr = 22
		document.queryscreen.here.value = "0224"
	};
	if (thisip == "70.166.7.12" || thisrange == "10.21.18.") {	/* Paradise Hills */
		jbr = 23
		document.queryscreen.here.value = "0225"
	};
	if (thisip == "68.15.17.185" || thisrange == "10.21.9.") {	/* Point Loma */
		jbr = 24
		document.queryscreen.here.value = "0226"
	};
	if (thisip == "66.27.52.166" || thisrange == "10.21.3.") {	/* Rancho Bernardo */
		jbr = 25
		document.queryscreen.here.value = "0227"
	};
	if (thisip == "66.27.52.170" || thisrange == "10.21.6.") {	/* Rancho Penasquitos */
		jbr = 26
		document.queryscreen.here.value = "0228"
	};
	if (thisip == "70.166.10.171" || thisrange == "10.21.4.") {	/* San Carlos */
		jbr = 27
		document.queryscreen.here.value = "0229"
	};
	if (thisip == "72.214.17.50" || thisrange == "10.21.28.") {	/* San Ysidro */
		jbr = 28
		document.queryscreen.here.value = "0230"
	};
	if (thisip == "66.27.52.174" || thisrange == "10.21.7.") {	/* Scripps Miramar Ranch */
		jbr = 29
		document.queryscreen.here.value = "0231"
	};
	if (thisip == "74.62.16.82" || thisrange == "10.21.14.") {	/* Serra Mesa */
		jbr = 30
		document.queryscreen.here.value = "0232"
	};
	if (thisip == "72.214.2.146" || thisip == "24.249.200.35" || thisrange == "10.21.20.") {	/* Skyline */
		jbr = 31
		document.queryscreen.here.value = "0233"
	};
	if (thisip == "66.27.52.182" || thisrange == "10.21.11.") {	/* Tierrasanta */
		jbr = 32
		document.queryscreen.here.value = "0234"
	};
	if (thisip == "66.27.52.186" || thisrange == "10.21.5.") {	/* University Community */
		jbr = 33
		document.queryscreen.here.value = "0235"
	};
	if (thisip == "98.173.39.182" || thisrange == "10.21.22.") {	/* University Heights */
		jbr = 34
		document.queryscreen.here.value = "0236"
	};
	if (thisip == "70.166.28.71" || thisrange == "10.21.16.") {	/* Valencia Park/Malcolm X */
		jbr = 35
		document.queryscreen.here.value = "0237"
	};

	if (jbr == 99 || jbr == 88) {
		document.queryscreen.saveloc.style.display="inline"
		document.write("&nbsp;<SPAN style='font-size: 9pt'>Check here to save your selection</span>")
	}
	else {
		document.queryscreen.saveloc.style.display="none"
	};

	if (jbr == 99 || jbr == 88) {
		if (myLoc != 99) { jbr = myLoc };
	};

	if (jbr == 99 || jbr == 88) {
		jbr = 0
	};

	document.queryscreen.setting_key.options[jbr].selected = "true";
}
