
function LBU_popUp(url) {
sealWin=window.open(url,"win",'toolbar=0,location=0,directories=0,status=1,menubar=1,scrollbars=1,resizable=1,width=500,height=450');
self.name = "mainWin";
}

function LBU_jumppage(newloc) {
	newpage = newloc.options[newloc.selectedIndex].value
	if (newpage != "") {
	window.location.href = newpage
	}
}

function LBU_jumppage(newloc) {
	newpage = newloc.options[newloc.selectedIndex].value
	if (newpage != "") {
	window.location.href = newpage
	}
}

function LBU_populate(sel,ary) {
 myArray = eval(ary)
 sel.length = 1;
 for (i = 0; i < myArray.length; i = i + 2) {
  var option1 = new Option(myArray[i + 1], myArray[i]);
  sel.options[sel.length] = option1;
 }        
 sel[0].selected = true;
}

function LBU_AddElement(objCity, txtValue, txtText, intx){
//	var objCity = document.frmSearch.vchCity;
	var oOption = document.createElement("OPTION");
	objCity.add(oOption);
	oOption.value= txtValue+"";
	oOption.text= txtText+"";
//	if (intx < 3) alert(oOption.value+", "+oOption.text+" - "+txtValue+" "+intx+"");
}
function LBU_RemoveElements(objCity){
//	var objCity = document.frmSearch.vchCity;
for (var i=(objCity.options.length-1); i>=0; i--) { 
               objCity.options[i] = null; 
               } 
        objCity.selectedIndex = -1; 
//	alert(objCity.length+" "+i);
}

