function newsSourceLinkInsert(link, title, target, before, after) {
	identity = tinyMCE.get(target);
	identity2 = document.getElementById(link);
	identity3 = document.getElementById(title);
	if(identity.getContent() == '' && identity2.value != '') {
		identity.setContent(before + '<a href="' + identity2.value + '" rel="external">' + identity3.value + '</a>' + after);
	};
};

function jquerySlideToggle(id) {
	$("#"+id).slideToggle('slow', function() {
	});
};

function delayedAjaxContent(link, id) {
	setTimeout("ajaxcontent('" + link + "', '" + id + "');", 1000);
};

function changeStockVariationValue(id, variation, value) {
	document.getElementById('discount_rate').value = '0';
};

function changeStockQuantityVariation(id, variation) {
	var quantity = document.getElementById('product_quantity_' + id + '_variation_' + variation).value;
	ajaxcontent('modules/shop/shop_stock_quantity_variation.php?productid=' + id + '&quantity=' + quantity + '&variation=' + variation, 'changes');
};

function changeStockQuantity(id) {
	var quantity = document.getElementById('product_quantity_' + id).value;
	ajaxcontent('modules/shop/shop_stock_quantity.php?productid=' + id + '&quantity=' + quantity, 'changes');
};

function addProduct(productid, variations) {
	var quantity = document.getElementById('quantity_' + productid);
	var linktext = 'modules/shop/shop_basket_ajax.php?products_id=' + productid + '&quantity=' + quantity.value;
	var variation_array = variations.split(';');
	if(variations != 'none') {
		for (var i = 0; i < variation_array.length; i++) {
			var variation_value = document.getElementById('select_' + productid + '_' + variation_array[i]);
			linktext += '&' + variation_array[i] + '=' + variation_value.value;
		};
	};
	ajaxcontent(linktext, 'ajax_reply_' + productid);
};
	
function calculatePackageRate() {
	
	rate = document.getElementById('discount_rate').value;
	price_original = document.getElementById('discount_price_original').value;
	price = document.getElementById('discount_price').value;
	
	percent_original = price_original / 100;
	percent = price / percent_original;
	percent = 100 - percent;
	percent = Math.round(percent);

	if(percent < 0) {
		alert('x < 0%');
		document.getElementById('discount_rate').value = '0';
		document.getElementById('discount_price').value = price_original;
	};
	
	document.getElementById('discount_rate').value = percent;
};

function calculatePackagePrice() {
	
	rate = document.getElementById('discount_rate').value;
	price_original = document.getElementById('discount_price_original').value;


	price2 = ((price_original / 100) * rate);
	price2 = parseInt(price2);
	price = (price_original - price2);

	document.getElementById('discount_price').value = price;
};

function switchShopImage(id) {
	//Aktív kikapcsolása
	p = getElementsByClassName(document, 'div', 'shop_product_details_image');
	for(i=0;i<p.length;i++)
		{
		p[i].className = 'hidden';
		};
	//Bekapcsolás
	document.getElementById('image_' + id).className = 'shop_product_details_image';
};

function activateShopTab(id) {
	//Aktív tab kikapcsolása
	p = getElementsByClassName(document, 'div', 'shoptabcontent');
	for(i=0;i<p.length;i++)
		{
		p[i].className = 'hidden';
		};
	p = getElementsByClassName(document, 'div', 'shoptab_active');
	for(i=0;i<p.length;i++)
		{
		p[i].className = 'shoptab';
		};
	//Tab bekapcsolása
	document.getElementById('tab_' + id).className = 'shoptab_active';
	document.getElementById('tab_content_' + id).className = 'shoptabcontent';
};

function scroll_position()
	{
	var ScrollTop = document.body.scrollTop;
	if (ScrollTop == 0)
		{
		if (window.pageYOffset)
			{
			ScrollTop = window.pageYOffset;
			}
			else
			{
			ScrollTop = (document.body.parentElement) ? document.body.parentElement.scrollTop : 0;
			};
		};
	return ScrollTop;
	};

function jquery_scroll_to_id(id)
	{
	/*
	[function-description]Scrollozás megadott ID-re[/function-description]
	[function-parameters]id - a cél ID[/function-parameters]
	[function-return][/function-return]
	[function-requires]jQuery[/function-requires]
	*/
	$('html,body').animate({scrollTop: $("#"+id).offset().top},'slow');
	};

