	function findPosObj(obj){
		var curleft = 0;
		var curtop = 0;
		if(obj.offsetParent){
			while(obj.offsetParent){
				curleft += obj.offsetLeft-obj.scrollLeft;
				curtop += obj.offsetTop-obj.scrollTop;
				var position='';
				if(obj.style&&obj.style.position)position=obj.style.position.toLowerCase();
				if((position=='absolute')||(position=='relative'))break;
				while(obj.parentNode!=obj.offsetParent){
					obj=obj.parentNode;
					curleft-=obj.scrollLeft;
					curtop-=obj.scrollTop;
				}
				obj = obj.offsetParent;
			}
		}else{
			if(obj.x)curleft+=obj.x;
			if(obj.y)curtop+=obj.y;
		}
		return{left:curleft,top:curtop};
	}

	function showHelp(helpId,attachId){
		if (!document.all) { //All browsers except IE
			windowWidth 	= window.innerWidth-20;
			windowHeight 	= window.innerHeight;
			windowScrollX 	= window.pageXOffset;
			windowScrollY 	= window.pageYOffset;
		}else if (document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { //IE in DTD, Opera9
			windowWidth 	= document.documentElement.clientWidth-20;
			windowHeight 	= document.documentElement.clientHeight;
			windowScrollX 	= document.documentElement.scrollLeft;
			windowScrollY 	= document.documentElement.scrollTop;
		}else{ //Normal IE
			windowWidth 	= document.body.clientWidth-20;
			windowHeight 	= document.body.clientHeight;
			windowScrollX 	= document.body.scrollLeft;
			windowScrollY 	= document.body.scrollTop;
		}
		var hWnd=document.getElementById(helpId);
		var aWnd=document.getElementById(attachId);
/*		var y=findPosObj(aWnd).top-(hWnd.offsetHeight);
		var x=findPosObj(aWnd).left+aWnd.offsetWidth;
		hWnd.style.left=x+'px';
		hWnd.style.top=y+'px';
		hWnd.style.visibility='visible';
*/

		var y=findPosObj(aWnd).top;
		var x=findPosObj(aWnd).left+aWnd.offsetWidth;
		adjustY = 0;
		adjustX = 0;
		popupHeight = parseInt(hWnd.offsetHeight);
		popupWidth = parseInt(hWnd.offsetWidth);
		var _position_fix=document.all?8:6;
		var space_not_enough_x=false,space_not_enough_y=false;
		//Abjust horizontal position
		if ((x + popupWidth) > parseInt(windowWidth)) {
			adjustX=popupWidth+_position_fix+aWnd.offsetWidth;
			if(x-aWnd.offsetWidth<popupWidth){
				adjustX=x;
				space_not_enough_x=true;
			}
		}

		//Adjust vertical position
		if ((y + popupHeight) > parseInt(windowHeight)) {
			adjustY=popupHeight+_position_fix;
			if(y<popupHeight){
				adjustY=y;
				space_not_enough_y=true;
			}
		}
		if(space_not_enough_x&&space_not_enough_y){adjustX=0;adjustY=0;}

		hWnd.style.left=(x-adjustX)+'px';
		hWnd.style.top=(y-adjustY)+'px';
		hWnd.style.visibility='visible';

	}