/* Register Event Listeners -- */
/* MOZILLA */  if (document.addEventListener){document.addEventListener("DOMContentLoaded", init, null);}
/* OTHER   */  window.onload = init;
/* --------------------------- */

function init()
{	if (arguments.callee.done) return;
	arguments.callee.done = true;
   
	
	//Write scripts here.
	
	if (gId('backlink'))
	{	gId('backlink').setAttribute('href','javascript:history.go(-1);');
	}
	
	
	if (gId('googlemap')) //Google maps
	{	gId('googlemap').setAttribute('scrolling',0);
	}
		
	
	
	
	
	//Fix popups redirecting.
	var pagelinks=document.getElementsByTagName("A");
	for (var i=0;i<pagelinks.length;i++)
	{	if (pagelinks[i].getAttribute('href')=="/")
		{	pagelinks[i].setAttribute('href','javascript:;');
		}
	}
	
}

//function for ukv image switcher
function showTN(x) {
document.getElementById('ukvMAIN').setAttribute('src',x.src);
}

function showLegend() {
NewWindow('files/unterkunftsverzeichnis/templates/legend.htm','thelegend',515,630,0);
}



//<!-- This script and many more are available free online at -->
//<!-- The JavaScript Source!! http://javascript.internet.com -->

function NewWindow(mypage, myname, w, h, scroll)
{
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}