var H, W, B4=false;

function once()			// Executed only once.
{	if (B4) return;
	B4 = true;
	window.onresize=resize;
	resize();
}

// Make a URL with '&amp;' usable.

function openwindow (url)	// Open in another tab/window
{	window.open(url.replace(/&amp;/g,'&'));
}

function openself(url)		// Open in same window, keep referer
{	Q = '?';
	if (url.search ('[?]')>0) Q = String.fromCharCode(046);
	window.location.href = url+Q+"rfr="+referer;	//	referer must be defined earlier.
}

// Submit a form

function Submit(form)
{	document.getElementById(form).submit();
}

// Match body font to size of window.
// Percent of width: Define the size of "1.0em"

	var ShowWarning = true;

function resize()	// Set font relative to window width.
{	if (window.innerWidth)
	  W = window.innerWidth;
	else
	  W = document.body.clientWidth;
  P =  Math.floor (W/33);				// ca. 3 percent constant
	P =  8+Math.floor (W/45);				// Linear function
	if (P<10)P=10;							// Smallest size.
	document.body.style.fontSize=P + "px";

	show = document.getElementById('warning');
	if (window.screen.availWidth/W < 1.6	// Show warning?
	&& ShowWarning)
		show.style.display='display';

}

