function showUploadStatus(uploadId,progress){
	var xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null){
	  alert ("Your browser does not support AJAX!");
	  return;
	}
	var url="upload_progress2.php";
	url=url+"?id="+uploadId;
	url=url+"&progress="+progress;
	url=url+"&sid="+Math.random();
	spanText=document.createTextNode('Űrlap feldolgozása megkzedve...');

	xmlHttp.onreadystatechange=function(){
	  if(xmlHttp.readyState==4 && xmlHttp.responseXML){
	  	var responseXML=xmlHttp.responseXML;
		var uploadIndicator = document.getElementById('upload_indicator');
		
		
		
		if (uploadIndicator!=null && uploadIndicator.hasChildNodes()){
			uploadIndicator.removeChild(uploadIndicator.childNodes.item(1));
		}else{
			//img
			img=document.createElement('img');
			img.setAttribute('src','./theme/images/loading.gif');
			uploadIndicator.appendChild(img);
			uploadIndicator.className='meter';
		}
		
		progressMeter=document.createElement('span');
		uploadIndicator.appendChild(progressMeter);
		
		
		
		
		/* Progress */
		progress=responseXML.getElementsByTagName('progress')[0].firstChild.nodeValue;
		progressSpan=document.createElement('span');
		

		if (progress==1){
			spanText=document.createTextNode('Feltöltés folyamatban...');
		}else if (progress==2){
			spanText=document.createTextNode('Űrlap feldolgozása folyamatban...');
		}


		progressSpan.appendChild(spanText);
		progressSpan.className='progress';
		progressMeter.appendChild(progressSpan);
		
		
		if (progress==1){
				/* Percent */

				holder=document.createElement('span');
				holder.className='holder';
				progressMeter.appendChild(holder);

				percentText=document.createTextNode(responseXML.getElementsByTagName('width')[0].firstChild.nodeValue+'%');
				percent=document.createElement('span');
				percent.style.display='block';
				percent.style.width=responseXML.getElementsByTagName('width')[0].firstChild.nodeValue+'%';
				percent.className='percent';
				percent.appendChild(percentText);
				holder.appendChild(percent);		
				
				/* Kbyte */
				
				kbyte=document.createElement('span');
				var upl=responseXML.getElementsByTagName('upl')[0].firstChild.nodeValue;
				var total=responseXML.getElementsByTagName('total')[0].firstChild.nodeValue;

				kbyteText=document.createTextNode(upl+'Kb/'+total+'Kb');
				kbyte.appendChild(kbyteText);
				kbyte.style.display='block';
				progressMeter.appendChild(kbyte);
				
				/* Est. Time */
				time=document.createElement('span');
				var esttime=responseXML.getElementsByTagName('eta')[0].firstChild.nodeValue;

				timeText=document.createTextNode('Hátralevő idő: '+esttime+' mp');
				time.appendChild(timeText);
				time.style.display='block';
				progressMeter.appendChild(time);
			}

		}
		
	}

	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
	
	setTimeout("showUploadStatus("+uploadId+","+progress+")",1000);
	
}
