// global functions

// podmiana buttona obrazkowego
function swapButton(ob, image){
		ob.setAttribute('src', 'design/img/menu/'+image+'.gif');
}

// rozwijanie bloku promocje
var tabIdShow = new Array();

tabIdShow[ '1' ] = -1;

var tabIdActShow = new Array();

tabIdActShow[ '1' ] = -1;
tabIdActShow[ '2' ] = -1;
	
function openW( id , turn ){
	var d = document.getElementById('showField_' + id );
	var b = document.getElementById('showTitle_' + id );
	
	if( turn > 0 ) {
		d.style[ 'display' ] = 'none';
		b.innerHTML = 'rozwiń <img src="design/img/icoArrowDown.gif" alt="zobacz więcej" style="position: relative; top: -1px;padding-left: 3px;">';
	} else {
		d.style[ 'display' ] = 'block';
		b.innerHTML = 'zwiń <img src="design/img/icoArrowUp.gif" alt="zobacz więcej" style="position: relative; top: -1px;padding-left: 3px;">';
	}
}

function openWAct( id , turn ){
	var d = document.getElementById( 'fieldShort_' + id );
	var b = document.getElementById( 'fieldLong_' + id );
	
	if( turn > 0 ) {
		d.style[ 'display' ] = 'inline';
		b.style[ 'display' ] = 'none';
	} else {
		d.style[ 'display' ] = 'none';
		b.style[ 'display' ] = 'inline';
	}
}

function moveWAct( id ){
	tabIdActShow[ id ] = !tabIdActShow[ id ];
	openWAct( id , ( tabIdActShow[ id ] ? 1 : -1 ) );
}

function moveW( id ){
	tabIdShow[ id ] = !tabIdShow[ id ];
	openW( id , ( tabIdShow[ id ] ? 1 : -1 ) );
}
  
  
  
function topMenu(what, action) {	
	if (action == 'over') {	
		what.style.background = '#F48000';
		what.style.color = '#FFFFFF';
	} else if (action == 'out') {
		what.style.background = '#FFFFFF';
		what.style.color = '#676767';		
	}
}

function leftMenu(id, action) {	
	var button = document.getElementById(id);	
	if (action == 'over') {	
		button.style.background = '#fafafa';		
	} else if (action == 'out') {
		button.style.background = '#f3f2f2';		
	}
}
