if (moz) emulateHTMLModel();

function PGRedirect(link)
{
    window.location = link;
}

function FSuccess() 
{
	document.all.Success.style.display = "none"; document.all.Success.style.visibility = "hidden";
}
function ErrorHide() 
{
	document.all.Error.style.display = "none"; document.all.Error.style.visibility = "hidden";
}

function SaveLangu(Param) 
{
		$("#loading")
		.ajaxStart(function(){
			$(this).show();
		})
		.ajaxComplete(function(){
			$(this).hide();
		});

		$.ajaxFileUpload
		(
			{
				url:'/events/'+Param+'.php',
				secureuri:false,
				dataType: 'json',
				success: function (data, status)
				{
					if(typeof(data.error) != 'undefined')
					{
						if(data.error != '')
						{
						
						}else
						{
							setTimeout('FRedirect()',500);
						}
					}
				},
				error: function (data, status, e)
				{
					alert(e);
				}
			}
		)
		return false;
}
function FRedirect() 
{
	document.location.href="/";
}
