	if (document.images)
    {
		loadim = new Image(); 
		loadim.src="images/loading1.gif"; 
    }
	// function calculate where to view
	
	function findPos(obj) {
		var curleft = curtop = 0;
		if (obj.offsetParent) {
			curleft = obj.offsetLeft
			curtop = obj.offsetTop
			while (obj = obj.offsetParent) {
				curleft += obj.offsetLeft
				curtop += obj.offsetTop
			}
		}
		return [curleft,curtop];
	}
	function getHeight (id) {  
		var gh = document.getElementById(id).offsetHeight;
		return gh;
	}
	function getWidth (id) {  
		var gh = document.getElementById(id).offsetWidth;
		return gh;
	}
	/* function getTop (id) {  
		var gh = document.getElementById(id).offsetTop;
		return gh;
	}
	function getLeft (id) {  
		var gh = document.getElementById(id).offsetLeft;
		return gh;
	} */
	function getCenterXY(divWidthOrHeight,objWidthOrHeight) {
		return (divWidthOrHeight - objWidthOrHeight) / 2;
	}
	function getShowXY(divId,objWidth,objHeight) { // function to display center of object // div  table etc
		divWidth = getWidth(divId);
		divHeight = getHeight(divId);
		
		var obj = $(divId);
		leftTop = findPos(obj);
		
		divLeft = leftTop[0];
		divTop = leftTop[1];
		
		_x = getCenterXY(divWidth,objWidth) + divLeft;
		_y = getCenterXY(divHeight,objHeight) + divTop;
		var ShowXY=new Array(_x,_y);
		//debug ?
		//str = "divTop:"+divTop+" divLeft:"+divLeft;
		//str += "\ndivWidth:"+divWidth+" divHeight:"+divHeight;
		//str += "\n_x:"+_x+" _y:"+_y;
		//alert(str);
		return ShowXY;
	}
	function showLoading() {
		xy = getShowXY('innertgh',54,55);
		_x = xy[0];
		_y = xy[1];
		//kekalkan y
		_y =  417.5;
		// Bila bila .. check id loading .. xde..? create kan.. ade.. set position dan show mcm biasa.
		var obj = $('loadingMe');
		obj.style.position = 'absolute';
		obj.style.top = _y+'px';
		obj.style.left = _x+'px';		
		obj.style.display = '';
	}
	function hideLoading() {
		var obj = $('loadingMe');
		obj.style.position = 'absolute';
		obj.style.top = -100+'px';
		obj.style.left = -100+'px';		
		obj.style.display = 'none';
	}
	function resizeSider(source,arrdiv) {
		var height1 = getHeight(source);
		for (var i=0;i<arrdiv.length;i++) {
			$(arrdiv[i]).style.height = height1 +'px';
		}
	}