var xmlhttp = false;

//### Initialisierung
function createRequestObject() {
	if( window.ActiveXObject ) {
		try {
			xmlhttp = new ActiveXObject( "Msxml2.XMLHTTP" ); //IE 6.x, 7.x
		} catch( e ) {
				try { xmlhttp = new ActiveXObject( "Microsoft.XMLHTTP" ); } //IE 5.x
				catch( e ) { xmlhttp = false; }
		}
	} else if( window.XMLHttpRequest ) {
			try { xmlhttp = new XMLHttpRequest(); } //Mozilla, Opera und Safari
			catch( e ) { xmlhttp = false; }
	}
	return xmlhttp;
}

function loadProjektpartner( url, id ) {
	xmlhttp = createRequestObject();
	var data = "&ajax=yes&aktion=showProjektpartner&id="+id;
	
	xmlhttp.onreadystatechange = function() { setContent( 'projektpartner', url ); };
	xmlhttp.open( 'POST', url, true );
	xmlhttp.setRequestHeader( 'Content-Type', 'application/x-www-form-urlencoded' );
	xmlhttp.send( data );
	
	window.top.location = url+"#"+id;
}


function setContent( id, url ) {
	if ( xmlhttp.readyState == 4 ) {
		if ( xmlhttp.status == 200 ) {
			document.getElementById( id ).innerHTML = xmlhttp.responseText;
		} 
		else {
			alert( 'Bei dem Request ist ein Problem aufgetreten.' );
		}
	}
}

function alertInhalt() {
	if ( xmlhttp.readyState == 4 ) {
		if ( xmlhttp.status == 200 ) {
			alert( xmlhttp.responseText );
		} 
		else {
			alert( 'Bei dem Request ist ein Problem aufgetreten.' );
		}
	}
}