function getBuddy(nsid, divid) {

	var url = "people_getInfo.php?nsid=" + nsid ;
	
    var xmlHttpReq = false;
    // Mozilla/Safari
    if (window.XMLHttpRequest) {
        xmlHttpReq = new XMLHttpRequest();
    }
    // IE
    else if (window.ActiveXObject) {
        xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
    }
    xmlHttpReq.open('GET', url, true);
    xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    xmlHttpReq.onreadystatechange = function() {
        if (xmlHttpReq.readyState == 4) {
        	processResp ( xmlHttpReq.responseText, divid ) ;
        }
    }
    xmlHttpReq.send(null);
}

function processResp ( resp, divid ) {
	var person = eval("("+resp+")");
	
	var imgurl = "http://farm" + person.iconfarm + ".static.flickr.com/"+ person.iconserver + "/buddyicons/" + person.nsid + ".jpg" ;
	
	var targetdiv = document.getElementById(divid) ;
	
	var img = document.createElement("img");
	img.src = imgurl ;
	img.className = "personicon";
	
	var alink = document.createElement("a");
	alink.href = person.photosurl;
	alink.appendChild (img);
	alink.appendChild( document.createTextNode("  \u00a0  " + person.username) );
	targetdiv.appendChild(alink);
}

