var domRef = (document.all) ? ".all" : ".getElementById";

function swapImg(sImg, sSrc) 
{
	document.images[sImg].src = sSrc;
}

function hideObj(sObj) 
{
	eval("document" + domRef + "('" + sObj + "').style.display = 'none'");
}

function showObj(sObj) 
{
	eval("document" + domRef + "('" + sObj + "').style.display = ''");
}

function positionObj(sObj, iTop, iLeft) 
{
	eval("document" + domRef + "('" + sObj + "').style.top = iTop");
	eval("document" + domRef + "('" + sObj + "').style.left = iLeft");
}

function popup(sUrl, iWidth, iHeight) 
{
	window.open(sUrl, 'popup', 'width=' + iWidth + ',height=' + iHeight + ',toolbar=1,location=1,directories=1,status=1,menuBar=1,scrollBars=1,resizable=1');
}

/* classes for rollover effect */
function changeBackgroundColor(sObj, sColor)
{
	eval("document" + domRef + "('" + sObj + "').style.background = '" + sColor + "'");
}

function changeFontColor(sObj, sColor)
{
	eval("document" + domRef + "('" + sObj + "').style.color = '" + sColor + "'");
}

function arrowNavigation(sObj, sImage)
{
	eval("document" + domRef + "('" + sObj + "').src = '" + sImage + "'");
}

// BEGIN O. C. Tanner Code
function siteSearchOnEnterRedirect()
{
	if (event.keyCode == 13) //enter key hit
	{
		siteSearchRedirect();
	}
}

function siteSearchRedirect()
{
	document.localeForm.action = "searchResults.jsp?pattern=siteSearch&startIndex=1";
	document.localeForm.submit();
} 

function newWin(url, width, height, scrollbars, resizable)
{
	if (!width) width=460;		
	if (!height) height=400;		
	if (!scrollbars) scrollbars=1;		
	if (!resizable) resizable=1;		
	var win = window.open(url,"popUp","width="+width+",height="+height+",top=100,left=50,scrollbars="+scrollbars+",resizable="+resizable);
	win.focus();
}
// END O. C. Tanner Code
