function changeStyle(id, value)
	{
		var arr_ids = id.split(',');

		for(var i = 0; i < arr_ids.length; i++)
		{
			var obj = document.getElementById(arr_ids[i]);if(obj){obj.style.visibility = value;}
		}
	}

	function hide_parent(id, type)
	{
		if(type == 'tr')
		{
			$(id).parent('td').parent('tr').hide();
		}

		else if(type == 'div')
		{
			$(id).parent('div').hide();
		}

		else if(type == 'opacity')
		{
			$(id).parents('.opacity').hide();
		}
	}

	var a = $.manageAjax();

	function showInfo(field, type, xtra, id)
	{
		var response = true;
		var hover = false;
		var myDiv = field;
		var url;
		var post_data;

		if(!type || type == '')
		{
			type = field;
		}

		var rand = Math.round(Math.random() * 10);

		if(field == 'txtField' || field.substr(0, 8) == 'txtEmail' || field == 'txtTools' || field == 'txtServer' || field == 'txtNotice' || field == 'txtRadio' || field == 'txtRSS' || field == 'txtCurrency')
		{
			url = 'ajax.php?type=' + type;
			post_data = 'xtra=' + xtra + '&id=' + id;
		}

		else if(type == 'search')
		{
			if(field == 'txtError' || field == 'txtAddress')
			{
				$('#' + myDiv).html('<br/><img src=https://www.skanemoderaterna.se/intranet/images/loading_small.gif alt=Laddar... />');
			}

			url = 'ajax_form.php?name=' + xtra;
			post_data = 'value=' + id + '&field=' + field;
		}

		else if(type == 'button' || type == 'save')
		{
			url = 'ajax_db.php?name=' + field;
			post_data = 'value=' + escape(xtra) + '&id1=' + id;
		}

		else if(type == 'button_v2' || type == 'move' || type == 'fetch')
		{
			url = 'ajax_list.php?field=' + field;
			post_data = 'xtra=' + xtra + '&id=' + id;
		}

		else if(type == 'editable1')
		{
			url = 'ajax_editable.php?type=1';
			post_data = 'field=' + field + '&xtra=' + xtra;
		}

		else if(type == 'editable2')
		{
			url = 'ajax_editable.php?type=2';
			post_data = 'field=' + field + '&xtra=' + xtra;
		}

		else if(field = 'changeValue')
		{
			myDiv = '';
			var myField = eval('document.form.' + type);

			url = 'ajax_form.php?name=' + type;
			post_data = 'value=' + xtra;
		}

		if(url != '')
		{
			$('#loading_div').html('<img src=https://www.skanemoderaterna.se/intranet/images/loading_small.gif alt=Laddar... />');

			a.add({
				url: 'https://www.skanemoderaterna.se/intranet/include/' + url,
				type: 'POST',
				processData: false,
				data: post_data,
				success: function(data){
					if(data.length > 0 && response == true)
					{
						if(data == 'reload')
						{
							window.location.reload(true);
						}

						else if(data == 'logout')
						{
							window.location.href='../logout/';
						}

						else if(myDiv != '' && document.getElementById(myDiv))
						{
							$('#' + myDiv).html(data);

							if(data.length < 9000)
							{
								$(document).ready(function()
								{
									$(function()
									{
										$('a, img, span').tooltip();
									});

									/*Detta används när listUser() tas fram*/
									$('.showthis').hide();

									$('.hover').hover(
										function(){
											$(this).children('.showthis').show();
										},
										function(){
											$(this).children('.showthis').hide();
										}
									);});
							}
						}

						else if(myField && myField != '')
						{
							myField.value = data;
						}
					}

					else
					{
						$('#' + myDiv).html('');
					}

					$('#loading_div').html('');
				}				
			});
		}
	}