// JavaScript Document
//JavaScript Document for ajax function call in mihirafamily.com********************************************

//***************This javascript functions are build and devoloped by kaivalyasoftware Pvt Ltd.*********
//****************Banglore**************************kaivalyasoftware.com********************************
//****************India********************************************************************************
//****************All Rights reserved.*****************************************************************

function getxmlhttpobject()
{
	var xmlhttp=null;
	try
	{
		// for opera, safari, firefox
		xmlhttp=new XMLHttpRequest();
	}
	catch(e)
	{
		try
		{
			xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch(e)
		{
			xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
	}
	return xmlhttp;
}

var xmlhttp;

function SelectContent(str)
{
	
	
	xmlhttp=getxmlhttpobject();
	if(xmlhttp==null)
	{
		alert("browser doesn't support HTTP request");
	    return;
	}
	var url="ajax_home.php";
	url=url+"?book_cat_id="+str;
	//alert(url);
	xmlhttp.onreadystatechange=SelectStateResult;
	xmlhttp.open("GET",url,true);
	xmlhttp.send(null);
	//alert("I m coming");
}


function SelectStateResult()
{
	if(xmlhttp.readyState==4 || xmlhttp.readyState=="complete")
	{
		
	//alert(xmlhttp.responseText);
		document.getElementById('testDIv').innerHTML=xmlhttp.responseText;
	
	}
}


