function getRealLeft(tempObj) {
    xPos = tempObj.offsetLeft;
    tempEl = tempObj.offsetParent;
    while (tempEl != null) {
        xPos += tempEl.offsetLeft;
        tempEl = tempEl.offsetParent;
    }
    return xPos;
}

function getRealTop(tempObj) {
    yPos = tempObj.offsetTop;
    tempEl = tempObj.offsetParent;
    while (tempEl != null) {
        yPos += tempEl.offsetTop;
        tempEl = tempEl.offsetParent;
    }
    return yPos;
}

function FillSearchTerm(tObj){
	document.getElementById("SearchText").value = tObj.innerText;
	document.getElementById('SavedSearchTermsContainer').style.visibility = "hidden";
}

function Del(termToDelete){	
	document.DeleteSearchTerm.TermToDelete.value=termToDelete;
	document.DeleteSearchTerm.submit();
}//end function

function HideSearchTerms(){
	document.getElementById('SavedSearchTermsContainer').style.visibility = "hidden";
}

function ShowSavedSearches(tObj){
	tempX = getRealLeft(tObj)
	tempY = getRealTop(tObj)
	searchesDiv = document.getElementById('SavedSearchTermsContainer');
	searchesDiv.style.pixelLeft = tempX;
	searchesDiv.style.pixelTop = tempY;
	searchesDiv.style.visibility = "visible";

}



