	function fensteroeffnen_zentriert(breite,hoehe,url,fenstername)
	{
		var positionlinks=(screen.width-breite)/2;
		var positionoben=(screen.height-hoehe)/2;
		dateiansicht=window.open(url,fenstername,'width='+breite+',height='+hoehe+',resizable=yes,status=yes,scrollbars,left='+positionlinks+',top='+positionoben);
	}
	function bild_hinherwechseln(bild_id,bild1_url,bild2_url)
	{
		if(document.getElementById(bild_id).src.search('.*'+bild1_url+'$')!=-1)
			document.getElementById(bild_id).src=bild2_url;
		else
			document.getElementById(bild_id).src=bild1_url;
	}
	function bild_wechseln(bild_id,bild_ziel_url)
	{
		document.getElementById(bild_id).src=bild_ziel_url;
	}
	function ein_aus_blenden(was_ein_aus_blenden)
	{
		var GECKO = document.getElementById? 1:0;
		var NS = document.layers? 1:0;
		var IE = document.all? 1:0;
		if(GECKO)
		{
			if(!document.getElementById(was_ein_aus_blenden).style.display || document.getElementById(was_ein_aus_blenden).style.display=='block')
				document.getElementById(was_ein_aus_blenden).style.display='none';
			else
				document.getElementById(was_ein_aus_blenden).style.display='block';
		}
		else if(NS)
		{
			document.layers[was_ein_aus_blenden].display=
				(document.layers[was_ein_aus_blenden].display=='block') ? 'none' : 'block';
		}
		else if(IE)
		{
			document.all[was_ein_aus_blenden].style.display=
				(document.all[was_ein_aus_blenden].style.display=='block') ? 'none' : 'block';
		}
	}
	function ein_aus_blenden_attribut(was_ein_aus_blenden,attribut)
	{
		var GECKO = document.getElementById? 1:0;
		var NS = document.layers? 1:0;
		var IE = document.all? 1:0;
		if(GECKO)
		{
			document.getElementById(was_ein_aus_blenden).style.display=
				(document.getElementById(was_ein_aus_blenden).style.display==attribut) ? 'none' : attribut;
		}
		else if(NS)
		{
			document.layers[was_ein_aus_blenden].display=
				(document.layers[was_ein_aus_blenden].display==attribut) ? 'none' : attribut;
		}
		else if(IE)
		{
			document.all[was_ein_aus_blenden].style.display=
				(document.all[was_ein_aus_blenden].style.display==attribut) ? 'none' : attribut;
		}
	}
var agt=navigator.userAgent.toLowerCase();
var is_nn = (agt.indexOf("netscape") != -1);
var is_ie = (agt.indexOf("msie") != -1);
var is_op = (agt.indexOf("opera") != -1);

function elementposition_bestimmen(element_id)
{
	var koordinaten_referenz=new Array();
	if(is_op && navigator.appVersion.substring(0,1)<"7")
	{
		koordinaten_referenz["oben"]=document.getElementById(element_id).style.pixelTop;
		koordinaten_referenz["links"]=document.getElementById(element_id).style.pixelLeft;
	}
	else
	{
		koordinaten_referenz["oben"]=document.getElementById(element_id).offsetTop;
		koordinaten_referenz["links"]=document.getElementById(element_id).offsetLeft;
		var Eltern=document.getElementById(element_id).offsetParent;
		while(Eltern)
		{
			koordinaten_referenz["oben"]=koordinaten_referenz["oben"]+Eltern.offsetTop;
			koordinaten_referenz["links"]=koordinaten_referenz["links"]+Eltern.offsetLeft;
			Eltern=Eltern.offsetParent;
		}
	}
	return koordinaten_referenz;
}
function AnderesAusklappen(offen_wenn_feld,offen_wenn_wert,oeffnen_feld,attribut)
{
	if(!attribut)
		attribut='block';
	if(document.getElementById(offen_wenn_feld).value==offen_wenn_wert)
		document.getElementById(oeffnen_feld).style.display=attribut;
	else
		document.getElementById(oeffnen_feld).style.display='none';
}

originalhgbilder=new Object();

