var xmlHttp

	function SwitchReview(id_product)
	{
		xmlHttp=GetXmlHttpObject()
		if (xmlHttp==null)
		{
			alert ("Browser does not support XML Request")
			return
		}
		var url="index.php"
		url=url+"?id_product="+id_product
                url=url+"&site=show-review"
		url=url+"&sid="+Math.random()
		xmlHttp.onreadystatechange=stateChanged
		xmlHttp.open("GET",url,true)
		xmlHttp.send(null)

        function stateChanged()
        {
            if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") {
                document.getElementById("aditional_back").innerHTML=xmlHttp.responseText;
            }
            else if (xmlHttp.readyState==1 || xmlHttp.readyState==2 || xmlHttp.readyState==3) {
                document.getElementById("aditionalTab").className = "tab_background_unselected";
                document.getElementById("reviewTab").className = "tab_background_selected";
                document.getElementById("aditional_back").innerHTML="<div id=\"small_loader\"><img src=\"/files/image/loader_bar.gif\" alt=\"loading\" /></div>";
            }
        }

	function GetXmlHttpObject()
	{
	var xmlHttp=null;
	try
		{
		// Firefox, Opera 8.0+, Safari
		xmlHttp=new XMLHttpRequest();
		}
		catch (e)
		{
			//Internet Explorer
			try
			{
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
			}
			catch (e)
			{
			xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
			}
		}
	return xmlHttp;
	}
}

