function GetXmlHttpObject() {
   var xmlHttp=null;
		var versions = ["Msxml2.XMLHTTP.7.0","Msxml2.XMLHTTP.6.0","Msxml2.XMLHTTP.5.0", "Msxml2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"];

   for(var i=0; i<= versions.length; i++) {
		try {
			xmlHttp=new XMLHttpRequest();
			return xmlHttp;
		}
		catch(e) {
			try {
				xmlHttp = new ActiveXObject(versions[i]);					
				return xmlHttp;
			}
			catch(e) {
				continue;
			}
		}
	}
	return false;
}


function addItem2(prod,artist,type) {
	
	xmlHttp = GetXmlHttpObject();
	
	url = prevDirs+'ajax.php?prod='+prod+'&artist='+artist+'&type='+type;
	
	xmlHttp.open("GET", url, true);
	xmlHttp.onreadystatechange=stateChanged;
	xmlHttp.send(null);
}

function stateChanged() {
	
		if(xmlHttp.readyState == 4 || xmlHttp.readyState == "completed") 
		{
			
			 //document.getElementById("we7").innerHTML='';
		if((xmlHttp.responseText!=null)&&(xmlHttp.readyState == 4))
			{
			
				jay=xmlHttp.responseText.split('jayesh');
				//alert(jay);
				
				newdiv = document.createElement("div");
				newdiv.innerHTML = jay[0];
				container = document.getElementById("we7");
				container.appendChild(newdiv);

				// document.getElementById("we7").innerHTML += jay[0];
				
				 document.getElementById("jayesh").value =jay[1];
				
				//alert(jay[1]);
				 
				
				 document.getElementById('we7').style.display='block';
				
			}
			 document.getElementById('ajaxBodyTD_loding').style.display='none';
			 document.getElementById('ajaxBodyTD').style.display='block';
		}
		else
		{
			document.getElementById('ajaxBodyTD_loding').style.display='block';
		}
		
	}
	
	
	
/*function addItemlist(vendid,prodid) {
	
	xmlHttpp = GetXmlHttpObject();
	xmlHttpp.onreadystatechange=stateChanged;
	url1 = prevDirs+'ajaxlist.php?prodid='+prodid+'&vendid='+vendid;
	alert(url1);
	xmlHttpp.open("GET", url1, true);
	xmlHttpp.send(null);
	function stateChanged() {
		if(xmlHttpp.readyState == 4 || xmlHttpp.readyState == "completed") {
			
			// document.getElementById("cartDiv").innerHTML = xmlHttp.responseText;
			alert('Item added to your shopping cart!');
			
		}
	}
}
*/






function setHTML(ele, msg) {
	Object(ele).innerHTML = msg;	
}


