getOffsetPosition = function(inID, inTYPE)
{
 var iVal = 0;
 var oObj = document.getElementById(inID);
 var sType = 'oObj.offset' + inTYPE;
 while (oObj && oObj.tagName != 'BODY') {
  iVal += eval(sType);
  oObj = oObj.offsetParent;
 }
 return iVal;
}

function Chargement() {
        var topSearch = parseInt(getOffsetPosition('search-position', 'Top'));
        var leftSearch = parseInt(getOffsetPosition('search-position', 'Left'))+
20;
        document.getElementById("search-results").style.left=leftSearch+"px";
        document.getElementById("search-results").style.top=topSearch+"px";
}


currentSection = "web"

function switch_tab(link)
{
	if (currentSection == link) {
		return;
	}
	lastSection = currentSection;
	currentSection = link;

	sectionTab = currentSection + "-tab";
    document.getElementById(sectionTab).className = "active";
    if (lastSection) {
	    lastTab = lastSection + "-tab";
	    document.getElementById(lastTab).className = "inactive";
	}

	url = document.getElementById("search").action;
	document.getElementById("search").action = (url.split('#'))[0] + "#" + link + "-pane" ;
}

