<!--
var ns4 = (document.layers);
var ie4 = (document.all && !document.getElementById);
var ie5 = (document.all && document.getElementById);
var ns6 = (!document.all && document.getElementById);

// ---------------------------------------------------------------------------------------------------------
function ShowPersonnel()
{
	var d = document.getElementById('divPersonnel');
	var a = document.getElementById('divAnchor');
	d.style.top = a.offsetTop;
	d.style.left = a.offsetLeft + 30;
	d.style.visibility = 'visible';
}

// ---------------------------------------------------------------------------------------------------------
function HidePersonnel()
{
	var d = document.getElementById('divPersonnel');
	d.style.visibility = 'hidden';
}

// ---------------------------------------------------------------------------------------------------------
function ExecuteBGSearch()
{
	document.frmSearch.submit();
}
// ---------------------------------------------------------------------------------------------------------
function PageBGResults(vCacheName, vPage, vResPerPage, SeqID, PageID)
{
	var newURL = 'bgsearchresult.asp?cn=' + vCacheName + '&pg=' + vPage + '&rpp=' + vResPerPage + '&pi=' + PageID + '&seq=' + SeqID;
	window.location.href = newURL;
}
// ---------------------------------------------------------------------------------------------------------
function BGSearchKeyPress(e, sourceName, param1)
{
	var key;
		
	if (document.all)
	{
		e = window.event;
	}
	if (document.layers)
	{
		key = e.which;		// assume netscape
	}
	else
	{
		key = e.keyCode;	// assume ie
	}

	if (key == 13)
	{
		if (ValidateBGSearch())
		{
			document.frmSearch.submit();
		}
	}
	
	return false;			//cancel the event
}

// ---------------------------------------------------------------------------------------------------------
function ValidateBGSearch()
{
	var searchTerm = document.getElementById("txtSearchTerm");
	var beginsContains = document.frmSearch.optBeginsContains;
	var companyProduct = document.frmSearch.optCompanyProduct;
	var part1 = '';
	var part2 = '';
	
	//ES1-OPEQ-TATD-FADirectoryID
	
	// check for begins or contains
	if(beginsContains[0].checked)
	{
		part1 = 'ES1-OPBWC-';
		document.frmSearch.txtBeginsContains.value = 1;
	}
	else
	{
		part1 = 'ES1-OPCC-';
		document.frmSearch.txtBeginsContains.value = 1;
	}
	
	// check for product or company
	if(companyProduct[0].checked)
	{	
		part2 = 'TATDMI-FACompanyName';
		document.frmSearch.txtProductCompany.value = 1;
		document.frmSearch.txtSearchType.value = 0;
		document.frmSearch.txtOrderBy.value = "TATDL-FALevelOrder-TACOMCF-FA34083-TATDMI-FACoName-";

	}
	else
	{
		part2 = 'TATCC-FAName';
		document.frmSearch.txtProductCompany.value = 2;
		document.frmSearch.txtSearchType.value = 1;
		document.frmSearch.txtOrderBy.value = "TATCC-FAName-";
	}

	searchTerm.name = part1 + part2;	// set the name of the search term
	
	if (document.getElementById("txtSearchTerm").value.length < 2)
	{
		alert("Please enter a search term containing 2 or more charcters");
		return false;
	}
	else
	{
		return true;
	}
}

// ---------------------------------------------------------------------------------------------------------
function PageBGPersonResults(vCacheName, vPage, vResPerPage, SeqID, PageID)
{
	var newURL = 'bgsearchresult.asp?cn=' + vCacheName + '&pg=' + vPage + '&rpp=' + vResPerPage + '&t=2' + '&pi=' + PageID + '&seq=' + SeqID;
	window.location.href = newURL;
}

// ---------------------------------------------------------------------------------------------------------
function sosopenwindow()
{
	window.open("http://www.meatpoultry.com/advertising_info/MPBGedit_popup.asp","solis_window","toolbar=no, scrollbars=no, resizable=no, width=300, height=300")
}

//-->