var eKapijaTimerID = 0;
var eKapijaStartPage=0;
var eKapijaEndPage=0;
function eKapijaShowTab(el,tab){
	if(tab==1){
		el.style.color='#445577';
		el.style.backgroundImage='url(izlog/img/20/eKapijaMenTabOn.gif)';
		document.getElementById('eKapijaMenL').style.backgroundImage='url(izlog/img/20/eKapijaMenLOn.gif)';
		document.getElementById('eKapijaMenC').style.backgroundImage='url(izlog/img/20/eKapijaMenCLOn.gif)';
		document.getElementById('eKapijaMenTab2').style.backgroundImage='url(izlog/img/20/eKapijaMenTabOff.gif)';
		document.getElementById('eKapijaMenTab2').style.color='#ffffff';
		document.getElementById('eKapijaMenR').style.backgroundImage='url(izlog/img/20/eKapijaMenROff.gif)';
		getContent('http://www.posao.ba/izlog/index.php?q=1','eKapijaCnt');
	}
	if(tab==2){
		el.style.color='#445577';
		el.style.backgroundImage='url(izlog/img/20/eKapijaMenTabOn.gif)';
		document.getElementById('eKapijaMenL').style.backgroundImage='url(izlog/img/20/eKapijaMenLOff.gif)';
		document.getElementById('eKapijaMenC').style.backgroundImage='url(izlog/img/20/eKapijaMenCROn.gif)';
		document.getElementById('eKapijaMenTab1').style.backgroundImage='url(izlog/img/20/eKapijaMenTabOff.gif)';
		document.getElementById('eKapijaMenTab1').style.color='#ffffff';
		document.getElementById('eKapijaMenR').style.backgroundImage='url(izlog/img/20/eKapijaMenROn.gif)';
		getContent('http://www.posao.ba/izlog/index.php?q=e','eKapijaCnt');
	}
}
function eKapijaUpdateTimer(){
	if(!document.getElementById('eKapija'+eKapijaStartPage))eKapijaTimerID = setTimeout('eKapijaUpdateTimer()',3000);
    if(document.getElementById('eKapija'+eKapijaStartPage)){
	var eKapijaStartContent=document.getElementById('eKapija'+eKapijaStartPage).innerHTML;
	var i=0;
	var j=0;
	for(var i=eKapijaStartPage;i<50;i++){
	    if(document.getElementById('eKapija'+(i+1))){
		    document.getElementById('eKapija'+i).innerHTML=document.getElementById('eKapija'+(i+1)).innerHTML;
			j=i;
		}else{
		    i=49;
		}
	}
	document.getElementById('eKapija'+j).innerHTML=eKapijaStartContent;
	eKapijaTimerID = setTimeout('eKapijaUpdateTimer()',3000);
    }
}
function eKapijaStart() {
	eKapijaTimerID = setTimeout('eKapijaUpdateTimer()',3000);
}
function eKapijaStop() {
	clearTimeout(eKapijaTimerID);
}

