function dumpProps(obj, obj_name) {
   var result = ""
   for (var i in obj) {
      if (obj[i]+"." != ".")
         result += obj_name + "." + i + " = " + obj[i] + "<BR>"
   }
   return result
}

function getTop(e){
   var t = e;
   var y = t.offsetTop;
   while (t.offsetParent != null) {
      t = t.offsetParent;
      y += t.offsetTop;
   }
   return y;
}

function getLeft(e){
   var t = e;
   var x = t.offsetLeft;
   while (t.offsetParent != null) {
      t = t.offsetParent;
      x += t.offsetLeft;
   }
   return x;
}

function NewWnd(url, w, h, mb)
{
	if (w==null) w=600;
	if (h==null) h=400;
	if (mb==null) mb=0;
	var w = window.open(url, '_blank', 'menubar='+mb
		+',resizable=1,scrollbars=1,top=50,left=50,width='+w+',height='+h, true);
	w.focus();
}

function showProduct(event, description, image, x, y) {
	var div = document.getElementById('divProduct');
	if (div != null/* && document.divProduct == null*/) {
    var scrollTop = window.pageYOffset || document.documentElement.scrollTop || 0;
    var scrollLeft = window.pageXOffset || document.documentElement.scrollLeft || 0;
	document.divProduct = div;
    div.style.left = event.clientX + 10 + scrollLeft + "px";
    div.style.top = event.clientY + 10 + scrollTop + "px";
	div.style.display = "";
	var size = "";
	if (x != 0) {
		size = "width=" + x + " height=" + y;
	}
	div.innerHTML = "<table><tr><td class=text>" + description + "</td></tr>" 
		+ "<tr><td><img src='" + image + "' " + size + "></td></tr></table>";
	}
}

function hideProduct() {
	if (document.divProduct != null) {
		document.divProduct.style.display = "none";
		document.divProduct = null;
	}
}