function add_tag(id, tag)
	{
	/*
	[function-description]Címke hozzáadása egy input mezőhöz[/function-description]
	[function-parameters]id - az input mező azonosítója
	tag - a címke[/function-parameters]
	[function-return][/function-return]
	*/
	identity = document.getElementById(id);
	if(identity.value == '')
		{
		identity.value = identity.value + tag;
		}
		else
		{
		identity.value = identity.value + ', ' + tag;
		}; 
	};

function dim_in()
	{
	$("#dim").fadeIn();
	};

function dim_out()
	{
	$("#dim").fadeOut();
	};

function popup_open(popup_div, width)
	{
	/*
	[function-description]Kezdőlapi popup ablak feldobása.
	
	Amennyiben egy flash kitakarná a popupot, a flash-t be kell rakni a egy popup_flash div-be, alternatív tartalmat a pupup_alt div-be és kiszedni a kommentelt sorokat ezen funkció és a popup_close() forrásából.[/function-description]
	[function-parameters]width - a popup szélessége[/function-parameters]
	[function-return][/function-return]
	*/
	var x = 0;
	if(self.innerWidth)
		{
		x = self.innerWidth;
		}
	else if(document.documentElement && document.documentElement.clientWidth)
		{
		x = document.documentElement.clientWidth;
		}
	else if(document.body)
		{
		x = document.body.clientWidth;
		};
	var left_margin = (x - width) / 2;
	document.getElementById(popup_div).style.display = "block";
	//Amennyiben egy flash kitakarná a popuopot, a flash-t be kell rakni a popup_flash div-be és kiszedni a kommenteket.
	//document.getElementById('popup_flash').style.display = "none";
	//document.getElementById('popup_alt').style.display = "block";
	
	var objLoad = document.getElementById(popup_div);
	objLoad.style.marginLeft = left_margin+"px";
	objLoad.style.marginTop = scroll_position() + 'px';
	dim_in();
	};

function popup_close(popup_div)
	{
	/*
	[function-description]Kezdőlapi popup ablak bezárása.[/function-description]
	[function-parameters][/function-parameters]
	[function-return][/function-return]
	*/
	document.getElementById(popup_div).style.display = "none";
	//Amennyiben egy flash kitakarná a popuopot, a flash-t be kell rakni a popup_flash div-be és kiszedni a kommenteket.
	//document.getElementById('popup_flash').style.display = "block";
	//document.getElementById('popup_alt').style.display = "none";
	dim_out();
	};

function maximize_wrapper_height()
	{
	total_height = document.documentElement.clientHeight;
	wrapper_height_original = document.getElementById('wrapper').offsetHeight;
	footer_height = document.getElementById('wrapper_footer').offsetHeight;
	wrapper_height = total_height - footer_height;
	if(wrapper_height_original < wrapper_height)
		{
		document.getElementById('wrapper').style.height = wrapper_height + "px";
		};
	};

function addFav()
	{
	if(document.all)
		{
		window.external.AddFavorite(location.href,document.title)
		}
		else
		{
		if(window.sidebar)
			{
			window.sidebar.addPanel(document.title,location.href,'');
			};
		};
	};

function disable_button(id)
	{
	document.getElementById(id).disabled = true;
	};

function increaseFontSize(classname, maxsize)
	{
	p = getElementsByClassName(document, 'div', classname);
	for(i=0;i<p.length;i++)
		{
		if(p[i].style.fontSize)
			{
			var s = parseInt(p[i].style.fontSize.replace("px",""));
			}
			else
			{
			var s = 12;
			};
		if(s!=maxsize)
			{
			s += 1;
			};
		p[i].style.fontSize = s+"px";
		};
	};
	
function decreaseFontSize(classname, minsize)
	{
	p = getElementsByClassName(document, 'div', classname);
	for(i=0;i<p.length;i++)
		{
		if(p[i].style.fontSize)
			{
			var s = parseInt(p[i].style.fontSize.replace("px",""));
			}
			else
			{
			var s = 12;
			};
		if(s!=minsize)
			{
			s -= 1;
			};
		p[i].style.fontSize = s+"px";
		};
	};

