function checkBlank()
{
	var sString = document.Form1.q.value

	if (sString == "")
	{
		alert("Cannot search on a blank.");
		return false;
	}
	return true;
}

function searchForm()
{
	if (checkBlank())
		{
		location.href='http://www.dnr.state.oh.us/SearchResults/tabid/18110/Default.aspx?xsq=' + document.Form1.q.value;
		}
}

function toggleLayer(whichLayer)
{
	if (document.getElementById)
	{
		// this is the way the standards work
		var style2 = document.getElementById(whichLayer).style;
		style2.display = (style2.display == "block" ? "none":"block");
	}
	else if (document.all)
	{
		// this is the way old msie versions work
		var style2 = document.all[whichLayer].style;
		style2.display = (style2.display == "block" ? "none":"block");
	}
	else if (document.layers)
	{
		// this is the way nn4 works
		var style2 = document.layers[whichLayer].style;
		style2.display = (style2.display == "block" ? "none":"block");
	}
}

var comutil_oldHTML = "";

function printLayer(whichLayer)
{
	if (whichLayer == 0)
	{
		whichLayer = "overDiv";
	}
		
	comutil_oldHTML = document.body.innerHTML;
	var comutil_return = "<table width=100% bgcolor=Black cellpadding=3 cellspacing=3 border=0><tr><td><a href='javascript:void(0);' onclick='unPrint();' style='FONT-WEIGHT: bold; COLOR: yellow; TEXT-DECORATION: none'>Return to page</a></td></tr></table>";


	if (document.getElementById)
	{
		// this is the way the standards work
		document.body.className = "content";
		document.body.innerHTML = comutil_return + document.getElementById(whichLayer).innerHTML;
	}
	else if (document.all)
	{
		// this is the way old msie versions work
		document.body.className = "content";
		document.body.innerHTML = comutil_return + document.all[whichLayer].innerHTML;
	}
	else if (document.layers)
	{
		// this is the way nn4 works
		document.body.className = "content";
		document.body.innerHTML = comutil_return + document.layers[whichLayer].innerHTML;
	}
	
	showhideLayer('theprint',false);
	window.print();
}

function unPrint()
{
	document.body.innerHTML = comutil_oldHTML;
	document.body.className = "body";
}

function isLayerShowing(whichLayer)
{
	if (document.getElementById)
	{
		// this is the way the standards work
		var style2 = document.getElementById(whichLayer).style;
		return (style2.display == "block");
	}
	else if (document.all)
	{
		// this is the way old msie versions work
		var style2 = document.all[whichLayer].style;
		return (style2.display == "block");
	}
	else if (document.layers)
	{
		// this is the way nn4 works
		var style2 = document.layers[whichLayer].style;
		return (style2.display == "block");
	}

}

function showhideLayer(whichLayer, blShowLayer)
{
	var styledisplay = "none";
	
	if (blShowLayer)
		{
		styledisplay = "block";
		}
	if (document.getElementById)
	{
		// this is the way the standards work
		var style2 = document.getElementById(whichLayer).style;
		style2.display = styledisplay;
	}
	else if (document.all)
	{
		// this is the way old msie versions work
		var style2 = document.all[whichLayer].style;
		style2.display = styledisplay;
	}
	else if (document.layers)
	{
		// this is the way nn4 works
		var style2 = document.layers[whichLayer].style;
		style2.display = styledisplay;
	}
}
