// JavaScript Document

		window.addEvent('domready', function(){
			var size = window.getSize();
			var hoehe = size.y;
			var breite = size.x;
			$('stretch').setStyle('height', hoehe);
/*			if (hoehe/breite<1.33) {
				$$('#stretch img').setStyle('width', 'auto');
				$$('#stretch img').setStyle('height', hoehe);
			}
*/
			$('foot').setStyle('margin-left', (breite-1000)/2+40);
			if (hoehe > 725) $('foot').setStyle('padding-top', hoehe-724);
			$('newscontainer').setStyle('margin-left', (breite/2)-5);
			if (hoehe > 725) $('newscontainer').setStyle('top', hoehe-320);
			if (hoehe < 725) $('newscontainer').setStyle('top', 400);

			var bar = $('news');
			$('out').setStyle('opacity', 0);

			bar.set('tween', {transition: Fx.Transitions.Sine.easeInOut, duration: 'long'});

			var buttonOn = $$('#news img.on');
			buttonOn[0].addEvent('mouseover', function(e){
				e.stop();
				bar.tween('top', 0);
				buttonOn[1].fade('out');
				$('out').fade('in');
			});

			buttonOn[1].addEvent('mouseover', function(e){
				e.stop();
				bar.tween('top', 0);
				buttonOn[1].fade('out');
				$('out').fade('in');
			});

			$('out').addEvent('mouseover', function(e){
				e.stop();
				bar.tween('top', 240);
				$$('#news img.on').fade('in');
				$('out').fade('out');

			});

// Schriftgroessen-Manipulation
			var minus = document.createTextNode('-');
			var plus = document.createTextNode('+');
			$('scale').addEvent('click', function(){
				if ($('content').getStyle('font-size') == '12px') {
					$('content').setStyle('font-size','16px');
					$$('#content h1').setStyle('font-size','18px');
					$$('#content p').setStyle('margin-top','10px');
					$$('#navi li a').setStyle('font-size','16px');
					$$('#navi li.naviunten a').setStyle('white-space','nowrap');
					$$('#news p').setStyle('font-size','16px');
					$$('#news p').setStyle('margin-top','0px');
					var op = $('oper').firstChild;
					$('oper').replaceChild(minus, op);
					var colour  = Cookie.write('fontsize', 'big', {duration: 100});
				}
				else {
					$('content').setStyle('font-size','12px');
					$$('#content h1').setStyle('font-size','14px');
					$$('#content p').setStyle('margin-top','12px');
					$$('#navi li a').setStyle('font-size','13px');
					$$('#navi li.naviunten a').setStyle('font-size','12px');
					$$('#news p').setStyle('font-size','12px');
					$$('#news p').setStyle('margin-top','10px');
					var op = $('oper').firstChild;
					$('oper').replaceChild(plus, op);
					var colour  = Cookie.write('fontsize', 'normal', {duration: 100});
				}
			});

// Schriftgroessen-Cookies

			if (Cookie.read('fontsize')) {
				var fonts = Cookie.read('fontsize');
				if (fonts == 'big') {
					$('content').setStyle('font-size','16px');
					$$('#content h1').setStyle('font-size','18px');
					$$('#content p').setStyle('margin-top','10px');
					$$('#navi li a').setStyle('font-size','16px');
					$$('#navi li.naviunten a').setStyle('white-space','nowrap');
					$$('#news p').setStyle('font-size','16px');
					$$('#news p').setStyle('margin-top','0px');
					var op = $('oper').firstChild;
					$('oper').replaceChild(minus, op);
				}
				else {
					$('content').setStyle('font-size','12px');
					$$('#content h1').setStyle('font-size','14px');
					$$('#content p').setStyle('margin-top','12px');
					$$('#navi li a').setStyle('font-size','13px');
					$$('#navi li.naviunten a').setStyle('font-size','12px');
					$$('#news p').setStyle('font-size','12px');
					$$('#news p').setStyle('margin-top','10px');
					var op = $('oper').firstChild;
					$('oper').replaceChild(plus, op);
				}
			}

// Browser resize
			window.addEvent('resize', function() {
				var size = window.getSize();
				var nhoehe = size.y;
				var nbreite = size.x;
				if (!Browser.Engine.trident) {
					document.location.href = document.location.href;
				}
				else if (Browser.Engine.trident) {
					if ((hoehe!=nhoehe) || (breite!=nbreite)) {
						window.location.reload();
					}
				}
			});
});



function targetBlank (url) {
	blankWin = window.open(url,'_blank','menubar=yes,toolbar=yes,location=yes,directories=yes,fullscreen=no,titlebar=yes,hotkeys=yes,status=yes,scrollbars=yes,resizable=yes');
}

// Anti-Spam Email Displayer- By JavaScriptKit.com
// Visit JavaScript Kit (http://javascriptkit.com) for this script and more.
// This notice must stay intact for use

var contacts=new Array()
//Specify text and corresponding email address.
//Use [at] and [dot] in place of "@" and "." for anti spam purpose:
contacts[0]=["info [et] pflegedienst-dingelsdorf [punkt] de", "info[at]pflegedienst-dingelsdorf[dot]de"];
contacts[1]=["<img src=\"bilder/icon-mail.png\" alt=\"E-Mail an Pflegedienst Dingelsdorf\" />", "info[at]pflegedienst-dingelsdorf[dot]de"];
contacts[2]=["info@pflegedienst-dingelsdorf.de", "info[at]pflegedienst-dingelsdorf[dot]de"];

function displaycontact(emailarray, cssclass, displaymethod, extrainfo){
	if (displaymethod=="text")
			document.write('<a href="mailto:' + modifyemail(emailarray[1])+ '">'+ emailarray[0] + '</a>')
}

function modifyemail(emailitem){
	var modified=emailitem.replace(/\[at]/gi, "@")
	modified=modified.replace(/\[dot]/gi, ".")
	return modified
}

