function showPromo(promo) {
	clearTimeout(wait);

	promoname = 'arataOferta'+promo;
	promonavname = 'oferteNav'+promo;

	currentpromoname = 'arataOferta'+currentpromo;
	document.getElementById(currentpromoname).style.display = 'none';

	if(totalPromotii > 1){
		currentpromonavname = 'oferteNav'+currentpromo;
		document.getElementById(currentpromonavname).className = '';
	}

	document.getElementById(promoname).style.display = 'block';
	if(totalPromotii >= 1) { document.getElementById(promonavname).className = 'active'; }

	currentpromo = promo;

	/* start nav rollover */
	for(var i = 1; i <= totalPromotii; i++) {
		document.getElementById('oferteNav'+i).onmouseover = function () {
			clearTimeout(wait);
		}
		document.getElementById('oferteNav'+i).onmouseout = function () {
			clearTimeout(wait);
			wait = setTimeout('nextPromo()', 1400);
		}
	}
	/* end nav rollover */

	/* start oferte rollover */
	for(var i = 1; i <= totalPromotii; i++) {
		if(document.getElementById('arataOferta'+i).style.display == 'block') {
			document.getElementById('arataOferta'+i).onmouseover = function () {
				clearTimeout(wait);
			}

			document.getElementById('arataOferta'+i).onmouseout = function () {
				clearTimeout(wait);
				wait = setTimeout('nextPromo()', 1400);
			}
		}
	}
	/* end oferte rollover */

	wait = setTimeout('nextPromo()', 1400);
	clearTimeout(0);
}

/* start setari implicite */
currentpromoname = 'arataOferta1';
currentpromonavname = 'oferteNav1';
currentpromo = 1;
totalPromotii = 1;
wait = 0;
/* end setari implicite */

function nextPromo() {
 if(currentpromo < totalPromotii) showPromo(currentpromo+1);
 else showPromo(1);
}
$(document).ready(function(){
	$('ul.recNo li a').click(function(){
		return false;
	});
});

