// JavaScript Document

var req=null;
	var console=null;
	var READY_STATE_UNINITIALIZED = 0;
	var READY_STATE_LOADING = 1;
	var READY_STATE_LOADED = 2;
	var READY_STATE_INTERACTIVE = 3;
	var READY_STATE_COMPLETE = 4;
	
	function sendRequest(url,params,HttpMethod){
		if (!HttpMethod){
			HttpMethod = "GET";
		}
		
		req = initXMLHTTPRequest();
		
		if(req){
			
			req.open(HttpMethod,url,true);
			
			req.onreadystatechange = onReadyState;
					
			req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
			req.send(null);
			
		}
		
	}
	
	function initXMLHTTPRequest(){
		var xRequest = null;
		if(window.XMLHttpRequest){
			try{
				xRequest = new XMLHttpRequest();
			} catch(e){
			}
			
		}
		return xRequest;
	}
	
	function onReadyState(){
		var ready = req.readyState;
		if(ready==READY_STATE_COMPLETE){
			
			location.href="http://www.partycasino.com/Downloads/de/" + value + "/PartyCasinoSetup.exe";
			
		}
	}
	
	
