function updatePath() {

      var count = 0;
      var stop = false;
	var elememt = document.getElementById("path"+count);
      while (elememt!=null) {
          count++;
   	    elememt = document.getElementById("path"+count);
      }
      count--;

      fullPath();

	var p = abPos($fo("catalogpath"));
	var hw = $.iUtil.getSize(document.getElementById("catalogpath"));
      var numb = 0;
      if (hw.h>35 ) {
         numb = 1;
 	   $("#path0").css("display", "inline");
         while ( hw.h>35 && numb < count ) {
             $("#path"+numb).css("display", "none");
             var hw = $.iUtil.getSize(document.getElementById("catalogpath"));
             numb++;
         }
      }

      if (numb == 0) {
 	   $("#path0").css("display", "none");
      }
  

}

function updatePathResize() {

      var count = 0;
      var stop = false;
	var elememt = document.getElementById("path"+count);
      while (elememt!=null) {
          count++;
   	    elememt = document.getElementById("path"+count);
      }
      count--;

      fullPath(); 

	var p = abPos($fo("catalogpath"));
	var hw = $.iUtil.getSize(document.getElementById("catalogpath"));
      var numb = 0;
      if (hw.h>35 ) {
 	   $("#path0").css("display", "inline");
         var numb = 1;
         while ( hw.h>35 && numb < count ) {
             $("#path"+numb).css("display", "none");
             var hw = $.iUtil.getSize(document.getElementById("catalogpath"));
             numb++;
         }
      }

      if (numb == 0) {
 	   $("#path0").css("display", "none");
      }  

}


function fullPath() {

      var count = 0;
      var stop = false;
	var elememt = document.getElementById("path"+count);
      while (elememt!=null) {
          count++;
   	    elememt = document.getElementById("path"+count);
      }
      count--;

      $("#path0").css("display", "inline");
      for( var i=1;i<=count;i++) {
          $("#path"+i).css("display", "inline");
      }
}


function $fo(v, o) {
	return ((typeof (o) == 'object' ? o : document).getElementById(v));
}
function $S(o) {
	return ((typeof (o) == 'object' ? o : $(o)).style);
}
function agent(v) {
	return (Math.max(navigator.userAgent.toLowerCase().indexOf(v), 0));
}
function abPos(o) {
	var o = (typeof (o) == 'object' ? o : $(o)), z = {
		X :0,
		Y :0
	};
 	while (o != null) {
		z.X += o.offsetLeft;
		z.Y += o.offsetTop;
            // alert("navigator.userAgent " + navigator.userAgent);
            if  (agent("msie 7")) {
		  if (o.tagName=="DIV") { z.Y -= 2 };
		  if (o.tagName=="TD") { z.Y -= 0 };
		  if (o.tagName=="TABLE") { z.Y -= 1 };
            }

		o = o.offsetParent;
	};
	return (z);
}
function XY(e, v) {
	var o = agent('msie') ? {
		'X' :event.clientX + document.body.scrollLeft,
		'Y' :event.clientY + document.body.scrollTop
	} : {
		'X' :e.pageX,
		'Y' :e.pageY
	};
	return (v ? o[v] : o);
}


