﻿//language
oLanguage = function()
{
	this.fxShowAllId=null;
	this.fxBlocker=false;
	this.fxFadeTime =720; 
	this.fxBlockerTimeout=this.fxFadeTime*2;
	
	//helper var for fx obj
	this.fx = null;
	//fill inn data
	this.fxLng = document.getElementById('navigation_service_right_languages');
	//this.fx = new fx.Height(this.fxLng, {duration: this.fxFadeTime});
	this.fx = new fx.Opacity(this.fxLng, {duration: this.fxFadeTime});
	this.fx.hide();
	this.fxLng.style.display = '';
	this.fxLngLabel = document.getElementById('navigation_service_right_languages_label');

}
oLanguage.prototype.fxSetXY = function(){
	this.fxLng.style.top = jsfGetObjectY(this.fxLngLabel,"boxMain")-this.fxLng.offsetHeight-5+'px';
	this.fxLng.style.left = jsfGetObjectX(this.fxLngLabel,"boxMain")+this.fxLngLabel.offsetWidth-this.fxLng.offsetWidth+'px';
}
oLanguage.prototype.fxBlocked = function(){
	return this.fxBlocker;
}
oLanguage.prototype.fxBlock = function(){
	this.fxBlocker = true;
	setTimeout("oLng.fxUnblock();",this.fxBlockerTimeout);
}
oLanguage.prototype.fxUnblock = function(){
	this.fxBlocker = false;
}
oLanguage.prototype.fxOpenId = function(id){
	this.fxOpenId = id;
}
oLanguage.prototype.fx = function(fx){
	this.fx = fx;
}
oLanguage.prototype.toggle = function(){
	if(this.fxOpenId!=null)
	{
		this.fx.toggle();
	}
}
oLanguage.prototype.hide = function(){
	if(this.fxOpenId!=null)
	{
		this.fx.hide();
		this.fxOpenId = null;
	}
}
function jsfFXInitLanguage()
{
	oLng = new oLanguage();
}
function jsfToggleLng()
{
	oLng.fxSetXY();
	oLng.toggle();
}
var oLng = null;
//when loaded init class
onload = jsfFXInitLanguage();

