var UI = { Selection : { Server: null, Perform : null }, hideSubMenu: null, displayThis: null, hideThis: null, SlidingMenu: null, slidingNaviMenu: null, 
	setArrowsPosition: null, changeAppearance:null, returnOriginalApp: null}


	UI.sectionActive = null
	UI.submenus = new Array("thegroup", "innovation", "production", "quality", "productsandsales")
	UI.hideSubMenu = function(){
		size = UI.submenus.length
		for (i = 0; i < size; i++){
			$(UI.submenus[i]).style.display = 'none'
		}
	}

	UI.displayThis = function(par){
			$(par).style.display = 'block'
			if (!(par == sectionActive)){
				document[par].src = 'images/btn_' + par + '_on.gif';
			}
	}

	UI.hideThis = function(par){
			$(par).style.display = 'none'
			if (!(par == sectionActive)){
				document[par].src = 'images/btn_' + par + '.gif';
			}
	}

	UI.setSection = function(par){
		sectionActive = par;
	}


UI.alreadyopened = false
UI.slidingNaviMenu = function(par){
	
		if (UI.alreadyopened == false){ 
			UI.alreadyopened = par
			new Effect.BlindDown(par, {duration: 0.4})
		}/*
		else {
			if ((UI.alreadyopened != par) && (UI.alreadyopened != false)){
				new Effect.BlindUp(UI.alreadyopened, {duration: 0.4})
				UI.alreadyopened = par
				timer = setTimeout(new Effect.BlindDown(par, {duration: 0.4}),3000);
			}
		}*/
		else if ((UI.alreadyopened != par) && (UI.alreadyopened != false)){
			new Effect.BlindUp(UI.alreadyopened, {duration: 0.4})
			UI.alreadyopened = par
			timer = setTimeout(new Effect.BlindDown(par, {duration: 0.4}),3000);
		}
		else if ((UI.alreadyopened == par) && (UI.alreadyopened != false)){
			new Effect.BlindUp(UI.alreadyopened, {duration: 0.4})
			UI.alreadyopened = false
		}
}

UI.setArrowsPosition = function(par){
	if (par == "centraline"){
		$('indicatoretop').style.left = '55px'
		$('indicatorebottom').style.left = '55px'
	}
}
	
UI.changeAppearance = function(idc){
		$(idc).style.background = '#FFCC33'
		$(idc).style.color = 'black'
}
	
UI.returnOriginalApp = function(openedid){
		$(openedid).style.background = 'white'
		$(openedid).style.color = '#555'
}
	

