function showPic(url, el){
	var img = document.getElementById('gImage').src = url;
	var top = ajaxTooltip_getTopPos(el);
	var left = (ajaxTooltip_getLeftPos(el) + el.offsetWidth);
	var imgDiv = document.getElementById('gImageDiv');
	imgDiv.style.display='block';
	imgDiv.style.top = top + 'px';
	imgDiv.style.left = left + 'px';
}

function show_picture_ex(url, el, width, height){
	var img = document.getElementById('gImage');
	img.width = width;
	img.height = height;
	showPic(url, el);
}


function hidePic(){
	document.getElementById('gImageDiv').style.display = 'none';
}

function ajaxTooltip_getTopPos(inputObj)
{
  var returnValue = inputObj.offsetTop;
  while((inputObj = inputObj.offsetParent) != null){
  	if(inputObj.tagName!='HTML')returnValue += inputObj.offsetTop;
  }
  return returnValue;
}

function ajaxTooltip_getLeftPos(inputObj){
  var returnValue = inputObj.offsetLeft;
  while((inputObj = inputObj.offsetParent) != null){
  	if(inputObj.tagName!='HTML')returnValue += inputObj.offsetLeft;
  }
  return returnValue;
}
