function setRequest(url)
{
	//alert("setRequest: " + url);
	makeHttpRequest (url, "setFlash");
}

// Re-usable generic AJAX caller with return function as a param.
// You can set xml or text as expected return type to pass
// the correct result object into your callback function

function makeHttpRequest(url, callback_function, return_xml)
{
	var http_request = false;
	
	if (window.XMLHttpRequest) // Mozilla, Safari,...
	{
		http_request = new XMLHttpRequest();
		if (http_request.overrideMimeType)
		{
			http_request.overrideMimeType('text/xml');
		}
	}
	else if (window.ActiveXObject) // IE
	{
		try
		{
			http_request = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e)
		{
			try
			{
				http_request = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e)
			{
				//do nothing
			}
		}
	}
	
	if (!http_request)
	{
		alert('Unfortunatelly you browser doesn\'t support this feature.');
		return false;
	}
	
	http_request.onreadystatechange = function()
	{
		if (http_request.readyState == 4)
		{
			if (http_request.status == 200)
			{
				if (return_xml)
				{
					eval(callback_function + '(http_request.responseXML)');
				}
				else
				{
					eval(callback_function + '(http_request.responseText)');
				}
			}
			else
			{
				alert('There was a problem with the request.(Code: ' + http_request.status + ')');
			}
		}
	}
	http_request.open('GET', url, true);
	http_request.send(null);
}


// Writes flash content to the screen using swfobject.embedSWF.
// Set whatever params and values you specifically need.
// You could have multiple callback functions on the one page if required
function setFlash( loc )
{
	var flashPlayerAndArgs = loc.split('?');
	var flashPlayer = flashPlayerAndArgs[0];
	var args = flashPlayerAndArgs[1];

	var flashVars = {};
	var keysValues = args.split("&");
	for(var index = 0; index < keysValues.length; index++)
	{
		try
		{
			var keyValue = keysValues[index].split("=");
			flashVars[keyValue[0]] = keyValue[1];
		}
		catch (e)
		{
			// We're getting some odd iterator object as the last item... :P
			break;
		}
	}
	
	var params = {};
	params.allowFullScreen = "true";
	params.wmode = "transparent";
	swfobject.embedSWF(flashPlayer, "flashcontent", "634", "382", "9.0.0", false, flashVars, params, {});
}


















