function showContactPane(pan_id)
{
	var pan_obj = uh_get_object(pan_id);
	//pan_obj.style.position = 'absolute';
	pan_obj.style.visibility = 'visible';
	pan_obj.style.display = 'block';
	//pan_obj.style.top = (pan_obj.offsetTop + 20 )+ "px";
	//pan_obj.style.left = "700px";
}

function hideContactPane(pan_id)
{
	var pan_obj = uh_get_object(pan_id);
	//pan_obj.style.position = 'relative';
	pan_obj.style.visibility = 'hidden';
	//pan_obj.style.display = 'none';
	//pan_obj.style.left = null;
	//pan_obj.style.top = null;
	//pan_obj.style.left = "500px";
}

function finishUploadingPic(obj_id)
{
	// Hide progress bar
	showItem(obj_id);
	hideProgress();}

function getGpsReqStatus(obj_id, req_id)
{
	var div_obj = uh_get_object( obj_id );
	//var descr_obj = uh_get_object( obj_id + "_descr" );

  	if( AJAX != null )
	{
		//alert( 'AJAX is ok' );
		var process_fn = function(res)
		{
			//alert(' RESPONSE IN CALLBACK: ' + res);

			eval( 'var responce_data = ' + res );

			//Sleep(3000);
			var rstat = parseInt(responce_data.reqinfo.status);
			if( isNaN(rstat) )
			{
				return;			}

			var result_text = '';

			if( (rstat >= 0) && (rstat <= 2) )
			{
				timeid = setTimeout("updateRequestStatus(" + req_id + ", '" + obj_id + "')", updatetime);				return;			}

			if( rstat == 3 )
			{
				//alert('request is OK');
				result_text = 'Ваш заказ обработан успешно, ниже приведены ссылки по которым можно скачать данные.<br /><br />';
				for( i=0; i<responce_data.reqinfo.datafiles.length; i++ )
				{
					result_text += 'Файл ' + i + ': <a href="download.php?fn=' + responce_data.reqinfo.datafiles[i] + '">' + responce_data.reqinfo.datafiles[i] + '</a>';				}
			}
			else if( rstat == 4 )
			{
				result_text = 'Запрос, информацию по которому вы хотите получить был обработан успешно, но данные уже удалены с сервера как устаревшие.<br /><br />';			}
			else
			{
				//alert('error in request');
				result_text = 'Во время обработки запроса произошла ошибка формирования данных. Подробнее смотрите на странице ваших данных.<br /><br />';			}

   			//pic_obj.src = responce_data.photoinfo.src;
   			//pic_obj.width = responce_data.photoinfo.w;
   			//pic_obj.height = responce_data.photoinfo.h;
   			//pic_obj.alt = responce_data.photoinfo.alt;
   			div_obj.innerHTML = result_text;
		};

		//showProgress();
		//hideItem(obj_id);

		AJAX.SendRequest('GET', 'rcom=uh_com_status&id=' + req_id, process_fn, null);
	}
}