function unified()
	{
	var unifiedsize = 0;
	var divs = document.getElementsByTagName("div");
	var num = divs.length;
	for(var i = 0; i < divs.length; i++)
		{
		if(divs[i].className == 'formunified1')
			{
			if(unifiedsize < divs[i].offsetWidth)
				{
				unifiedsize = divs[i].offsetWidth;
				};
			};
		};
	for(var i = 0; i < divs.length; i++)
		{
		if(divs[i].className == 'formunified1')
			{
			divs[i].style.width = (unifiedsize + 'px');
			};
		};
	};

function elements_to_set(id)
	{
	identity = document.getElementById('elements_to_set_' + id);
	identity2 = document.getElementById('elements_to_set');
	if(identity.checked == true)
		{
		identity2.value = identity2.value + ';' + id + ';';
		}
		else
		{
		values = identity2.value.split(';' + id + ';');
		identity2.value = values[0] + values[1];
		};
	};

function shorten_url(url, id, id2)
	{
	if(url !== '')
		{
		var url2 = url.split("/");
		identity = document.getElementById(id);
		identity2 = document.getElementById(id2);
		if(url2[0] == 'http:')
			{
			identity2.value = url2[2];
			}
			else
			{
			identity2.value = url2[0];
			url = ('http://' + url);
			identity.value = url;
			};
		};
	};

function ajaxonline(serverData, serverStatus)
	{
	identity=document.getElementById('chat_online');
 	identity.innerHTML = '';
	identity.innerHTML = (identity.innerHTML + serverData);
	window.scrollTo(0,0);
	setTimeout("ajaxRequest(url_3, ajaxonline)", 3000);
	};

function ajaxcounter(serverData, serverStatus)
	{
	if(counter == 0)
		{
		counter = serverData;
		ajaxRequest(url_2+'?show=start', ajaxchat);
		};
	if(counter !== serverData)
		{
		difference = (serverData - counter);
		counter = serverData;
		ajaxRequest(url_2+'?show='+difference, ajaxchat);
		};
	setTimeout("ajaxRequest(url_1, ajaxcounter)", 1000);
	};

function ajaxchat(serverData, serverStatus)
	{
	identity=document.getElementById('chat_display');
	identity.innerHTML = (serverData + identity.innerHTML);
	};

function ajaxRequest(url, callback)
	{
	var AJAX = null;
	if(window.XMLHttpRequest)
		{
		AJAX=new XMLHttpRequest();
		}
	else
		{
		AJAX=new ActiveXObject("Microsoft.XMLHTTP");
		};
	if(AJAX==null)
		{
		alert("Your browser doesn't support AJAX.");
		return false
		};
	AJAX.onreadystatechange = function()
		{
		if(AJAX.readyState==4 || AJAX.readyState==200)
			{
			callback(AJAX.responseText, AJAX.status);
			};
		};
	//If ajax doesn't work, change POST to GET!
	AJAX.open("POST", url, true);
	AJAX.send(null);
	};

function ajaxcontent(url, id)
	{
	var AJAX = null;
	if(window.XMLHttpRequest)
		{
		AJAX=new XMLHttpRequest();
		}
	else
		{
		AJAX=new ActiveXObject("Microsoft.XMLHTTP");
		};
	if(AJAX==null)
		{
		alert("Your browser doesn't support AJAX.");
		return false
		};
	AJAX.onreadystatechange = function()
		{
		if(AJAX.readyState==4 || AJAX.readyState==200)
			{
			identity=document.getElementById(id);
		 	identity.innerHTML = '';
			identity.innerHTML = (identity.innerHTML + AJAX.responseText);
			};
		};
	//If ajax doesn't work, change POST to GET!
	AJAX.open("POST", url, true);
	AJAX.send(null);
	};

