function init_navi() {
	aAllDiv = document.getElementsByTagName('DIV');
	iTimeOffset = 100;
	for (i = 0; i < aAllDiv.length; i++) {
		if (aAllDiv[i].className.substring(0, 7) == 'topItem' && aAllDiv[i].style.visibility == 'hidden') {
			aAllDiv[i].style.top = "25px";
			aAllDiv[i].style.height = "0px";
			aAllDiv[i].style.visibility = 'visible';
			
			iTimeOffset += 100;
			window.setTimeout("move_button_top(" + i + ", 0)", iTimeOffset);
		}
		
		if (aAllDiv[i].id == 'sideItem_0' && aAllDiv[i].style.visibility == 'hidden') {
			aAllDiv[i].style.width = "0px";
			aAllDiv[i].style.visibility = 'visible';
			
			iTimeOffset += 100;
			window.setTimeout("move_button_side(" + i + ", 153)", iTimeOffset);
		}
		
		if (aAllDiv[i].className.substring(0, 10) == 'bottomItem' && aAllDiv[i].style.visibility == 'hidden') {
			aAllDiv[i].style.width = "0px";
			aAllDiv[i].style.visibility = 'visible';
			
			
			iTimeOffset += 100;
			if (aAllDiv[i].className == 'bottomItemActive') {
				window.setTimeout("move_button_side(" + i + ", 158)", iTimeOffset);
			} else {
				window.setTimeout("move_button_side(" + i + ", 153)", iTimeOffset);
			}
		}
	}
}

function move_button_top(iButtonID, iTop) {
	aAllDiv = document.getElementsByTagName('DIV');
	oButton = aAllDiv[iButtonID];
	
	iCurrentTop = oButton.style.top.substring(0, oButton.style.top.length - 2) * 1;
	iCurrentHeight = oButton.style.height.substring(0, oButton.style.height.length - 2) * 1;
	
	if (iCurrentTop != iTop) {
		iBy = Math.ceil(Math.abs(iCurrentTop - iTop) / 5);
		if (iCurrentTop > iTop) {
			iNewTop = iCurrentTop - iBy;
			iNewHeight = iCurrentHeight + iBy;
		} else {
			iNewTop = iCurrentTop + iBy;
			iNewHeight = iCurrentHeight - iBy;
		}
		oButton.style.top = iNewTop + 'px';
		oButton.style.height = iNewHeight + 'px';
		
		window.setTimeout("move_button_top('" + iButtonID +"', " + iTop + ")", 40);
	}
}

function move_button_side(iButtonID, iWidth) {
	aAllDiv = document.getElementsByTagName('DIV');
	oButton = aAllDiv[iButtonID];
	
	iCurrentWidth = oButton.style.width.substring(0, oButton.style.width.length - 2) * 1;
	if (iCurrentWidth != iWidth) {
		iBy = Math.ceil(Math.abs(iCurrentWidth - iWidth) / 5);
		if (iCurrentWidth > iWidth) {
			iNewWidth = iCurrentWidth - iBy;
		} else {
			iNewWidth = iCurrentWidth + iBy;
		}
		oButton.style.width = iNewWidth + 'px';
		
		window.setTimeout("move_button_side('" + iButtonID +"', " + iWidth + ")", 40);
	}
}
