function createRequestObject() {
    var ro;
    var browser = navigator.appName;
    if(browser == "Microsoft Internet Explorer"){
        ro = new ActiveXObject("Microsoft.XMLHTTP");
    }else{
        ro = new XMLHttpRequest();
    }
    return ro;
}

var http = createRequestObject();

function sndReq(action,siteid) {
    http.open('get', 'output.php?action='+action+'&id='+siteid);
    http.onreadystatechange = handleResponse;
    http.send(null);
}

function handleResponse() {
    if(http.readyState == 4){
        var response = http.responseText;
        var update = new Array();

        if(response.indexOf('|' != -1)) {
            update = response.split('|');
            document.getElementById('content').innerHTML = update[1];
        }
    }
    
}

function makewhite() {
	
	document.getElementById('menueout').style.color='#ffffff';	
	document.getElementById('menueout1').style.color='#ffffff';
	document.getElementById('menueout2').style.color='#ffffff';
	document.getElementById('menueout3').style.color='#ffffff';
	document.getElementById('menueout4').style.color='#ffffff';
}

function makefix(elementid) {
	
	document.getElementById('menueout').innerHTML = "GESUNDHEIT";	
	document.getElementById('menueout1').innerHTML = "SCHWANGERSCHAFT";	
	document.getElementById('menueout2').innerHTML = "QUESTERS FEINE FISCHE";	
	document.getElementById('menueout3').innerHTML = "OMEGA 3 CREME";	
	document.getElementById('menueout4').innerHTML = "KONTAKT";	
		
	document.getElementById(elementid).innerHTML = "<span class='nowfix'>"+document.getElementById(elementid).innerHTML+"</span>";	
}

function makeTopLeft() {
	
	var testclient = window.outerHeight;	
	
	if(window.outerHeight <= 900 || (document.body.clientHeight <= 750 && isNaN(testclient) == true)) {
		
		document.getElementById("wrapper").style.position = "relative";
		document.getElementById("wrapper").style.margin = "0px";
		document.getElementById("wrapper").style.top = "0px";
		document.getElementById("wrapper").style.left = "0px";
	}	
}
