function hilite(thing) {
onpath = "http://billingsgazette.net/i/nav/" + thing + "_on.gif";
nameo = thing + "_bt";
document.images[nameo].src=onpath;
}

function lolite(thing) {
onpath = "http://billingsgazette.net/i/nav/" + thing + ".gif";
nameo = thing + "_bt";
document.images[nameo].src=onpath;
}

function dingosearch() {
	document.searchform.q.value=document.searchform['se.category.kq'].value;
	document.searchform.txtLastName.value=document.searchform['se.category.kq'].value;
	document.searchform.query.value=document.searchform['se.category.kq'].value;
	if (document.searchform.whereto[0].checked) {
	document.searchform.action = "http://billingsgazette.net/shared-content/search/";
		}
	if (document.searchform.whereto[1].checked) {
	document.searchform.action = "http://billingsgazette.net/admarket/";
		}
	if (document.searchform.whereto[2].checked) {
	document.searchform.action = "http://www.legacy.com/billingsgazette/Obituaries.asp?Page=SearchResults";
	document.searchform.method = "post";
	} 
}


function cal_pop(urly) {
	window.open(urly,'event','width=450,height=400,scrollbars=1');
	}
	

urly = new String(document.URL);
	chunk = urly.split("/");
	howlong = chunk.length;
	where = howlong-3;
	righthere = chunk[where];
	if (chunk[where+1]=="weather") {
		righthere = "weather";
		}
	else if (righthere == "ap") {
		righthere = "entertainment";
		}
	else if ( (chunk[where]=="news") || (chunk[where]=="sports") || (chunk[where]=="features") || (chunk[where]=="entertainment") || (chunk[where]=="opinion") || (chunk[where]=="notices") ) {
		righthere = righthere;
	} else {
	righthere = "home";
	}


var fontbase=12;
	
function embiggen() {
		if (fontbase<18) fontbase=fontbase+1;
		document.getElementById("content").style.fontSize = fontbase + "px";
}
function smallify() {
		if (fontbase>8) fontbase=fontbase-1;
		document.getElementById("content").style.fontSize = fontbase + "px";
}

function findObj(theObj, theDoc)
{
  var p, i, foundObj;
  
  if(!theDoc) theDoc = document;
  if( (p = theObj.indexOf("?")) > 0 && parent.frames.length)
  {
    theDoc = parent.frames[theObj.substring(p+1)].document;
    theObj = theObj.substring(0,p);
  }
  if(!(foundObj = theDoc[theObj]) && theDoc.all) foundObj = theDoc.all[theObj];
  for (i=0; !foundObj && i < theDoc.forms.length; i++) 
    foundObj = theDoc.forms[i][theObj];
  for(i=0; !foundObj && theDoc.layers && i < theDoc.layers.length; i++) 
    foundObj = findObj(theObj,theDoc.layers[i].document);
  if(!foundObj && document.getElementById) foundObj = document.getElementById(theObj);
  
  return foundObj;
}



function invisify(objName) { 
  var obj = findObj(objName);
  eval("obj.style.height='0px'; obj.style.overflow='hidden'; obj.style.display='none';");
}
