
var win = null;
function mypopup(mypage,myname,w,h,scroll)
	{
	LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
	settings ='height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
	win = window.open(mypage,myname,settings)
	if(win.window.focus){win.window.focus();}
	}

	
if (document.images)
	{
	subbaroff = new Image();	
	subbaroff.src="/images/submenu_i.gif";
	subbaron = new Image();	
	subbaron.src="/images/submenu_a.gif";
	}

	
function sub_aktimage(imgName)
	{
	if (document.images) 
		{
		document ["submenubullet_" + imgName].src = subbaron.src;
		}
	}	

function sub_normimage(imgName)
	{
	if (document.images) 
		{
		document ["submenubullet_" + imgName].src = subbaroff.src;
		}
	}
	
function delcheck($meldung,$url)
	{
	if (confirm ($meldung))	
		{
		top.location.href=$url;
		}
	}	




function checklength(form,max)
	{
    if (form.value.length > max)
		{
		form.value = form.value.substring(0,max);
		alert("Der Eingegebene Zext ist zu lang. Bitte geben Sie in dieses Feld maximal "+max+" Zeichen ein.");
		form.focus();
		} 
	}


function holehoehe ()
	{
	var myWidth = 0, myHeight = 0;
	if( typeof(window.innerWidth) == 'number' ) 
		{
		//Non-IE
		myWidth = window.innerWidth;
		myHeight = window.innerHeight;
		} 
	  else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) 
		{
		//IE 6+ in 'standards compliant mode'
		myWidth = document.documentElement.clientWidth;
		myHeight = document.documentElement.clientHeight;
		} 
	  else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) 
		{
		//IE 4 compatible
		myWidth = document.body.clientWidth;
		myHeight = document.body.clientHeight;
		}


	if (myHeight>0) 
		{
		$sizer=myHeight-330;
		document.write('<br><img border=0 src="/images/pt.gif" width="1" height="'+$sizer+'">');
		//document.getElementById("hoehenspacer").style.height = $sizer+"px";
		}
	}
	

function showHideBigMap (show,plz)
// plz als String wegen PLZ mit führender Null
{
	if (document.getElementById)
	{	
		if (show) //große Karte laden und anzeigen
		{
			document.getElementById("bigmap").firstChild.setAttribute("src","/images/karte/karte_big.php3?suchplz=" + plz);
			document.getElementById("bigmap").style.visibility = "visible";
		}
		else // große Karte ausblenden
		{
			document.getElementById("bigmap").style.visibility = "hidden";
		}
	}
}