var xmlHttp;
var ntype;
function showsimilar(str,straction)
{
	ntype =straction;
	var url=Guitar_getBasehref() + "/ajax/showsimilar.php?pid=" + str +"&type=" + straction;
	if(straction == 2)
	{
		showall1('webcrad','');
	}

	if(window.XMLHttpRequest)
	{

		req = new XMLHttpRequest();
	} 
	else if(window.ActiveXObject)
	{

		req = new ActiveXObject("Microsoft.XMLHTTP");
	}
	req.open("GET", url, true);
	req.onreadystatechange = statechanged3;
	req.send(null);
}

function statechanged3() 
{
	
	if(req.readyState == 4)
	{
		if(req.status == 200) 
			{
			response = req.responseText;
			if(ntype==2){
			document.getElementById('webcradtxt').innerHTML=response;
			}else{
			document.getElementById('similarProduct').innerHTML=response;
			}
				//showall1('webcrad',response);
			
			} 
			else 
			{
				adocument.getElementById('webcradtxt').innerHTML="No similar music";
			}
	}
}

function people_bought(nasinid){
	//alert(nasinid);
	document.frmsmdetail.asinId.value=nasinid;
document.frmsmdetail.submit();
}