function LBU_ArrayPopulate(vbarray, cnty, objCity){
//	var objCity = document.frmSearch.vchCity;
//	var county = document.frmSearch.vchArea[document.frmSearch.vchArea.selectedIndex].text.substring(0,7);
	var county = document.frmSearch.vchArea[document.frmSearch.vchArea.selectedIndex].text;
   var i;
   var j = 0;
   LBU_AddElement(objCity, "", "All "+county+" Communities", j++);
   for (i = 0; i < vbarray.length; i++){
   	if (vbarray[i] == cnty)
		LBU_AddElement(objCity, vbarray[i-1]+"", vbarray[i-1]+"", j++);
//		document.writeln(vbarray[i-1]);		
   }
//	alert(objCity.length);
}
function LBU_resetcity() {
	//this.form.vchArea.selectedIndex
	var cnty = (document.frmSearch.vchArea.value);
	var objCity = document.frmSearch.vchCity;
	if (cnty.length > 1){
		LBU_RemoveElements(objCity)
		LBU_ArrayPopulate(LBU_CreateVBArray(), cnty, objCity);
	}
}
function LBU_showcity() {
	var cnty = (document.frmSearch.vchArea.value);
	var city = (document.frmSearch.vchCity.value);
	alert(cnty+' '+city);
}
function LBU_CreateVBArray(){
	return new Array("Hayward","OT","Livermore","OT","Oakland","OT","Pleasanton","OT","San Leandro","OT","Tracy","OT","Union City","OT","Amador","AM","Fiddletown","AM","Ione","AM","Jackson","AM","Pine Grove","AM","Pioneer","AM","Plymouth","AM","River Pines","AM","Sutter Creek","AM","Volcano","AM","Burson","CA","Copperopolis","CA","Mokelumne Hill","CA","Mountain Ranch","CA","Murphys","CA","Rail Road Flat","CA","Rancho Calaveras","CA","San Andreas","CA","Vallecito","CA","Valley Springs","CA","Wallace","CA","West Point","CA","Wilseyville","CA","Arbuckle","CO","Colusa","CO","Logota","CO","Maxwell","CO","Princeton","CO","Stonyford","CO","Williams","CO","Brentwood","OT","Discovery Bay","OT","Knightsen","OT","Pittsburg","OT","San Pablo","OT","Cameron Park","EL","Camino","EL","Coloma","EL","Cool","EL","Diamond Springs","EL","El Dorado","EL","El Dorado Hills","EL","Fair Play","EL","Garden Valley","EL","Georgetown","EL","Greenwood","EL","Grizzly Flats","EL","Kelsey","EL","Kyburz","EL","Latrobe","EL","Lotus","EL","Mount Aukum","EL","Pacific House","EL","Pilot Hill","EL","Placerville","EL","Pollock Pines","EL","Rescue","EL","Shingle Springs","EL","Somerset","EL","South Lake Tahoe","EL","Strawberry","EL","Coulterville","MA","La Grange Unincorp","MA","Mariposa","MA","Atwater","ME","Ballico","ME","Delhi","ME","Dos Palos","ME","Gustine","ME","Hilmar","ME","Le Grand","ME","Livingston","ME","Los Banos","ME","Merced","ME","Planada","ME","Santa Nella","ME","Snelling","ME","Stevinson","ME","Turlock","ME","Winton","ME","Napa","NA","Alta Sierra","NE","Auburn Unincorp","NE","Grass Valley","NE","Lake Of The Pines","NE","Nevada City","NE","North San Juan","NE","Penn Valley","NE","Alturas","OT","Berry Creek","OT","Biggs","OT","Chilcoot","OT","Crescent City","OT","Gridley","OT","Lemoore","OT","Magalia","OT","Markleeville","OT","Mount Shasta","OT","Oroville","OT","Paso Robles","OT","Portola","OT","Red Bluff","OT","Salinas","OT","San Jose","OT","Tulare","OT","Unk","OT","Visalia","OT","Alta","PL","Applegate","PL","Auburn","PL","Baxter","PL","Blue Canyon","PL","Colfax","PL","Dutch Flat","PL","Elverta","PL","Emigrant Gap","PL","Foresthill","PL","Gold Run","PL","Granite Bay","PL","Iowa Hill","PL","Lincoln","PL","Loomis","PL","Meadow Vista","PL","Newcastle","PL","Ophir","PL","Penryn","PL","Pleasant Grove","PL","Rocklin","PL","Roseville","PL","Sheridan","PL","Tahoe City","PL","Weimar","PL","Antelope","SA","Carmichael","SA","Citrus Heights","SA","Courtland","SA","Elk Grove","SA","Fair Oaks","SA","Folsom","SA","Galt","SA","Gold River","SA","Herald","SA","Hood","SA","Isleton","SA","Mather","SA","North Highlands","SA","Orangevale","SA","Rancho Cordova","SA","Rancho Murieta","SA","Rio Linda","SA","Rio Vista","SA","Sacramento","SA","Sloughhouse","SA","Walnut Grove","SA","Wilton","SA","Acampo","SJ","Clements","SJ","Escalon","SJ","Farmington","SJ","French Camp","SJ","Holt","SJ","Lathrop","SJ","Linden","SJ","Lockeford","SJ","Lodi","SJ","Manteca","SJ","Mountain House","SJ","Ripon","SJ","Stockton","SJ","Thornton","SJ","Woodbridge","SJ","Half Moon Bay","OT","Los Gatos","OT","Mountain View","OT","Dixon","SO","Fairfield","SO","Suisun City","SO","Vacaville","SO","Vallejo","SO","Winters","SO","Ceres","ST","Crows Landing","ST","Denair","ST","Empire","ST","Hickman","ST","Hughson","ST","Keyes","ST","Knights Ferry","ST","La Grange","ST","Modesto","ST","Newman","ST","Oakdale","ST","Patterson","ST","Riverbank","ST","Salida","ST","Valley Home","ST","Waterford","ST","Westley","ST","Live Oak","SU","Meridian","SU","Nicolaus","SU","Yuba City","SU","Columbia","TU","Don Pedro","TU","Jamestown","TU","Sonora","TU","Tuolumne","TU","Capay","YO","Clarksburg","YO","Davis","YO","Dunnigan","YO","El Macero","YO","Esparto","YO","Guinda","YO","Knights Landing","YO","Rumsey","YO","West Sacramento","YO","Woodland","YO","Yolo","YO","Zamora","YO","Browns Valley","YU","Dobbins","YU","Linda","YU","Loma Rica","YU","Marysville","YU","Olivehurst","YU","Oregon House","YU","Smartville","YU","Wheatland","YU","","")
}