


function showMenu(layer, x0, y0, x1, y1, finalAlpha, spring, downVelocity){
	l = document.getElementById(layer);
	l.style.MozOpacity = 0;
	MM_showHideLayers(layer,'','show')
	show(layer, 0, finalAlpha);
	var obj = MM_findObj(layer);
//	obj.style.left = x0;
//	obj.style.top = y0;
	obj.style.left = x1;
	obj.style.top = y1;
	if (spring==1){
		//moveToXSpring(layer, x1, 0);
		//moveToYSpring(layer, y1, 0);
	}
	else{
		if (downVelocity == '') downVelocity = 5;
		moveToY(layer, y1, downVelocity, x1);
	}
	MM_showHideLayers('hideMenus','','show');
}

function show(layer, a, a2){
	a = a + 10.0;
	if (ie){//Internet Explorer
		MM_changeProp(layer,'','style.filter','alpha(Opacity='+a+')','DIV');
	}
	else{//Netscape
		l = document.getElementById(layer);
		if (a < 100) l.style.MozOpacity = a/100.0;
	}
	if (a < a2){
		setTimeout("show('"  +layer+"' , "+a+ "," + a2 + ")", 20);
	}
	else{
		MM_changeProp(layer,'','style.filter','alpha(Opacity='+a+')','DIV');
		l = document.getElementById(layer);
		if (a < 100) l.style.MozOpacity = a2/100.0;
		else l.style.MozOpacity = 0.99;
	}
}

function moveToX(layer, x, incX){
	var obj = MM_findObj(layer);
	var x0 = parseInt(obj.style.left);
	if ( (x0<x && incX>0) || (x0>x && incX<0) ){
		//var tx = (x - x0)/5.0;
		//incX = incX/1.3+tx;
		obj.style.left = parseInt(obj.style.left) + incX;
		setTimeout("moveToX('" +layer+ "',"+ x + "," + incX + ")", 40);
	}
	else{
		obj.style.left = x;
	}
}

function moveToY(layer, y, incY, x1){
	var obj = MM_findObj(layer);
	var y0 = parseInt(obj.style.top);
	if ( (y0<y && incY>0) || (y0>y && incY<0) ){
		//var ty = (y - y0)/5.0;
		//incY = incY/1.3+ty;
		obj.style.top = parseInt(obj.style.top) + incY;
		setTimeout("moveToY('" +layer+ "',"+ y + "," + incY + "," + x1 + ")", 40);
	}
	else{
		obj.style.top = y;
		//moveToX(layer, x1, 5);
	}
}

function moveToXSpring(layer, x, incX){
	var obj = MM_findObj(layer);
	var x0 = parseInt(obj.style.left);
	if (x != x0){
		var tx = (x - x0)/5.0;
		incX = incX/1.3+tx;
		obj.style.left = parseInt(obj.style.left) + incX;
		setTimeout("moveToXSpring('" +layer+ "',"+ x + "," + incX + ")", 40);
	}
	else{
		obj.style.left = x;
	}
}

function moveToYSpring(layer, y, incY){
	var obj = MM_findObj(layer);
	var y0 = parseInt(obj.style.top);
	if (y != y0){
		var ty = (y - y0)/5.0;
		incY = incY/1.3+ty;
		obj.style.top = parseInt(obj.style.top) + incY;
		setTimeout("moveToYSpring('" +layer+ "',"+ y + "," + incY+ ")", 40);
	}
	else{
		obj.style.top = y;
	}
}

var bHideMenus = 0;
function hideMenus(){
	hideM_topBlue();
	bHideMenus = 0;
	setTimeout("hideM()", 1000);
}

function hideM(){
	if (bHideMenus != 1){
		hideM_2nd();
		MM_showHideLayers('hideMenus','','hide');
		hideM_topBlue();
	}
}

function hideM_2nd(){
	MM_showHideLayers('2ndMenu_1_Div','','hide');
	MM_showHideLayers('2ndMenu_2_Div','','hide');
	MM_showHideLayers('2ndMenu_3_Div','','hide');
	MM_showHideLayers('2ndMenu_4_Div','','hide');
	hideM_3rd();
}
function hideM_3rd(){
	MM_showHideLayers('3rdMenu_1_Div','','hide');
	MM_showHideLayers('3rdMenu_2_Div','','hide');
	MM_showHideLayers('3rdMenu_3_Div','','hide');
	MM_showHideLayers('3rdMenu_4_Div','','hide');
	MM_showHideLayers('3rdMenu_5_Div','','hide');
}

function hideM_topBlue(){
		MM_showHideLayers('languageSelection','','hide');

}



