
//XMLHttpRequest-Objekt instanziieren;
var http = null;
if (window.XMLHttpRequest) {
	http = new XMLHttpRequest();	
} else if (window.ActiveXObject) {
	try {
		http = new ActiveXObject("Msxml2.XMLHTTP");
	} catch(ex) {
		try {
			http = new ActiveXObject("Microsoft.XMLHTTP");
		} catch (ex) {
		}
	}
}

yMenue = 100;
yClients = 0;
yRSS = 10;
yFAQ = 15;
yContacts = 15;

ySpeed = 1000;

yLastScrollTop = 0;

function moveElements() {
	//var eleDebug = xGetElementById("debug");	
	var iParentHeight = xHeight(xGetElementById("tdcontainer"));
	var iContainerHeight = xHeight("container");
	var iMaxTo = iParentHeight - iContainerHeight - 20;	
	var iMoveTo = xScrollTop();	
	if (iMoveTo > iMaxTo) {
		iMoveTo = iMaxTo;
	}	
	//if (eleDebug != null) eleDebug.innerHTML = "iParentHeight=" + iParentHeight + ", iContainerHeight=" + iContainerHeight + ", iMoveTo=" + iMoveTo + ", iMaxTo=" + iMaxTo;
	moveElement('menuecontainer', iMoveTo+yMenue, ySpeed);
	moveElement('container', iMoveTo+yClients, ySpeed);
}

function moveElement (elementID, yPosition, iSpeed) {
	xSlideTo(elementID, 0, yPosition, iSpeed);
	yLastScrollTop = xScrollTop();
}

function loadLogo() {
	http.open("GET", "http://www.bourse-consult.com/wp-content/themes/bourseconsult/logo.inc.php");
	http.onreadystatechange = showLogo;
	http.send(null);
}

function showLogo() {
	if (http.readyState == 4) {
		var divLogo = document.getElementById("related_logo");
		divLogo.innerHTML = http.responseText;	
		window.setTimeout("loadLogo()", 5000);
	}
}