/**
 *	JS click action, opens sidemenu accordion panel
 */
accAction = new function() {};

/**
 * Global variable, number of accordion tab to open
 * 
 */
accAction.tabNumber = 6;

accAction.openLoginBox = function() {
	//console.log(sideMenuAccordion.panels[6].tabindex);
	//console.log(sideMenuAccordion._panels[6].getAttribute('tabindex'));
	loginStatus = fec.getUserData();
	if(loginStatus.uid == 0) {
		sideMenuAccordion.openPanel(accAction.tabNumber);
	}
	return false;
}

/**
 * Checks whether accordion content is ready and sets delay on fireing main function
 *
 */
/*
accAction.openLoginBox = function() {
	YAHOO.util.Event.onContentReady('c170',function() {		
		setTimeout(accAction.action,100);
	});
}
*/

/** -end- */

function setContainerSize(elId, height)	{
	var el = document.getElementById(elId);
	var parentEl = el.parentNode;

	if (typeof height != "undefined") {
		el.style.height = height+"px";
		el.height = height;
		if (parentEl) {
			parentEl.style.height = height+"px";
			parentEl.height = height;
		}
	}
}

function toogleVisibility(elID) {
	var el = document.getElementById(elID);
	el.style.display = el.style.display == 'none' ? 'inherit' : 'none'; 
}

/**
 * French language redirection
 */
langRed = function redirectFrench() {
	YAHOO.util.Event.onContentReady('lang-fr',function() {	
		fr = document.getElementById("lang-fr");
		
		fr.childNodes[0].setAttribute("onclick","self.location='google.pl'");
		fr.childNodes[0].setAttribute("href","http://google.pl");				
	});
}
