function vbb_link(el) {
	el.href = 'http://www.vbb-fahrinfo.de/fahrinfo/bin/query.exe/dn?L=impuls&to='+encodeURI(document.getElementById('plz').value+' Berlin, '+document.getElementById('str').value)+'&toType=ADRESS&timesel=arrival';
	window.open(el.href, el.target, 'width=1000,height=700,scrollbars=yes');
	return true;
}

function catToggle(el)
{
toggleClassName($('map_key'),'map_hidden');
el.firstChild.src = (el.firstChild.src.indexOf('collapse.gif')== -1) ? '../_img/collapse.gif' : '../_img/expand.gif';
return true;
}

function startup()
{
var isNS
isNS = !(document.all);
a=document.getElementsByTagName('area');
for (i=0;i<a.length;i++)
	{
	 if (isNS)
		a[i].onmouseover=showns;
	 a[i].title='';
	 a[i].alt='';
	}
}
function showns(e,evElement)
{
 if(!(o=document.getElementById('poi'+this.id)))
	return false;
 if (e.clientX+220>document.body.clientWidth-10)
	o.style.left=e.clientX-200
 else
	o.style.left=e.clientX+10;
 if (e.clientY+100>document.body.clientHeight-10)
	o.style.top=e.clientY-50+document.body.scrollTop
 else
	o.style.top=e.clientY+document.body.scrollTop;
 o.style.display='block';
}
function show(lid)
{
 if (!(o=document.getElementById(lid)))
	return false;
 if (event.x+220>document.body.clientWidth-10)
	o.style.left=event.x-200
 else
	o.style.left=event.x+10;
 if (event.y+100>document.body.clientHeight-5)
	o.style.top=event.y-50+document.body.scrollTop;
 else
	o.style.top=event.y+document.body.scrollTop;
 o.style.display='block';
 //alert(document.body.scrollTop)
}
function hide(lid)
{
 if (!(o=document.getElementById(lid)))
	return false;
 o.style.display='none';
}

startup();
	oGridSelect=document.getElementById('grid');
	iSelectedIndex=(oGridSelect.selectedIndex==0)?oGridSelect.selectedIndex:oGridSelect.selectedIndex+2;
	var aOptions=new Array();
	aOptions[0]=oGridSelect.options[0];
	aOptions[1]=new Option('Grundstückskarte 1:1.000','ongeo');
	aOptions[2]=new Option('ca 1:2.000 Luftbild','aero05m');
	for (i=2;i<oGridSelect.length;i++)
		aOptions[i+1]=oGridSelect.options[i-1];
	for (i=0;i<aOptions.length;i++)
		oGridSelect.options[i]=aOptions[i];
	oGridSelect.options[1].style.background='#EFEFEF';
	oGridSelect.options[2].style.background='#EFEFEF';
	oGridSelect.selectedIndex=iSelectedIndex;
	function updgrid(o)
	{
	if (o.value=="ongeo")
		{
		 window.open("ongeo.asp?ongeo=go&sid=de2b0d480825c1e0ec2eab3e1e8b6792");
		 o.selectedIndex=iSelectedIndex;
		}
	else if (o.value=="aero05m")
		{
		 window.open("ongeo.asp?aero05m=go&sid=de2b0d480825c1e0ec2eab3e1e8b6792&bbox=3796353,5828816,3797853,5829816");
		 o.selectedIndex=iSelectedIndex;
		}
	else
		o.form.submit();
	}
  
  document.getElementById('str').focus();
function updgrid(o)
{
	if (o.value=="ongeo")
		{
		 window.open("ongeo.asp?ongeo=go&sid=de2b0d480825c1e0ec2eab3e1e8b6792");
		 o.selectedIndex=iSelectedIndex;
		}
	else if (o.value=="aero05m")
		{
		 window.open("ongeo.asp?aero05m=go&sid=de2b0d480825c1e0ec2eab3e1e8b6792&bbox=3796353,5828816,3797853,5829816");
		 o.selectedIndex=iSelectedIndex;
		}
	else
		o.form.submit();
}
