// Function to show and hide search box...
// =================================================================================================
function showSearchBox()
{
	if (document.getElementById("searchbox").style.display != "block")
	{
		document.getElementById("searchbox").style.display = "block";
		document.searchform.keyword.focus();
		
	}
	else
	{
		document.getElementById("searchbox").style.display = "none";
	}
}

// Function to monitor search box click off
// =================================================================================================
document.onclick=check;
function check(e){
	var target = (e && e.target) || (event && event.srcElement);
	var obj = document.getElementById('searchbox');
	var obj2 = document.getElementById('showsearchbox');
	var parent = checkParent(target);
	if(parent){obj.style.display='none'}
	if(target==obj2){
		obj.style.display='block';
		document.searchform.keyword.focus();
	}
}
function checkParent(t){
	while(t.parentNode){
		if(t==document.getElementById('searchbox')){
			return false
		}
		t=t.parentNode
	}
	return true
}

