////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function change_language(language)
{
	try
	{
		document.getElementById('language').value = language;
		document.getElementById('language_form').submit();
	}
	catch(err)
	{
	}
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function show_legal_dialog()
{
	try
	{
		legal_dialog  = $('#legal_dialog').dialog({
							bgiframe: true,
							modal: true,
							resizable: false,
							width:500,
							height:260,
							show: "blind",
							hide:"blind",
							buttons: { Ok: function() { $(this).dialog('close'); }}
						});
		legal_dialog.dialog('open');

	}
	catch(err)
	{

	}
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function show_publicitam_dialog()
{
	try
	{
		agrements_d = legal_dialog  = $('#publicitam_dialog').dialog({
							bgiframe: true,
							modal: true,
							resizable: false,
							width:600,
							show: "blind",
							hide:"blind",
							buttons: { Ok: function() { $(this).dialog('close'); }}
						});
		legal_dialog.dialog('open');
	}
	catch(err)
	{}
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function show_agreements_dialog()
{
	try
	{
		agrements_d = legal_dialog  = $('#agreements_dialog').dialog({
							bgiframe: true,
							modal: true,
							resizable: false,
							width:500,
							show: "blind",
							hide:"blind",
							buttons: { Ok: function() { $(this).dialog('close'); }}
						});
		legal_dialog.dialog('open');
	}
	catch(err)
	{
	}
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function show_add_publicity_dialog()
{
	try
	{
		add_publicity = legal_dialog  = $('#add_publicity').dialog({
							bgiframe: true,
							modal: true,
							resizable: false,
							width:500,
							show: "blind",
							hide:"blind",
							buttons: { Ok: function() { $(this).dialog('close'); }}
						});
		add_publicity.dialog('open');
	}
	catch(err)
	{

	}
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function show_add_product_dialog()
{
	try
	{
		add_product = legal_dialog  = $('#add_products').dialog({
							bgiframe: true,
							modal: true,
							resizable: false,
							width:500,
							show: "blind",
							hide:"blind",
							buttons: { Ok: function() { $(this).dialog('close'); }}
						});
		add_product.dialog('open');
	}
	catch(err)
	{

	}
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function show_artist_dialog()
{
	try
	{
		agrements_d = legal_dialog  = $('#artist').dialog({
							bgiframe: true,
							modal: true,
							resizable: false,
							width:600,
							show: "blind",
							hide:"blind",
							buttons: { Ok: function() { $(this).dialog('close'); }}
						});
		legal_dialog.dialog('open');
	}
	catch(err)
	{}
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function show_suggestions_dialog()
{
	try
	{
		suggestions = legal_dialog  = $('#suggestions').dialog({
							bgiframe: true,
							modal: true,
							resizable: false,
							width:500,
							show: "blind",
							hide:"blind",
							buttons: { Ok: function() { $(this).dialog('close'); }}
						});
		suggestions.dialog('open');
	}
	catch(err)
	{}
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function show_remember_event(event_id, event_title)
{
	try
	{		
		$("#event_name_remember").html(event_title);
		$("#id_eventid").val(event_id);

		suggestions = legal_dialog  = $('#remember_dialog').dialog({
							bgiframe: true,
							modal: true,
							resizable: false,
							width:500,
							show: "blind",
							hide:"blind",
							buttons: {
								Ok: function() {
									$('#event_remember_form').submit();
								},
								Cancel: function() {
									$(this).dialog('close');
								}
							}
						});
		suggestions.dialog('open');
		$("#email1").focus();		
	}
	catch(err)
	{}
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function load_messages()
{			
	animation();
	setInterval("animation()",10000);

}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

function animation()
{
	$("#messages_text").text(message[message_id]);
	$("#messages_text").fadeOut("slow", function() {		
		$("#messages_text").fadeIn("slow", function() {
			$("#messages_text").fadeOut("slow", function() {
				$("#messages_text").fadeIn("slow", function() {
					if (message_id >= message.length)
					{
						message_id = 0;
					}
				});
			});				
		});		
	});			
	
	
	message_id = message_id + 1;
}
