function dops_showpartners(anz){
	var req = newXMLHttpRequest();
	//register the callback handler function
  	var callbackHandler = getReadyStateHandler(req, writediv);
  	req.onreadystatechange = callbackHandler;
  	req.open("POST", "http://www.freesexyfun.com/droelf.kit/dops/ajaxreturn.php", true);
  	req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
  	//get the value from the text input element and send it to server
  	req.send("anz="+anz);
	
}



function writediv(XML) {
	var msg_display = document.getElementById("dops_partner");
	
	//new Effect.BlindUp('dops_div', { duration: 0.3, queue:{scope:'menus', position:'front' }});

	msg_display.style.display='none';
	//new Effect.BlindUp('dops_div',{duration:1.0});
	var containerinhalt;
	containerinhalt="";
	for(var i=0; i< XML.getElementsByTagName("partner").length; i++)
		{
			var name = XML.getElementsByTagName("name")[i].firstChild.nodeValue;
			var hits = XML.getElementsByTagName("hits")[i].firstChild.nodeValue;
			var partnerhref = XML.getElementsByTagName("href")[i].firstChild.nodeValue;

			containerinhalt = containerinhalt + "<a href=\""+partnerhref+"\" target=\"_blank\" title=\""+hits+"\">"+name+"</a><br>\n";
		}
		
		containerinhalt = containerinhalt + "<br><a href=\"http://www.freesexyfun.com/alle-partner/\">More Partner</a><br><a href=\"http://www.freesexyfun.com/trade-traffic/\">Trade Traffic</a><br><a href=\"http://www.freesexyfun.com/submit/\">Submit Plug</a>";
		msg_display.innerHTML = containerinhalt;
		new Effect.BlindDown('dops_partner', { duration: 1.5, queue:{scope:'menus', position:'end'}});
		//new Effect.Highlight('dops_partner', { startcolor:'#cdcdcd', endcolor:'#ffffff',duration: 0.5, queue:{scope:'menus', position:'end'}});
		//new Effect.BlindDown('dops_div', { duration: 1.0, queue: 'end' });
		
		
}

function newXMLHttpRequest() {
	var xmlreq = false;
	if (window.XMLHttpRequest) {
		xmlreq = new XMLHttpRequest();
	} else if (window.ActiveXObject) {
    		// Try ActiveX
		try { 
			xmlreq = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e1) { 
			// first method failed 
			try {
				xmlreq = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e2) {
				 // both methods failed 
			} 
		}
 	}
   	return xmlreq;
} 

function getReadyStateHandler(req, responseXmlHandler) {
	return function () {
	if (req.readyState == 4) {
		if (req.status == 200) {
        		responseXmlHandler(req.responseXML);
		} else {
			var hellomsg = document.getElementById("attachments");
			hellomsg.innerHTML = "ERROR: "+ req.status;
      		}
    	}
 	}
}

