    var name1 = "#menurechts";
    var menuYloc1 = null;
	
    $(document).ready(function(){
        menuYloc1 = parseInt($(name1).css("top").substring(0,$(name1).css("top").indexOf("px")))
        $(window).scroll(function () { 
            var offset = menuYloc1+$(document).scrollTop()+"px";
            $(name1).animate({top:offset},{duration:50,queue:false});
        });
    });

	function setPopupLocation( obj )
	{
		var offset_y = 230;
		
		var popwidth = 600;
		var popheight = 400;
		
		if (obj.setProperty)
		{ //Mozilla

			var scrollxpos = window.pageXOffset;
			var scrollypos = window.pageYOffset;
			var windowwidth = window.innerWidth;
			var windowheight = window.innerHeight;
			var newy = scrollypos + (windowheight/2) - (popheight / 2);
			if (newy < 230) obj.setProperty('top',230,null);
			else obj.setProperty('top',newy,null);
			obj.setProperty('left',(windowwidth / 2) - (popwidth /2),null);
		}
		else
		{ //IE
			var windowwidth = document.body.offsetWidth;
			var windowheight = document.body.offsetHeight;
			var scrollxpos = document.body.scrollLeft;
			var scrollypos = document.body.scrollTop;
			obj.left = (windowwidth/2) - (popwidth / 2);
			var newy = scrollypos + (windowheight/2) - (popheight / 2);
			if (newy < 230) obj.top = 230;
			else obj.top = newy;
		}
	//	alert( obj.getProperty('top') + obj.getProperty('left') );
		
	}

	function toonbestelopties( categorie )
	{
		//alert( categorie );
		var element;
		element = document.getElementById( 'extraopties_' + categorie );
		element.className = 'showbestelopties';
		setPopupLocation( element );
	}
	
	function verbergbestelopties( categorie )
	{
		//alert( categorie );
		var element;
		element = document.getElementById( 'extraopties_' + categorie );
		element.className = 'hidebestelopties';
	}
	

	
/*	function togglePopup(szDivID, iState) // 1 visible, 0 hidden
	{
		var obj = document.layers ? document.layers[szDivID] :
		document.getElementById ?  document.getElementById(szDivID).style :
		document.all[szDivID].style;

		if (iState==1)
		{
			if (szDivID=="popupdivPizza")
			{
				popwidth = 600;
				popheight = 400;
			}
			else
			{
				popwidth = 600;
				popheight = 400;
			}
		}
		setPopupLocation(obj);
		obj.visibility = document.layers ? (iState ? "show" : "hide") :
		(iState ? "visible" : "hidden");
		if (iState==1)
		{
			active_obj = obj;

			if (obj.setProperty)
			{ //Mozilla
				if (szDivID=="popupdivPizza")
				{
					obj.setProperty('width',600,null);
					obj.setProperty('height',400,null);

				}
				else
				{
					obj.setProperty('width',600,null);
					obj.setProperty('height',400,null);

				}
			}
			else
			{ //IE
				if (szDivID=="popupdivPizza")
				{
					obj.width = 600;
					obj.height = 400;
				}
				else
				{
					obj.width = 600;
					obj.height = 400;
				}
			}

		}
		else
		{
			//window.onresize="";
			if (obj.setProperty)
			{ //Mozilla
				obj.setProperty('width',1,null);
				obj.setProperty('height',1,null);
			}
			else
			{ //IE
				obj.width = 1;
				obj.height = 1;
			}
		}
	}*/
	
