function RemoveScrollBars()
{
	if(document.body.scroll != null)
	{
		document.body.scroll = "auto";
		document.body.style.overflowX = "hidden"; // hidden | scroll | auto
		document.body.style.overflowY = "auto";
	}
	else // #### MG: It's a different Browser (NN)
	{
		document.body.attributes("-moz-scrollbars-horizontal") = "scroll";
		document.body.attributes("-moz-scrollbars-vertical") = "no";
	}
}

function OpenPopUp(url, width, height, resizable, location, menubar, scrollbars, status, titlebar, toolbar)
{
	var options = "width=" + width + ", height=" + height + ", resizable=" + (resizable ? 1 : 0) + ", location=" + (location ? 1 : 0) + ", menubar=" + (menubar ? 1 : 0) + ", scrollbars=" + (scrollbars ? 1 : 0) + ", status=" + (status ? 1 : 0) + ", titlebar=" + (titlebar ? 1 : 0) + ", toolbar=" + (toolbar ? 1 : 0);
	var win = window.open(url, "PopUp", options);
	
	if(win != null)
	{
		win.focus();
	}
}

function OpenCustomPopUpApp(base, url, width, height, resizable, location, menubar, scrollbars, status, titlebar, toolbar, undesigned)
{
	var basePage = "PopupDesigned.aspx";
	var scrolling = scrollbars;
	scrollbars = false;
	
	if(undesigned == null)
	{
		undesigned = false;
	}
	
	if(undesigned)
	{
		basePage = "PopupUndesigned.aspx";
	}
	
	var path = base + basePage + "?url=" + escape(url) + "&height=" + height + "&undesigned=" + undesigned + "&scrollbars=" + scrolling;
	var options = "width=" + width + ", height=" + height + ", resizable=" + (resizable ? 1 : 0) + ", location=" + (location ? 1 : 0) + ", menubar=" + (menubar ? 1 : 0) + ", scrollbars=" + (scrollbars ? 1 : 0) + ", status=" + (status ? 1 : 0) + ", titlebar=" + (titlebar ? 1 : 0) + ", toolbar=" + (toolbar ? 1 : 0);
	var win = window.open(path, "PopUp", options);
	
	if(win != null)
	{
		win.focus();
	}
}

function JumpTo(obj)
{
	obj.scrollIntoView();
}

function JumpToControl(controlName)
{
	document.getElementById(controlName).scrollIntoView();
}

function Druckansicht(url)
{
	//var win = window.open("Apps/PopUps/Framework.aspx?pfv=true&url=" + escape(url), "Druckansicht", "toolbar=no, width=632, height=700, directories=no, status=no, scrollbars=no, resizable=no, menubar=no");
	//win.focus();
	self.print();
}

function Redaktion(pageID)
{
	var win = window.open("Apps/PopUps/Framework.aspx?url=" + escape("Editorial.aspx?id=" + pageID), "Redaktion", "toolbar=no, width=400, height=300, directories=no, status=no, scrollbars=no, resizable=no, menubar=no");
	win.focus();
}

function TextBoxSearch_KeyDown(sender, searchButtonClientID)
{
	if(event.keyCode == 13)
	{
		var button = document.getElementById(searchButtonClientID);
		
		if(button != null)
		{
			button.focus();
			button.click();
		}
		
		return false;
	}
}