
var ob;

function GetPhoto(obb)
{
	ob = obb;
	req = getXMLHTTPRequest();
	if(req)
	{
		req.onreadystatechange=onReadyCh;
		//alert("genmenu.php?mtype=" + mtype + "&PHPSESSID=" + document.getElementById('sid').value);
		req.open("GET", "getph.php", true);
		req.send(null);
	}	
}

function getXMLHTTPRequest()
{
	var xreq=null;
	if(window.XMLHttpRequest)
	{
		xreq = new XMLHttpRequest();
	}
	else if(window.ActiveXObject)
	{
		xreq = new ActiveXObject("Microsoft.XMLHTTP");
	}
	return xreq;
}

function onReadyCh()
{
	if(req.readyState==4)
	{
// 		alert(req.responseText);
		ob.style.backgroundImage="url(" + req.responseText+")";
		return;
	
	}
}

