function redirect(url,prefix,action)
{
	var action = (action == null) ? 0 : action;
	var prefix = (prefix == null) ? "?" : prefix;
//	alert(url);
	var xmlHttp;
	try
	{
		// Firefox, Opera 8.0+, Safari
		xmlHttp=new XMLHttpRequest();
	}
	catch (e)
	{
		// Internet Explorer
		try
		{
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e)
		{
			try
			{
				xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e)
			{
				if (action!=0)
				{
					document.location="http://www.online-marketing.co.il/statistics/track/event/"+action+"/?rurl="+encodeURIComponent(url+prefix)+"userdata=0.0.0.0_0.0_0.0.0.0"; //Action redirect - Browser doesn't support Ajax
				}
				else
				{
					document.location=url+prefix+"userdata=0.0.0.0_0.0_0.0.0.0"; //Browser doesn't support Ajax
				}
			}
		}
	}
	xmlHttp.onreadystatechange=function()
	{
		if(xmlHttp.readyState==4)
		{
			if (action!=0)
			{
				document.location="http://www.online-marketing.co.il/statistics/track/event/"+action+"/?rurl="+encodeURIComponent(url+prefix)+"userdata="+xmlHttp.responseText; //Action redirect
			}
			else
			{
				document.location=url+prefix+"userdata="+xmlHttp.responseText;
			}
		}
	}
	xmlHttp.open("GET","/redirect.php",true);
	xmlHttp.send(null);
}
