 var http_request = false;
	var id="";
	var zart="";
	var tld="";
	var sld="";
	var dart="";
	var trid="";
	var utrid="";
	
function inbasket(etrid, eid, eart, etld, esld, euart) {
	zart = eart;
	id = eid;
	tld = etld;
	sld = esld;
	dart = euart;
	utrid = etrid;
	
	trid = document.getElementById(utrid);

        http_request = false;

        if (window.XMLHttpRequest) { // Mozilla, Safari,...
            http_request = new XMLHttpRequest();
            if (http_request.overrideMimeType) {
                http_request.overrideMimeType('text/xml');
                // zu dieser Zeile siehe weiter unten
            }
        } else if (window.ActiveXObject) { // IE
            try {
                http_request = new ActiveXObject("Msxml2.XMLHTTP");
            } catch (e) {
                try {
                    http_request = new ActiveXObject("Microsoft.XMLHTTP");
                } catch (e) {}
            }
        }

        if (!http_request) {
            alert('Ende :( Kann keine XMLHTTP-Instanz erzeugen');
            return false;
        }  
        http_request.onreadystatechange = alertInhalt;
        http_request.open('GET', "warenkorb-edit.php?art="+zart+"&sld="+sld+"&tld="+tld+"&dart="+dart, true);
        http_request.send(null);

    }

    function alertInhalt() {

        if (http_request.readyState == 4) {
            if (http_request.status == 200) {
				response = http_request.responseText;
				
				if(zart=="adddomain"){
					if(dart=="normal"){				
						trid.style.backgroundColor = "#ddffdd";
						trid.onmouseover = trid.style.backgroundColor = "#ebfdd7";
						trid.onmouseout = trid.style.backgroundColor = "#ddffdd";
						document.getElementById(id).innerHTML='<div onclick="inbasket('+"'"+utrid+"'"+','+"'"+id+"'"+','+"'deldomain'"+','+"'"+tld+"'"+','+"'"+sld+"'"+','+"'normal'"+')" title="Aus dem Warenkorb entfernen" style="height:22px;background-image: url('+"'"+'tl_files/domainssaubillig/images/inwarenkorb.png'+"'"+');cursor:pointer;background-position: 0px -44px;"></div>';
						zahl = document.getElementById('wanz').innerHTML;
						zahl = parseInt(zahl);
						zahl = zahl+1;
						document.getElementById('wanz').innerHTML=zahl;
					}
					if(dart=="umzug"){
						trid.style.backgroundColor = "#ddffdd";
						trid.onmouseover = trid.style.backgroundColor = "#ebfdd7";
						trid.onmouseout = trid.style.backgroundColor = "#ddffdd";
						document.getElementById(id).innerHTML='<div onclick="inbasket('+"'"+utrid+"'"+','+"'"+id+"'"+','+"'deldomain'"+','+"'"+tld+"'"+','+"'"+sld+"'"+','+"'umzug'"+')" title="Aus dem Warenkorb entfernen" style="height:22px;background-image: url('+"'"+'tl_files/domainssaubillig/images/dbelegt.png'+"'"+');cursor:pointer;background-position: 0px -44px;"></div>';
						zahl = document.getElementById('wanz').innerHTML;
						zahl = parseInt(zahl);
						zahl = zahl+1;
						document.getElementById('wanz').innerHTML=zahl;
					}
				}
				if(zart=="deldomain"){
					if(dart=="normal"){
						trid.style.backgroundColor = "#fcfcfc";
						trid.onmouseover = trid.style.backgroundColor = "#ebfdd7";
						trid.onmouseout = trid.style.backgroundColor = "#fcfcfc";
						document.getElementById(id).innerHTML='<div onclick="inbasket('+"'"+utrid+"'"+','+"'"+id+"'"+','+"'adddomain'"+','+"'"+tld+"'"+','+"'"+sld+"'"+','+"'normal'"+')" title="In den Warenkorb legen" style="height:22px;background-image: url('+"'"+'tl_files/domainssaubillig/images/inwarenkorb.png'+"'"+');cursor:pointer;" onmouseover="this.style.backgroundPosition = '+"'"+'0px -22px'+"'"+'"; onmouseout="this.style.backgroundPosition = '+"'"+'0px 0px'+"'"+'";></div>';
						zahl = document.getElementById('wanz').innerHTML;
						zahl = parseInt(zahl);
						zahl = zahl-1;
						document.getElementById('wanz').innerHTML=zahl;
					}
					if(dart=="umzug"){
						trid.style.backgroundColor = "#fcfcfc";
						trid.onmouseover = trid.style.backgroundColor = "#ebfdd7";
						trid.onmouseout = trid.style.backgroundColor = "#fcfcfc";
						document.getElementById(id).innerHTML='<div onclick="inbasket('+"'"+utrid+"'"+','+"'"+id+"'"+','+"'adddomain'"+','+"'"+tld+"'"+','+"'"+sld+"'"+','+"'umzug'"+')" title="In den Warenkorb legen" style="height:22px;background-image: url('+"'"+'tl_files/domainssaubillig/images/dbelegt.png'+"'"+');cursor:pointer;" onmouseover="this.style.backgroundPosition = '+"'"+'0px -22px'+"'"+'"; onmouseout="this.style.backgroundPosition = '+"'"+'0px 0px'+"'"+'";></div>';
						zahl = document.getElementById('wanz').innerHTML;
						zahl = parseInt(zahl);
						zahl = zahl-1;
						document.getElementById('wanz').innerHTML=zahl;
					}
				}
				
            } else {
                alert('Bei dem Request ist ein Problem aufgetreten.');
            }
        }

    }