function stellenangebote_aufklappen(bezeichnung_id,schalter_id,text_id) {
	if(document.getElementById(text_id).style.display!='none')
	{
		document.getElementById(bezeichnung_id).style.backgroundImage='url(/images/stellenangebote/hg_bezeichnung.gif)';
		originalhgbilder[bezeichnung_id]='/images/stellenangebote/hg_bezeichnung.gif';
		document.getElementById(schalter_id).src='/images/stellenangebote/schalter_auf.gif';
		document.getElementById(text_id).style.display='none';
	}
	else
	{
		document.getElementById(bezeichnung_id).style.backgroundImage='url(/images/stellenangebote/hg_bezeichnung_ina.gif)';
		originalhgbilder[bezeichnung_id]='/images/stellenangebote/hg_bezeichnung_ina.gif';
		document.getElementById(schalter_id).src='/images/stellenangebote/schalter_zu.gif';
		document.getElementById(text_id).style.display='block';
	}
}

function hgbild_hinherwechseln(el_id,bild1_url,bild2_url) {
	if(document.getElementById(el_id).style.backgroundImage.search('.*'+bild1_url+'.*')!=-1)
	{
		document.getElementById(el_id).style.backgroundImage='url('+bild2_url+')';
	}
	else
	{
		document.getElementById(el_id).style.backgroundImage='url('+bild1_url+')';
	}
}

function hgbild_mouseover(el_id,over_url) {
	document.getElementById(el_id).style.backgroundImage='url('+over_url+')';
}

function hgbild_mouseout(el_id) {
	document.getElementById(el_id).style.backgroundImage='url('+originalhgbilder[el_id]+')';
}

function login_partnernet_form_kennwort_feld_focus() {
	document.getElementById("form_login_partnernet_kennwort").innerHTML='<input id="login_partnernet_form_kennwort" type="password" name="login[kennwort]" value="" onkeypress="javascript:if(event.keyCode==13 || event.which==13) document.getElementById(\'form_login_partnernet\').submit();" />';
	setTimeout("document.getElementById(\"login_partnernet_form_kennwort\").focus();",1);
}

function immobilie_des_monats_thumbs(thumb_aktiv_id)
{
	if (document.getElementById('thumb_bild_01'))
		document.getElementById('thumb_bild_01').className = 'thumb';
	if (document.getElementById('thumb_bild_02'))
		document.getElementById('thumb_bild_02').className = 'thumb';
	if (document.getElementById('thumb_bild_03'))
		document.getElementById('thumb_bild_03').className = 'thumb';
	if (document.getElementById('thumb_bild_04'))
		document.getElementById('thumb_bild_04').className = 'thumb';

	if (document.getElementById(thumb_aktiv_id))
		document.getElementById(thumb_aktiv_id).className = 'thumb_aktiv';
}

function objekte_angebote_lightbox_link(id,href,rel,title)
{
	if (document.getElementById(id)) {
		document.getElementById(id).href = href;
		document.getElementById(id).setAttribute('rel',rel);
		document.getElementById(id).setAttribute('title',title);
	}
}

function immobilien_highlight_thumbs(thumb_aktiv_id)
{
	if (document.getElementById('immobilien_highlight_popup_thumb_4'))
		document.getElementById('immobilien_highlight_popup_thumb_4').className = '';
	if (document.getElementById('immobilien_highlight_popup_thumb_3'))
		document.getElementById('immobilien_highlight_popup_thumb_3').className = '';
	if (document.getElementById('immobilien_highlight_popup_thumb_2'))
		document.getElementById('immobilien_highlight_popup_thumb_2').className = '';
	if (document.getElementById('immobilien_highlight_popup_thumb_1'))
		document.getElementById('immobilien_highlight_popup_thumb_1').className = '';
	if (document.getElementById('immobilien_highlight_popup_thumb_0'))
		document.getElementById('immobilien_highlight_popup_thumb_0').className = '';

	if (document.getElementById(thumb_aktiv_id))
		document.getElementById(thumb_aktiv_id).className = 'aktiv';
}

function immobilien_dlandweit(region)
{
	var ausw=document.getElementById('dlwausw').value;
	var teile=ausw.split('__');
	document.getElementById('dlwverzw').value=teile[0];
	document.getElementById('dlwregion').value=region;
	document.getElementById('dlwform').action=teile[1];
	document.getElementById('dlwform').submit();
}

