// JavaScript Document
function Reposition(num, num2)
{
    if(document.getElementById) // Netscape 6.0+ and Internet Explorer 5.0+
    {
    	elm=document.getElementById(num);
		elm2=document.getElementById(num2);
        if (document.all && !window.opera) {
			x = elm.clientHeight;
			z = elm2.clientHeight;
        }  
        else {
			x = elm.clientHeight;
			z = elm2.clientHeight;
		}
		
		az = -1;
			
		if (x > z)
		{
			az = 1;
		}
		else if (x < z)
		{
			az = 3;
		}
			
        if (document.all && !window.opera) {
			switch(az)
			{
				case 1:
					elm2.style.height = x;
					break;
				/*case 2:
					elm2.style.height = y;
					elm.style.height = y;
					break;*/
				case 3:
					elm.style.height = z;
					break;
			}
        }
        else {
			switch(az)
			{
				case 1:
		        	//elm3.style.height = x + "px";
					elm2.style.height = x + "px";
					break;
				/*case 2:
					elm2.style.height = y + "px";
					elm.style.height = y + "px";
					break;*/
				case 3:
					elm.style.height = z + "px";
					//elm3.style.height = z + "px";
					break;
			}
        }
        elm.style.display = "block";
		elm2.style.display = "block";
		//elm3.style.display = "block";
	}
	//window.setTimeout("Reposition('left_menu', 'right_menu2', 'center')",10);
}

function goTop(acceleration, time) {
	acceleration = acceleration || 0.1;
	time = time || 16;

	var dx = 0;
	var dy = 0;
	var bx = 0;
	var by = 0;
	var wx = 0;
	var wy = 0;

	if (document.documentElement) {
		dx = document.documentElement.scrollLeft || 0;
		dy = document.documentElement.scrollTop || 0;
	}
	if (document.body) {
		bx = document.body.scrollLeft || 0;
		by = document.body.scrollTop || 0;
	}
	var wx = window.scrollX || 0;
	var wy = window.scrollY || 0;

	var x = Math.max(wx, Math.max(bx, dx));
	var y = Math.max(wy, Math.max(by, dy));

	var speed = 1 + acceleration;
	window.scrollTo(Math.floor(x / speed), Math.floor(y / speed));
	if(x > 0 || y > 0) {
		var invokeFunction = "goTop(" + acceleration + ", " + time + ")"
		window.setTimeout(invokeFunction, time);
	}
}