function ajaxcontent_refresh(url, id, timeout)
	{
	var AJAX = null;
	if(window.XMLHttpRequest)
		{
		AJAX=new XMLHttpRequest();
		}
	else
		{
		AJAX=new ActiveXObject("Microsoft.XMLHTTP");
		};
	if(AJAX==null)
		{
		alert("Your browser doesn't support AJAX.");
		return false
		};
	AJAX.onreadystatechange = function()
		{
		if(AJAX.readyState==4 || AJAX.readyState==200)
			{
			identity=document.getElementById(id);
		 	identity.innerHTML = '';
			identity.innerHTML = (identity.innerHTML + AJAX.responseText);
			};
		};
	//If ajax doesn't work, change POST to GET!
	AJAX.open("POST", url, true);
	AJAX.send(null);
	setTimeout("ajaxcontent_refresh('"+url+"', '"+id+"', '"+timeout+"')", timeout);
	};

////////////////////////
// Általános funkciók //
////////////////////////

function seoText(text, id)
	{
	text = text.toLowerCase();
	text = text.replace(/À/g, 'a');
	text = text.replace(/Á/g, 'a');
	text = text.replace(/Â/g, 'a');
	text = text.replace(/Ã/g, 'a');
	text = text.replace(/Ä/g, 'a');
	text = text.replace(/Å/g, 'a');
	text = text.replace(/Æ/g, 'a');
	text = text.replace(/Ç/g, 'c');
	text = text.replace(/È/g, 'e');
	text = text.replace(/É/g, 'e');
	text = text.replace(/Ê/g, 'e');
	text = text.replace(/Ë/g, 'e');
	text = text.replace(/Ì/g, 'i');
	text = text.replace(/Í/g, 'i');
	text = text.replace(/Î/g, 'i');
	text = text.replace(/Ï/g, 'i');
	text = text.replace(/Ð/g, 'd');
	text = text.replace(/Ñ/g, 'n');
	text = text.replace(/Ò/g, 'o');
	text = text.replace(/Ó/g, 'o');
	text = text.replace(/Ô/g, 'o');
	text = text.replace(/Õ/g, 'o');
	text = text.replace(/Ö/g, 'o');
	text = text.replace(/ /g, '-');
	text = text.replace(/Ø/g, '0');
	text = text.replace(/Ù/g, 'u');
	text = text.replace(/Ú/g, 'u');
	text = text.replace(/Û/g, 'u');
	text = text.replace(/Ü/g, 'u');
	text = text.replace(/Ý/g, 'y');
	text = text.replace(/Þ/g, 'p');
	text = text.replace(/ß/g, 'ss');
	text = text.replace(/à/g, 'a');
	text = text.replace(/á/g, 'a');
	text = text.replace(/â/g, 'a');
	text = text.replace(/ã/g, 'a');
	text = text.replace(/ä/g, 'a');
	text = text.replace(/å/g, 'a');
	text = text.replace(/æ/g, 'a');
	text = text.replace(/ç/g, 'c');
	text = text.replace(/è/g, 'e');
	text = text.replace(/é/g, 'e');
	text = text.replace(/ê/g, 'e');
	text = text.replace(/ë/g, 'e');
	text = text.replace(/ì/g, 'i');
	text = text.replace(/í/g, 'i');
	text = text.replace(/î/g, 'i');
	text = text.replace(/ï/g, 'i');
	text = text.replace(/ð/g, 'd');
	text = text.replace(/ñ/g, 'n');
	text = text.replace(/ò/g, 'o');
	text = text.replace(/ó/g, 'o');
	text = text.replace(/ô/g, 'o');
	text = text.replace(/õ/g, 'o');
	text = text.replace(/ö/g, 'o');
	text = text.replace(/÷/g, '');
	text = text.replace(/ø/g, '0');
	text = text.replace(/ù/g, 'u');
	text = text.replace(/ú/g, 'u');
	text = text.replace(/û/g, 'u');
	text = text.replace(/ü/g, 'u');
	text = text.replace(/ý/g, 'y');
	text = text.replace(/þ/g, 'p');
	text = text.replace(/ÿ/g, 'y');
	text = text.replace(/'/g, '');
	text = text.replace(/"/g, '');
	text = text.replace(/\+/g, '');
	text = text.replace(/!/g, '');
	text = text.replace(/%/g, '');
	text = text.replace(/\//g, '');
	text = text.replace(/=/g, '');
	text = text.replace(/\(/g, '');
	text = text.replace(/\)/g, '');
	text = text.replace(/\[/g, '');
	text = text.replace(/\]/g, '');
	text = text.replace(/\$/g, '');
	text = text.replace(/</g, '');
	text = text.replace(/>/g, '');
	text = text.replace(/#/g, '');
	text = text.replace(/&/g, '');
	text = text.replace(/@/g, '');
	text = text.replace(/{/g, '');
	text = text.replace(/}/g, '');
	text = text.replace(/,/g, '');
	text = text.replace(/\./g, '');
	text = text.replace(/;/g, '');
	/*text = text.replace(/-/g, '');*/
	text = text.replace(/\?/g, '');
	text = text.replace(/\*/g, '');
	text = text.replace(/\+/g, '');
	text = text.replace(/\\/g, '');
	text = text.replace(/\|/g, '');
	text = text.replace(/~/g, '');
	text = text.replace(/Ő/g, 'o');
	text = text.replace(/Ű/g, 'u');
	text = text.replace(/ő/g, 'o');
	text = text.replace(/ű/g, 'u');
	text = text.replace(/:/g, '');
	text = text.replace(/„/g, '');
	text = text.replace(/”/g, '');
	identity=document.getElementById(id);
	identity.value = text;
	};

function generate_users_password(password_field)
	{
	var text = prompt('password', "");
	if(text == ""){return;}
	hash = hex_md5(text);
	document.getElementById(password_field).value = hash;
	};

function countdown(id, total)
	{
	identity=document.getElementById(id);
	var seconds = total%60;
	var minutes = (total-seconds)/60;

	if(minutes == 0 && seconds == 0)
		{
		}
		else
 		{
 		total--;
		setTimeout("countdown('" + id + "', '"+total+"')",1000);
		};
	if(seconds < 10)
		{
		seconds = '0' + seconds;
		};
	identity.innerHTML = minutes + ':' + seconds;
	};

function change_visibility(hidden, visible)
	{
	var divs = document.getElementsByTagName("div");
	var num = divs.length;
	for(var i = 0; i < divs.length; i++)
		{
		if(divs[i].className == visible)
			{
			divs[i].className = hidden;
			}
		else if(divs[i].className == hidden)
			{
			divs[i].className = visible;
			};
		};
	};

function change_class(id, newclass)
	{
	identity=document.getElementById(id);
	identity.className=newclass;
	};

function change_between_classes(id, classone, classtwo)
	{
	identity=document.getElementById(id);
	if(identity.className == classone)
		{
		identity.className = classtwo;
		}
	else if(identity.className == classtwo)
		{
		identity.className = classone;
		};
	};

function popupWindow(url, name, width, height, scrollbars, resizable, toolbar, location, directories, status, menubar) {
	if(typeof toolbar == 'undefined') {
		toolbar = 'no';
	};
	if(typeof location == 'undefined') {
		location = 'no';
	};
	if(typeof directories == 'undefined') {
		directories = 'no';
	};
	if(typeof status == 'undefined') {
		status = 'no';
	};
	if(typeof menubar == 'undefined') {
		menubar = 'no';
	};
	if(typeof scrollbars == 'undefined') {
		scrollbars = 'no';
	};
	if(typeof resizable == 'undefined') {
		resizable = 'no';
	};
	settings="toolbar="+toolbar+",location="+location+",directories="+directories+",status="+status+",menubar="+menubar+",scrollbars="+scrollbars+",resizable="+resizable+",width="+width+",height="+height;
	window.open(url,name,settings);
};

function popupimage(image_file, subdirectory)
	{	settings="toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=250,height=250";
	window.open(subdirectory + '/scripts/image_popup.php?image_file='+image_file,Math.floor(Math.random()*9999),settings);
	};

function getElementsByClassName(Element, TagName, ClassName)
	{
	var arrElements = (TagName == "*" && Element.all)? Element.all : Element.getElementsByTagName(TagName);
	var arrReturnElements = new Array();
	ClassName = ClassName.replace(/-/g, "\-");
	var oRegExp = new RegExp("(^|\s)" + ClassName + "(\s|$)");
	var oElement;
	for(var i=0; i<arrElements.length; i++)
		{
		oElement = arrElements[i];
		if(oRegExp.test(oElement.className))
			{
			arrReturnElements.push(oElement);
			};
		};
	return (arrReturnElements);
	};

function readCookie(name)
	{
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++)
		{
		var c = ca[i];
		while(c.charAt(0)==' ') c = c.substring(1,c.length);
		if(c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
		}
	return null;
	};

function delete_cookie(cookie_name)
	{
	/*
	[function-description]Süti törlése.[/function-description]
	[function-parameters]cookie_name - a süti neve[/function-parameters]
	[function-return][/function-return]
	*/
	var cookie_date = new Date ( );  // current date & time
	cookie_date.setTime ( cookie_date.getTime() - 1 );
	document.cookie = cookie_name += "=; expires=" + cookie_date.toGMTString();
	};

function change_cookie_state(cookiename, stateone, statetwo)
	{
	cookievalue = readCookie(cookiename);
	if(cookievalue == null)
		{
		createCookie(cookiename, stateone);
		}
	else if(cookievalue == statetwo)
		{
		delete_cookie(cookiename);
		createCookie(cookiename, stateone);
		}
	else
		{
		delete_cookie(cookiename);
		createCookie(cookiename, statetwo);
		};
	};

function createCookie(name,value,days)
	{
	if(days)
		{
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
		}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
	};

function close_multilines(position)
	{
	menu_multiline_open = getElementsByClassName(document, 'div', position+'menu_multiline_open');
	for(var i=0; i<menu_multiline_open.length; i++)
		{
		delete_cookie(menu_multiline_open[i].id);
		createCookie(menu_multiline_open[i].id,'closed');
		menu_multiline_open[i].className = position+'menu_multiline';
		};
	menumultiline = getElementsByClassName(document, 'div', position+'menumultiline');
	for(var i=0; i<menumultiline.length; i++)
		{
		menumultiline[i].className = 'hidden';
		};
	menumultiline_div = getElementsByClassName(document, 'div', position+'menumultilinediv');
	for(var i=0; i<menumultiline_div.length; i++)
		{
		menumultiline_div[i].className = 'hidden';
		};
	};

function change_class_multiline(position, id)
	{
	//inactivate active links
	actives = getElementsByClassName(document, 'div', position+'menu_link_active');
	for(var i=0; i<actives.length; i++)
		{
		actives[i].className = position+'menu_link';
		};
	//close others
	multilines = getElementsByClassName(document, 'div', position+'menu_multiline_open');
	for(var i=0; i<multilines.length; i++)
		{
		delete_cookie(multilines[i].id);
		createCookie(multilines[i].id,'closed');
		multilines[i].className = position+'menu_multiline';
		};
	//open this
	identity=document.getElementById(position+'menu_multiline_' + id);
	createCookie(identity.id,'open');
	identity.className = position+'menu_multiline_open';
	identity=document.getElementById(position+'menumultilinediv_' + id);
	identity.className = position+'menumultilinediv';
	};

function change_class_toplink(position, parentid, id)
	{
	//Closes others//
	toplinks = getElementsByClassName(document, 'div', position+'menu_toplinksub');
	for(var i=0; i<toplinks.length; i++)
		{
		if(toplinks[i].id !== id)
			{
			delete_cookie(toplinks[i].id);
			createCookie(toplinks[i].id,'hidden');
			toplinks[i].className = 'hidden';
			};
		};
	/////////////////
	identity=document.getElementById(id);
	if(identity.className == 'hidden')
		{
		identity.className = position+'menu_toplinksub';
		delete_cookie(identity.id);
		createCookie(identity.id,'shown');
		}
		else
		{
		identity.className = 'hidden';
		delete_cookie(identity.id);
		createCookie(identity.id,'hidden');
		};

	identity = document.getElementById(parentid);
	if(identity.className == position+'menu_toplink')
		{
		//Closes others//
		toplinks = getElementsByClassName(document, 'div', position+'menu_toplink_open');
		for(var i=0; i<toplinks.length; i++)
			{
			if(toplinks[i].id !== id)
				{
				delete_cookie(toplinks[i].id);
				createCookie(toplinks[i].id,'closed');
				toplinks[i].className = position+'menu_toplink';
				};
			};
		identity.className = position+'menu_toplink_open';
		delete_cookie(identity.id);
		createCookie(identity.id,'open');
		}
		else
		{
		identity.className = position+'menu_toplink';
		delete_cookie(identity.id);
		createCookie(identity.id,'closed');
		};
	};

