function votingresults(id, fwd, position){
	var ajaxRequest;  // The variable that makes Ajax possible!
	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Fehler beim Laden der Seite.");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest.onreadystatechange = function(){
		if(ajaxRequest.readyState == 4){
			var ajaxDisplay = document.getElementById('ajaxDiv');
			ajaxDisplay.innerHTML = ajaxRequest.responseText;
		}
	}
	var sortby = 'ASC';
	var pages = '3';
	var id;
	var fwd;
	var position;
	var queryString = "?sortby=" + sortby + "&pages=" + pages + "&id=" + id + "&fwd=" + fwd + "&position=" + position;
	ajaxRequest.open("POST", "fdf_inc_results.php" + queryString, true);
	ajaxRequest.send(null); 
}

function uservotingdetail(id){
	document.getElementById('gesamtvotings').style.display = 'none';
	document.getElementById('uservotingdetail').style.display = 'block';
	
	var ajaxRequest;  // The variable that makes Ajax possible!
	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Fehler beim Laden der Seite.");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest.onreadystatechange = function(){
		if(ajaxRequest.readyState == 4){
			var ajaxDisplay = document.getElementById('uservotingdetail');
			ajaxDisplay.innerHTML = ajaxRequest.responseText;
		}
	}
	var id;
	var queryString = "?id=" + id;
	ajaxRequest.open("POST", "fdf_inc_userdetail.php" + queryString, true);
	ajaxRequest.send(null); 
}

function uservotehelpful(id,helpful){	
	var ajaxRequest;  // The variable that makes Ajax possible!
	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Fehler beim Laden der Seite.");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest.onreadystatechange = function(){
		if(ajaxRequest.readyState == 4){
			var ajaxDisplay = document.getElementById('votehelpful');
			ajaxDisplay.innerHTML = ajaxRequest.responseText;
		}
	}
	var id;
	var helpful;
	var queryString = "?id=" + id + "&helpful=" + helpful;
	ajaxRequest.open("POST", "fdf_inc_helpful_vote.php" + queryString, true);
	ajaxRequest.send(null); 
}

function displayGesamtbewertungen(){
	document.getElementById('gesamtvotings').style.display = 'block';
	document.getElementById('uservotingdetail').style.display = 'none';
	advertisementsize(500);
}
