// for fetching subcatagory

function ajaxState(category_id)
{
 

document.getElementById('txtMsg1').style.display='none';
//alert(category_id);
//alert(document.getElementById('txtMsg1').style.display);
 xmlHttp1=GetXmlHttpObject1()
	if (xmlHttp1==null)
 	 {
 	alert ("Your browser does not support AJAX!");
  	return;
  	} 
	else
	{
		var url="fetchSubcatagory.php";
		url =url+"?category_id="+category_id;
		xmlHttp1.open("GET",url,true);
		//document.getElementById("txtMsg").innerHTML= '';
		xmlHttp1.onreadystatechange=stateChanged1;
		xmlHttp1.send(null);
	}
}

function ajaxState1(category_id)
{
	//alert(category_id);
	document.getElementById('txtMsg1').style.display='';
	
 xmlHttp1=GetXmlHttpObject1()
	if (xmlHttp1==null)
 	 {
 	alert ("Your browser does not support AJAX!");
  	return;
  	} 
	else
	{
		var url="fetchSubsubcatagory.php";
		url =url+"?category_id="+category_id;
		xmlHttp1.open("GET",url,true);
		//document.getElementById("txtMsg").innerHTML= '';
		xmlHttp1.onreadystatechange=stateChanged2;
		xmlHttp1.send(null);
	}
}
// for fetching Product

function ajaxProduct(langproduct_id,product_mpn)
{
	//alert(langproduct_id);
	//alert(product_mpn);
	
 xmlHttp1=GetXmlHttpObject1()
	if (xmlHttp1==null)
 	 {
 	alert ("Your browser does not support AJAX!");
  	return;
  	} 
	else
	{
		var url="fetchProduct.php";
		url =url+"?product_mpn="+product_mpn+"&langproduct_id=" + langproduct_id;
		xmlHttp1.open("GET",url,true);
		//document.getElementById("txtMsg").innerHTML= '';
		xmlHttp1.onreadystatechange=stateChanged1;
		xmlHttp1.send(null);
	}
}

function stateChanged1() 
{ 
	if (xmlHttp1.readyState==4)
	{ 
		document.getElementById("txtMsg").innerHTML=xmlHttp1.responseText;
	}
}
function stateChanged2() 
{ 
	if (xmlHttp1.readyState==4)
	{ 
		document.getElementById("txtMsg1").innerHTML=xmlHttp1.responseText;
	}
}
function GetXmlHttpObject1()
{
var xmlHttp1=null;
try
  {
  xmlHttp1=new XMLHttpRequest();
  }
catch (e)
  {
  try
    {
    xmlHttp1=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttp1=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttp1;
}
