	function calcObjectCenterPoint	( 
										ElementName		,
										x_Margin		,
										y_Margin		,
										moveDirect		,
										viewflag
									) 
	{
		var viewElement = document.getElementById( ElementName );
		var viewElementHeight;
		var viewElementWidth;
		var x_Margin_p;
		var y_Margin_p;
		
		if ( viewflag == "view" ) {   
//			viewElementHeight = (window.innerHeight - (y_Margin*2)); 
//			viewElementWidth  = (window.innerWidth  - (x_Margin*2));
//			viewElement.style.height = viewElementHeight + "px"; 
//			viewElement.style.width  = viewElementWidth  + "px";

			viewElementHeight = window.innerHeight*(100-(y_Margin*2)); 
			viewElementWidth  = window.innerWidth *(100-(x_Margin*2));
			viewElementHeight = (viewElementHeight - (viewElementHeight%100))/100; 
			viewElementWidth  = (viewElementWidth  - (viewElementWidth %100))/100;
			y_Margin_p          = window.innerHeight*y_Margin;
			x_Margin_p          = window.innerWidth *x_Margin;
			y_Margin_p = (y_Margin_p - (y_Margin_p%100))/100; 
			x_Margin_p = (x_Margin_p - (x_Margin_p%100))/100;
			
			viewElement.style.height = (100-(y_Margin*2)) + "%"; 
			viewElement.style.width  = (100-(x_Margin*2)) + "%";

			viewElement.style.left   = x_Margin + "%";
			viewElement.style.top    = y_Margin + "%";   
			if ( moveDirect == "top" ) {
				menuElementMoveTimmer( ElementName, (viewElementHeight * -1), y_Margin_p, "top", viewElement.style.top );
			} else 
			if ( moveDirect == "bottom" ) {
				menuElementMoveTimmer( ElementName, (viewElementHeight+(y_Margin_p*2)), y_Margin_p, "top", viewElement.style.top );
			} else 
			if ( moveDirect == "left") {
				menuElementMoveTimmer( ElementName, (viewElementWidth  * -1), x_Margin_p, "left", viewElement.style.left );
			} else 
			if ( moveDirect == "right") {
				menuElementMoveTimmer( ElementName, (viewElementWidth+(x_Margin_p*2)), x_Margin_p, "left", viewElement.style.left );
			}
		} else {
			viewElement.style.height = "0%"; 
			viewElement.style.width  = "0%";
		}
	}
	



	function menuElementMove( 
								moveElementName	, 
								viewElementName	, 
								moveDirect		 
							) 
	{
		var moveElement = document.getElementById( moveElementName );
		var viewElement = document.getElementById( viewElementName );
		var moveOption; 
		var moveOptionValue; 

		var move_start  = 0;
		var move_end    = 0;
		var move_step   = 0;

		var viewElementHeight;
		var viewElementWidth;
		
		if 		( moveDirect == "top"    ) moveOptionValue = moveElement.style.top;   
		else if ( moveDirect == "bottom" ) moveOptionValue = moveElement.style.bottom;
		else if ( moveDirect == "left"   ) moveOptionValue = moveElement.style.left;
		else if ( moveDirect == "right"  ) moveOptionValue = moveElement.style.right;
		else {
			// Error
			alert( "menuElementMove() -- moveDirect invalid !!!. [" + moveDirect + "]");
			return;
		}
		if ( moveOptionValue.charAt(0) == '-' ) moveOption = "view";
		else 									moveOption = "hidden";
		
		if ( moveDirect == "top" || moveDirect == "bottom" ) {
			
			viewElementHeight = viewElement.offsetHeight;
			
			if ( moveOption == "hidden" ) {
				move_start  = 0;
				move_end    = (viewElementHeight*(-1));
			} else {
				move_start  = (viewElementHeight*(-1));
				move_end    = 0;
			}
			
		} else
		if ( moveDirect == "left" || moveDirect == "right" ) {
			
			viewElementWidth  = viewElement.offsetWidth;
						
			if ( moveOption == "hidden" ) {
				move_start  = 0;
				move_end    = (viewElementWidth*(-1));
			} else {
				move_start  = (viewElementWidth*(-1));
				move_end    = 0;
			}
		}
		
		menuElementMoveTimmer( moveElementName, move_start, move_end, moveDirect, "none" );
		
		return moveOption;
	}

	function menuElementMoveTimmer	( 
										moveElementName	, 
										move_start		, 
										move_end		, 
										moveDirect		,
										org_value
									)
	{
		var moveElement = document.getElementById( moveElementName );

		var move_step;
		var move_pos;

		if ( move_start > move_end ) {
			move_step = (((move_start - move_end)-((move_start - move_end)%5))/5);
			if ( move_step <= 10 ) move_step = 10; 
			move_step = move_step*(-1);  
		} else {
			move_step = (((move_end-move_start)-((move_end - move_start)%5))/5);
			if ( move_step <= 10 ) move_step = 10; 
		}

		move_pos  = move_start + move_step;
		
		if ( ((move_start > move_end) && (move_pos <= move_end)) || 
			 ((move_start < move_end) && (move_pos >= move_end)) ) {
			move_pos = move_end;
		} 

		
		if ( moveDirect == "top" ) {
			moveElement.style.top    = move_pos + "px";   
		} else
		if ( moveDirect == "bottom" ) {
			moveElement.style.bottom = move_pos + "px";
		} else
		if ( moveDirect == "left" ) {
			moveElement.style.left   = move_pos + "px";
		} else
		if ( moveDirect == "right" ) {
			moveElement.style.right  = move_pos + "px";
		}

		if ( move_pos != move_end ) {
			var call_fun = "menuElementMoveTimmer( \"" + moveElementName + "\", " + move_pos + ", " + move_end + ", \"" + moveDirect + "\" ,\"" + org_value + "\")";
			t = setTimeout( call_fun, 30);
		} else {
			if ( org_value != "none" ) {
				if      ( moveDirect == "top"    ) moveElement.style.top    = org_value;   
				else if ( moveDirect == "bottom" ) moveElement.style.bottom = org_value;
				else if ( moveDirect == "left"   ) moveElement.style.left   = org_value;
				else if ( moveDirect == "right"  ) moveElement.style.right  = org_value;
			}
		}
	} 

