function Decryption(InputString, KeyPhrase){
    var KeyPhraseLength = KeyPhrase.length;
	var InputStringLength = (InputString.length)/2;
	var encrypt = '';
	var str, strkey, newcode;
    for (var i = 1; i <= InputStringLength; i++){
		str = InputString.substr((2*i)-2,2);
		strdec = parseInt(str,16);
		strkey = KeyPhrase.substr(i % KeyPhraseLength,1);
        newcode = strdec - strkey.charCodeAt(0);
		if (newcode < 1){
			newcode = newcode + 255;
		}
		encrypt = encrypt + String.fromCharCode(newcode);
    }
    return encrypt;
}

function checkpath(path,mywidth,myhieght,mycolor){
	var req,realpath,deppath;
	if (window.XMLHttpRequest){
		req = new XMLHttpRequest();
	} else if (window.ActiveXObject){
		req = new ActiveXObject("Microsoft.XMLHTTP");
	}
	req.onreadystatechange = function()
	{
		if (req.readyState == 4)
		{
			realpath = req.responseText;
			var len = realpath.length;
			var key = realpath.substring(0,4);
			var path = realpath.substring(4);
			deppath = Decryption(path,key);
			new jeroenwijering.Player(deppath,mywidth,myhieght,mycolor);
		}
	}
	path='wmvplayer/' + path;
	req.open("GET",path,true);
	req.send(null);
}