var xmlHttp

function stateChanged(id) 
{ 
 if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
// switch (xmlHttp.responseText)
	document.getElementById(id).innerHTML =xmlHttp.responseText;
 } 
}

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;
} 


function show(id,php_url)
{
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 return
 }
url=php_url.split("?");

if (url[1] == null)
	url=php_url+"?sid="+Math.random();
else 
	url=php_url+"&sid="+Math.random();

xmlHttp.onreadystatechange=function(){stateChanged(id)}
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
} 



function show_brand(id)
{
	buffer = id.split("_");
	for (i=1;i<=buffer[1];i++)
		{
		
			if(document.getElementById(i + "_" + buffer[1]) != null) document.getElementById(i + "_" + buffer[1]).style.display = "none";
		
		}
	document.getElementById(id).style.display = "block";
	
}

