// JavaScript Document
function sample(id)
{	

	alert('its working'+id);
}


function GetXmlHttpObject()
{
	objXMLHttp = false;
	try
	{
		objXMLHttp = new ActiveXObject("Msxml2.XMLHTTP");
	}
	catch (e)
	{
		try
		{
			objXMLHttp = new ActiveXObject("Microsoft.XMLHTTP");
		}
		catch (e)
		{
			objXMLHttp = false;
		}
	}
	if (!objXMLHttp && typeof XMLHttpRequest != 'undefined')
		objXMLHttp = new XMLHttpRequest();
	return objXMLHttp;
}

function callMap(id)
{
//document.getElementById('testing4').innerHTML= '';

document.getElementById('newcontactmap').innerHTML= '';
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	}
	// Create a function that will receive data sent from the server
	xmlHttp.onreadystatechange = function(){
		if(xmlHttp.readyState == 4){
			document.getElementById('newcontactmap').innerHTML= xmlHttp.responseText;
			//	loadPatterns(urlpath);

		}
	}
	urlpath = 'http://www.kubeinteriors.com/index.php/contact_details/loadMap/'+id;
	xmlHttp.open("GET", urlpath, true);
	xmlHttp.send(null);

}

