function fake_post(address_target,params)
	{

	var adrt = address_target.split('|');
	var url = adrt[0];
	var target = adrt[1];

	//napravi nova forma 
	var form = document.createElement( "form" );
	form.method = 'POST';
	form.action = url;

	if(target)
		{
		form.target  = target;
		}

	//Zapochi da nabivash vytre inputcheta
	

	var params_array = params.split(',');
	for (i=0;i<params_array.length;i++)
		{
		pma = params_array[i].split('=');
		name = pma[0];
		value = pma[1];

		//JS TRIM :)
		name = name.replace(/^[\s]+/,'');
		value = value.replace(/^[\s]+/,'');

		name = name.replace(/[\s]+$/,'');
		value = value.replace(/[\s]+$/,'');
		
		input_el = document.createElement( "input" );
		input_el.type = 'hidden';
		input_el.name = name;
		input_el.value = value;

		form.appendChild(input_el);
		
		}

	//skrii shibanata forma ot shibani FF
	form.style['display'] = 'none';

	//NAII FORMATA U DOKUMENTO
	document.body.appendChild(form);

	//ARE ZAMINAVAY
	form.submit();
	}


function gid(id)
	{
	return document.getElementById(id);
	}

function clk(id)
	{
	gid('menu_dot'+id).style.background = 'black';
	}

function unclk(id)
	{
	gid('menu_dot'+id).style.background = '#EDC623';
	}



function ipop(url) {
  window.open(url,'ipop','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150')
}



function insert_option()
	{
	var all_options = gid('all_options');
	var options = gid('options');

	if(!(all_options.value>0))
		{
		alert('No option selected');
		}
	
	var found = 0;

	if(options.length>0)
		{
		for(key=0;key<options.length;key++)
			{
			if(options.options[key].value == all_options.value)
				found = 1;
			}
		}



	if(found!=1)
		{
		options.options[options.options.length] = new Option(all_options.options[all_options.selectedIndex].text,all_options.options[all_options.selectedIndex].value);	
		}

	}


function delete_option()
	{
	var options = gid('options');
	if(options.length>0)
		{
		for(key=0;key<options.length;key++)
			{
			if(options.options[key].selected)
				{
				options.options[key] = null;
				}
			}
		}
	}



function select_all(obj)
{	
	for (i=0 ;i < obj.options.length; i++)
	{
	obj.options[i].selected = true;
	}
}



function show_hide(id)
	{
	if(gid(id).style.display == 'none')
		{
		gid(id).style.display = ''
		}
	else{
		gid(id).style.display = 'none'
		}
	}


