if (!AJAX_imgResizerPool) {
var
	AJAX_imgResizerPool = Array();
}

function AJAX_onImgLoadHandler(req)
{
	// get id of the loaded element
	img_id = req.responseText;
//	console.log("Got async response: "+img_id);
	if (img_id.length > 0)
	{
		obImg = document.getElementById(img_id);
//		console.log(obImg);
//		console.log(AJAX_imgResizerPool[img_id]);
		if (obImg)
		{
//			obImg.onLoad= function() {obInd = document.getElementById(img_id+'_ind'); obInd.style.visibility = 'hidden';}			
			obImg.src = AJAX_imgResizerPool[img_id];
//			console.log('image '+obImg.src+'loaded');
			
		}
	}
//	else
//		console.log("empty trash response");
}

function showPopup(src, w, h, wname)
{
	nw = parseInt(w)+20;
	nh = parseInt(h)+20;
	window.open(src, wname, 'width='+nw+',height='+nh+',menubar=no,toolbar=no,statusbar=no,locationbar=no');
}