function beiBeruehrungLoeschen(feld,wert)
{
	if(document.getElementById(feld).value==wert)
		document.getElementById(feld).value='';
}

	function getFlashVersion() {
		var agent = navigator.userAgent.toLowerCase();
		var flashVersion_DONTKNOW = -1;

		// NS3 needs flashVersion to be a local variable
		if (agent.indexOf("mozilla/3") != -1 && agent.indexOf("msie") == -1) {
			flashVersion = 0;
		}

		// NS3+, Opera3+, IE5+ Mac (support plugin array):  check for Flash plugin in plugin array
		if (navigator.plugins != null && navigator.plugins.length > 0) {
			var flashPlugin = navigator.plugins['Shockwave Flash'];
			if (typeof flashPlugin == 'object') {
				if (flashPlugin.description.indexOf('7.') != -1) flashVersion = 7;
				else if (flashPlugin.description.indexOf('6.') != -1) flashVersion = 6;
				else if (flashPlugin.description.indexOf('5.') != -1) flashVersion = 5;
				else if (flashPlugin.description.indexOf('4.') != -1) flashVersion = 4;
				else if (flashPlugin.description.indexOf('3.') != -1) flashVersion = 3;
			}
		}

		// IE4+ Win32:  attempt to create an ActiveX object using VBScript
		else if (agent.indexOf("msie") != -1 && parseInt(navigator.appVersion) >= 4 && agent.indexOf("win")!=-1 && agent.indexOf("16bit")==-1) {
			document.write('<scr' + 'ipt language="VBScript"\> \n');
			document.write('on error resume next \n');
			document.write('dim obFlash \n');
			document.write('set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.7") \n');
			document.write('if IsObject(obFlash) then \n');
			document.write('flashVersion = 7 \n');
			document.write('else set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.6") end if \n');
			document.write('if flashVersion < 7 and IsObject(obFlash) then \n');
			document.write('flashVersion = 6 \n');
			document.write('else set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.5") end if \n');
			document.write('if flashVersion < 6 and IsObject(obFlash) then \n');
			document.write('flashVersion = 5 \n');
			document.write('else set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.4") end if \n');
			document.write('if flashVersion < 5 and IsObject(obFlash) then \n');
			document.write('flashVersion = 4 \n');
			document.write('else set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.3") end if \n');
			document.write('if flashVersion < 4 and IsObject(obFlash) then \n');
			document.write('flashVersion = 3 \n');
			document.write('end if');
			document.write('</scr' + 'ipt\> \n');
		}

		// WebTV 2.5 supports flash 3
		else if (agent.indexOf("webtv/2.5") != -1) flashVersion = 3;

		// older WebTV supports flash 2
		else if (agent.indexOf("webtv") != -1) flashVersion = 2;

		// Can't detect in all other cases
		else {
			flashVersion = flashVersion_DONTKNOW;
		}

		return flashVersion;
	}

	function frameset() {
		if (parent.frames.length == 0 && navigator.appCodeName == "Mozilla")
			top.location = "/index.php";
	}

	function MM_swapImgRestore() {
		var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
	}

	function MM_preloadImages() {
		var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
		var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
		if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
	}

	function MM_findObj(n, d) {
		var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
			d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
		if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
		for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
		if(!x && d.getElementById) x=d.getElementById(n); return x;
	}

	function MM_swapImage() {
		var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
		if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
	}

	function ST_HideOtherLayers(activeLayer) {
		var divs=document.getElementsByTagName("DIV");
		for (i=0;i<divs.length;i++) {
			if (divs[i].id != activeLayer) divs[i].style.visibility='hidden';
		}
	}

	function MM_showHideLayers() {
		var i,p,v,obj,args=MM_showHideLayers.arguments;
		for (i = 0; i < (args.length-2); i+=3)
			if ((obj = MM_findObj(args[i])) != null) {
				v = args[i+2];
				if (v == 'show') ST_HideOtherLayers(args[i]);
				if (obj.style) {
					obj = obj.style;
					v = (v =='show')?'visible':(v = 'hide')?'hidden':v;
				}
				obj.visibility=v;
			}
	}

	function swap_content(span) {
		displayType = (document.getElementById(span).style.display == 'none' ) ? 'block' : 'none';
		document.getElementById(span).style.display = displayType;
	}

	function fensteroeffnen(breite,hoehe,url) {
		if (! breite || breite == 0) breite = 400;
		if (! hoehe || hoehe == 0) hoehe = 400;

		neuesFenster = window.open(url,'popup','width='+breite+',height='+hoehe+',resizable=no,status=no,scrollbars');
		neuesFenster.moveTo(0,0);
		neuesFenster.resizeTo(breite+15,hoehe+40);
		neuesFenster.focus();
	}

