ProgressBar.prototype._HideProgressBar_ = function()
{
	$("#ProgressLoadingText").css("display", "none");
	$("#ProgressBar").css("display", "none");
	$("#ProgressProcess").css("display", "none");
	$("#ProgressRate").css("display", "none");
};
ProgressBar.prototype._GetValue_ = function()
{
	return $("#ProgressRate").text();
};
ProgressBar.prototype._SetValue_ = function(Value)
{
	$("#ProgressProcess").css("width", 3*Value+"px");
	$("#ProgressRate").text(Value+"%");
};
ProgressBar.prototype._ProgressRate_ = function(StartPercent, EndPercent)
{
	var value=StartPercent;
	var SetInterval = setInterval(function(){
		if(value<=EndPercent)
		{
			ProgressBar.prototype._SetValue_(value);
			value+=1;
		}
		else
		{
			clearInterval(SetInterval);
		}
	},10);
};
ProgressBar.prototype._ProgressBarTranslateHtml_ = function(Html)
{
	var OldIndex=0, NewIndex=0, NewHtml="";
	while((NewIndex = Html.indexOf("[$^", OldIndex)) > 0 && Html.indexOf("^$]", OldIndex) >0)
	{
		ReplaceHtml = Html.substring(Html.indexOf("[$^", OldIndex), Html.indexOf("^$]", OldIndex)+3);
		NewHtml = Html.substring(Html.indexOf("[$^", OldIndex)+3, Html.indexOf("^$]", OldIndex));
		Html = Html.replace(ReplaceHtml, Global_ProgressBarTranslateJson[NewHtml]);
		OldIndex = NewIndex;
	}
	return Html;
};

ProgressBar.prototype._LoadProgressBar_ = function()
{
	var Language = ProgressBar.prototype._GetSaveLanguageTxt_();
	Global_ProgressBarTranslateJson = ProgressBar.prototype._GetProgressBarTranslateJson_(Language);
	var Class = new LoadHtml();
	var Html = Class.ReadHtml("./Plugin/Main/html/ProgressBar.html");
	Class = new ProgressBar();
	Html = Class.ProgressBarTranslateHtml(Html);
	$("body").append(Html);
};

ProgressBar.prototype._GetSaveLanguageTxt_ = function()
{
	var Language;
	$.ajax(
		{
		url: "./Language/SaveLanguage.txt",
		type:"GET",
		async: false,
		cache:true,
		success: function(msg)
		{
			Language = msg;
		},
		error:function(xhr, ajaxOptions, thrownError)
		{
			console.log(xhr+":"+ajaxOptions+":"+thrownError);
		}
	});
	return Language;
};

ProgressBar.prototype._GetProgressBarTranslateJson_ = function(Language)
{
	var ReturnTranslateJson = "";
	$.ajax(
		{
		url: "./Language/ProgressBar/"+Language+".json",
		type:"GET",
		async: false,
		cache:false,
		success: function(msg)
		{
			ReturnTranslateJson = msg;
		},
		error:function(xhr, ajaxOptions, thrownError)
		{
			console.log(xhr+":"+ajaxOptions+":"+thrownError);
		}
	});
	return ReturnTranslateJson;
};