function sBahnCallbackFahrinfo(request) {
	var statusHTML = [];
	var formHtml = '';
	
	formHtml += '<div style="padding: 10px; background-color: #' + request.bgcolor + '; display:block; width: ' + request.width + 'px;">';
	formHtml += '<a target="_blank" href="http://www.s-bahn-berlin.de" style="border:none;text-decoration:none;margin:0 0 10px; display: block; text-align: right;" ';
	formHtml += 'title="Zur Webseite der S-Bahn Berlin">';
	if (request.logo) {
		formHtml += '<img style="border:none; width: 120px;" src="http://www.s-bahn-berlin.de/images/' + request.logo + '" alt="S-Bahn Berlin Logo" />';
	} else {
		formHtml += '<img style="border:none; width: 120px;" src="http://www.s-bahn-berlin.de/images/s-bahn-berlin.png" alt="S-Bahn Berlin Logo" />';
	}
	formHtml += '</a>';
	
	if(request.css) {
	 
		formHtml += '<form id="fahrplanauskunft" action="http://www.s-bahn-berlin.de/fahrplanauskunft_routenplaner.htm" method="post" name="fahrinfosuche" target="_blank">';
		formHtml += '<input name="protocol" value="https:" type="hidden" />';
		formHtml +=	'<input name="filter" value="ALL#0#0#0" type="hidden" />';
		formHtml += '<input name="REQ0JourneyStopsSA1" value="7" type="hidden" />';
		formHtml +=	'<input name="REQ0JourneyStopsZA1" value="7" type="hidden" />';
		formHtml +='<input name="REQ0Total_Bike_enable" value="0" type="hidden" />';
		formHtml +='<input name="application" value="CONNECTIONS" type="hidden" />';
		formHtml +='<input name="REQ0JourneyStopsZ0A" value="255" type="hidden" />';
		formHtml +='<input name="REQ0JourneyStopsS0A" value="255" type="hidden" />';
		formHtml +='<fieldset style="background-color:#' + request.fgcolor + '; color:#' + request.color + '; border:none; padding:2px 10px; width: ' + (request.width - 20) + 'px; margin:0">';
		formHtml +='<h1 style="color:#' + request.color + '; font: bold 16px Verdana,Geneva,sans-serif;margin: 13px 0 7px;padding: 0;">' + request.title + '</h1>';
		formHtml +='<p style="color:#' + request.color + '; display: block; font-size: 12px; font-family:Verdana;">Routenplaner f&uuml;r Berlin &amp; Brandenburg</p>';
		formHtml +='<label style="color:#' + request.color + '; display: block;float: left; font-size: 12px;width:50px; font-family:Verdana; padding:0; margin:0;" for="start">Start</label>';
		formHtml +='<input style="border-left: 1px solid #8D8D8D; border-top: 1px solid #8D8D8D;font-size: 12px;margin-bottom: 8px;';
		formHtml +='padding: 2px 0 2px 4px; width: ' + (request.width - 80) + 'px;" name="S" value="Von Adresse ..." type="text"  ';
		formHtml +='class="HafasSuggest" id="widget_start" /><br style="clear:both;" />';
		formHtml +='<label style="color:#' + request.color + '; display: block;float: left; font-size: 12px;width:50px; font-family:Verdana; padding:0; margin:0;" for="ziel">Ziel</label>';
		formHtml +='<input style="border-left: 1px solid #8D8D8D; border-top: 1px solid #8D8D8D;font-size: 12px;margin-bottom: 8px;';
		formHtml +='padding: 2px 0 2px 4px; width: ' + (request.width - 80) + 'px;" name="Z" value="'+ request.target +'" type="text"  ';
		formHtml +='class="HafasSuggest" id="widget_ziel" /><br style="clear:both;" />';
		formHtml +='<label for="datum" style="color:#' + request.color + '; display: block;float: left; font-size: 12px;width:50px; font-family:Verdana; padding:0; margin:0;">Datum</label>';
		formHtml +='<input name="date" style="border-left: 1px solid #8D8D8D; border-top: 1px solid #8D8D8D;font-size: 12px;margin-bottom: 8px;';
		formHtml +='padding: 2px 0 2px 4px; width: ' + (request.width - 80) + 'px;" value="'+ request.now +'" type="text" /><br style="clear:both;" />';
		formHtml +='<label style="color:#' + request.color + '; display: block;float: left; font-size: 12px;width:50px; font-family:Verdana; padding:0; margin:0;" for="zeit">Zeit</label>';
		formHtml +='<input name="time" style="border-left: 1px solid #8D8D8D; border-top: 1px solid #8D8D8D;font-size: 12px;margin-bottom: 8px;';
		formHtml +='padding: 2px 0 2px 4px; width: ' + (request.width - 80) + 'px;" value="'+ request.time +'" type="text" /><br style="clear:both;" />';
		formHtml +='<div style="margin: 0 0 8px 50px; overflow: hidden;">';
		formHtml +='<label style="color:#' + request.color + '; display: block; float: left; font-size: 12px; width:85px; font-family:Verdana; padding:0; margin:0;" for="abfahrt">';
		formHtml +='<input name="timesel" id="abfahrt" value="depart" checked="checked" align="middle" type="radio" /> ';
		formHtml +='Abfahrt</label>';
		formHtml +='<label style="color:#' + request.color + '; display: block;float: left; font-size: 12px;width:85px; font-family:Verdana; padding:0; margin:0;" for="anfahrt">';
		formHtml +='<input name="timesel" id="anfahrt" value="arrive" align="middle" type="radio" /> ';
		formHtml +='Ankunft</label>';
		formHtml +='</div>';
		formHtml +='<input style="background: url(http://www.s-bahn-berlin.de/images/start/img-palette-2010.png) no-repeat scroll -384px -518px ';
		formHtml +='transparent;border: medium none;color: #FFFFFF;    cursor: pointer;font-size: 0.85em;float:right;height: 25px;';
		formHtml +='margin: 0 2px 0 0;    padding: 0 0 4px;    width: 128px;" value=" Finden! " ';
		formHtml +='alt="Verbindungen f&uuml;r alle Verkehrsmittel in Berlin finden" title="Verbindungen f&uuml;r alle Verkehrsmittel in Berlin finden" type="submit" />';
		formHtml +='<br style="clear:both;" />';
		
	} else { 
		
		formHtml += '<form id="fahrplanauskunft" action="http://www.s-bahn-berlin.de/fahrplanauskunft_routenplaner.htm" method="post" name="fahrinfosuche" target="_blank">';
		formHtml += '<input name="protocol" value="https:" type="hidden" />';
		formHtml +=	'<input name="filter" value="ALL#0#0#0" type="hidden" />';
		formHtml += '<input name="REQ0JourneyStopsSA1" value="7" type="hidden" />';
		formHtml +=	'<input name="REQ0JourneyStopsZA1" value="7" type="hidden" />';
		formHtml +='<input name="REQ0Total_Bike_enable" value="0" type="hidden" />';
		formHtml +='<input name="application" value="CONNECTIONS" type="hidden" />';
		formHtml +='<input name="REQ0JourneyStopsZ0A" value="255" type="hidden" />';
		formHtml +='<input name="REQ0JourneyStopsS0A" value="255" type="hidden" />';
		formHtml +='<fieldset>';
		formHtml +='<h1>' + request.title + '</h1>';
		formHtml +='<p>Routenplaner f&uuml;r Berlin &amp; Brandenburg</p>';
		formHtml +='<label for="widget_start">Start</label><input name="S" value="Von Bahnhof / Adresse ..." type="text"  ';
		formHtml +='class="HafasSuggest" id="widget_start" /><br style="clear:both;" />';
		formHtml +='<label for="widget_ziel">Ziel</label><input name="Z" value="'+ request.target +'" ';
		formHtml +='type="text" class="HafasSuggest" id="widget_ziel" /><br style="clear:both;" />';
		formHtml +='<label for="datum">Datum</label><input name="date" value="'+ request.now +'" type="text" /><br style="clear:both;" />';
		formHtml +='<label for="zeit">Zeit</label><input name="time" value="'+ request.time +'" type="text" /><br style="clear:both;" />';
		formHtml +='<input name="timesel" id="abfahrt" value="depart" checked="checked" align="middle" type="radio" />';
		formHtml +='<label for="abfahrt">Abfahrt</label><br style="clear:both;" />';
		formHtml +='<input name="timesel" id="anfahrt" value="arrive" align="middle" type="radio" />';
		formHtml +='<label for="anfahrt">Ankunft</label><br style="clear:both;" />';
		formHtml +='<input value=" Finden! " alt="Verbindungen f&uuml;r alle Verkehrsmittel in Berlin finden" ';
		formHtml +='title="Verbindungen f&uuml;r alle Verkehrsmittel in Berlin finden" type="submit" /><br style="clear:both;" />';
		formHtml +='<br style="clear:both;" /></fieldset></form>';		
		
		}

	formHtml +='<br style="clear:both;" /></fieldset></form>';
	
	statusHTML.push(formHtml);
	document.getElementById('s-bahn-berlin-fahrinfo').innerHTML = statusHTML.join(''); 
}

function sBahnCallbackVerkehrslage(request, style) {
	var statusHTML = [];
	var myHtml = '';

    myHtml += '<div style="padding: 10px; background-color: #' + style.bgcolor + '; display:block; width: ' + style.width + 'px; color:#' + style.color + ';">';
	myHtml += '<a target="_blank" href="http://www.s-bahn-berlin.de" style="border:none;text-decoration:none;margin:0 0 10px; display: block; text-align: right;" ';
	myHtml += 'title="Zur Webseite der S-Bahn Berlin">';
	if (style.logo) {
		myHtml += '<img style="border:none; width: 120px;" src="http://www.s-bahn-berlin.de/images/' + style.logo + '" alt="S-Bahn Berlin Logo" />';
	} else {
		myHtml += '<img style="border:none; width: 120px;" src="http://www.s-bahn-berlin.de/images/s-bahn-berlin.png" alt="S-Bahn Berlin Logo" />';
	}
	myHtml += '</a>';
	
	/*
	if(style.betriebslage) { 
	
		if(style.css) {

			myHtml += '<div style="font-family:Arial;line-height:145%;font-size:14px;margin: 0 0 1em;min-height: 20px;padding: 12px 16px 0 12px; ';
			myHtml += 'background: url(http://www.s-bahn-berlin.de/images/layout/bg-betriebsinfo.png) repeat-x scroll left top #FFD220; ';
			myHtml += 'border: 1px solid #F1DB4E;margin: 4px 0 20px;padding: 0 16px;";>';
			myHtml += '<h1 style="font-size:18px;">Abweichende Betriebssituation</h1>';
			myHtml += '<p>' + style.betriebslage + '</p>';
			myHtml += '<p>	';
			myHtml += '<a style="color:#333;font-weight:normal;background:url(http://www.s-bahn-berlin.de/images/layout/ico-link-box-lokal.png) ';
			myHtml += 'no-repeat scroll 0 5px transparent; padding:0 0 0 15px; font-size:14px;" ';
			myHtml += 'href="http://www.s-bahn-berlin.de/bauinformationen/betriebslage.htm" >Weitere Informationen	</a>';
			myHtml += '</p></div>';

		} else { 

			myHtml += '<div><h1>Abweichende Betriebssituation</h1>';
			myHtml += '<p>' + style.betriebslage + '</p>';
			myHtml += '<p>	';
			myHtml += '<a href="http://www.s-bahn-berlin.de/bauinformationen/betriebslage.htm" >Weitere Informationen</a>';
			myHtml += '</p></div>';		
		
		}
		
	}
	*/
	
	if (3==1) {
	} else { 
		
		if(request.length > 0) {

			if(style.css) {
				
				myHtml += "<h1 style='font-family:Verdana; font-size:16px;margin:0 0 10px; color: #" + style.headlinecolor + "'>" + style.title +"</h1>";
	
				if (style.betriebslage) { 
					myHtml += '<div style="font-family:Arial;line-height:145%;font-size:14px; color:#' + style.color + ' !important; margin: 0 0 1em;min-height: 20px; ';
					myHtml += 'background: url(http://www.s-bahn-berlin.de/images/layout/bg-betriebsinfo.png) repeat-x scroll left top #FFD220; ';
					myHtml += 'border: 1px solid #F1DB4E;margin: 0 0 15px;padding: 15px 15px 0 15px; color:#" + style.color + " important;">';
					myHtml += '<h1 style="font-size:18px; margin:0 0 10px;">Abweichende Betriebssituation</h1>';
					myHtml += '<p>' + style.betriebslage + '</p>';
					myHtml += '<p>	';
					myHtml += '<a target="_blank" style="display: inline-block; font-family:Verdana;color:#' + style.color +';font-weight:normal; font-size:12px; ';
					myHtml += 'background:url(http://www.s-bahn-berlin.de/images/layout/ico-link-box-lokal.png) no-repeat scroll 0 5px transparent; padding:0 0 0 15px;" ';
					myHtml += 'href="http://www.s-bahn-berlin.de/bauinformationen/betriebslage.htm">Weitere Informationen</a>';
					myHtml += '</p></div>';
				}
				
				for(i=0; i < (request.length);i++) {
					myHtml +=  "<div style='font-family:Verdana; color:#" + style.color + " !important; background: repeat-x scroll left top #" + style.fgcolor +"; border: 1px solid #C6C6C6; margin: 0 0 20px;overflow: hidden;'>";
					myHtml += "<a target='_blank' style='text-decoration:none; color:#" + style.color + " !important; display: block;' href='http://www.s-bahn-berlin.de/bauinformationen/projektinfo_anzeige.php?ID=" + request[i].id + "' ";
					myHtml += "onmouseover='this.parentNode.style.backgroundColor=\"#" + style.fgcolorhover + "\"; this.parentNode.style.borderColor=\"#" + style.bordercolorhover + "\";'";
					myHtml += "onmouseout='this.parentNode.style.backgroundColor=\"#" + style.fgcolor + "\"; this.parentNode.style.borderColor=\"#" + style.bordercolor + "\";'";
					myHtml += ">";
					
					myHtml += "<span style='display: block; padding: 15px; overflow: hidden;'>";
					
					myHtml += "<span style='margin:0 0 0 0; padding:0; display:block;'>";

					for ( j=0; j < (request[i].linie.length); j++ ) { 
						myHtml += "<span style='width:30px; height:30px; margin:5px 5px 5px 0; padding:0;'>";
						myHtml += "<img src='http://www.s-bahn-berlin.de/images/s-linien/" + request[i].linie[j].toLowerCase() + ".png' alt='" + request[i].linie[j] + "' /></span>";
					}

					myHtml += "</span>";
					
					myHtml += "<span style='display:block;'>";
					myHtml += "<small style='font-size:10px; font-weight:normal; display: block; margin: 0 0 5px 0;'>" + request[i].von + "</small>";
					myHtml += "<span style='display: block; margin:0; font-size:12px; color:#" + style.color + " !important; clear: both;'>";
					myHtml += request[i].headline;
					myHtml += "</span>";
					//myHtml += "<a style='color:#" + style.color + ";font-weight:normal;background:url(http://www.s-bahn-berlin.de/images/layout/ico-link-box-lokal.png) ";
					//myHtml += "no-repeat scroll 0 5px transparent; padding:0 0 0 15px; font-size:12px;' ";
					//myHtml += "href='http://www.s-bahn-berlin.de/bauinformationen/projektinfo_anzeige.php?ID=" + request[i].id + "' >Mehr Informationen</a>";
					myHtml += "</span>";
					
					myHtml += "</span>";
					myHtml += "</a>";
					myHtml +=  "</div>";
					
				}
				
			} else {
				
				myHtml += "<h1>" + style.title + "<h1>";
	
				if (style.betriebslage) { 
					myHtml += '<div><h1>Abweichende Betriebssituation</h1>';
					myHtml += '<p>' + style.betriebslage + '</p>';
					myHtml += '<p>	';
					myHtml += '<a target="_blank" href="http://www.s-bahn-berlin.de/bauinformationen/betriebslage.htm" title="Weitere Informationen finden Sie www.s-bahn-berlin.de">Weitere Informationen</a>';
					myHtml += '</p></div>';		
				}
				
				for(i=0; i < (request.length);i++) {
					myHtml += "<div>" 
					myHtml += "<ul>";
					
					for( j=0; j < (request[i].linie.length); j++ ) { 
						myHtml += "<li><img src='http://www.s-bahn-berlin.de/images/s-linien/";
						myHtml += request[i].linie[j].toLowerCase() + ".png' alt='" + request[i].linie[j] + "' /></li>";
					}

					myHtml += "</ul>";
					myHtml += "<div>";
					myHtml += "<small>" + request[i].von + "</small>";			
					myHtml +=  "<p><a target='_blank' href='http://www.s-bahn-berlin.de/bauinformationen/projektinfo_anzeige.php?ID=" + request[i].id + "' >";
					myHtml +=  request[i].headline;
					myHtml +=  "</a></p>";
					//myHtml +=  "<a href='http://www.s-bahn-berlin.de/bauinformationen/projektinfo_anzeige.php?ID=" + request[i].id + "' >Mehr Informationen</a>";		
					myHtml +=  "</div><br style='clear:both;' /></div>";
				}
			
			}
		
		} else {
	
			if (style.betriebslage) { 
				myHtml += '<div style="font-family:Arial;line-height:145%;font-size:14px;margin: 0 0 1em;min-height: 20px; ';
				myHtml += 'background: url(http://www.s-bahn-berlin.de/images/layout/bg-betriebsinfo.png) repeat-x scroll left top #FFD220; ';
				myHtml += 'border: 1px solid #F1DB4E;margin: 0 0 20px;padding: 15px 15px 0 15px;">';
				myHtml += '<h1 style="font-size:18px; margin:0 0 10px;">Abweichende Betriebssituation</h1>';
				myHtml += '<p>' + style.betriebslage + '</p>';
				myHtml += '<p>	';
				myHtml += '<a target="_blank" style="display: inline-block; font-family:Verdana;color:#' + style.color + ';font-weight:normal; font-size:12px; ';
				myHtml += 'background:url(http://www.s-bahn-berlin.de/images/layout/ico-link-box-lokal.png) no-repeat scroll 0 5px transparent; padding:0 0 0 15px;" ';
				myHtml += 'href="http://www.s-bahn-berlin.de/bauinformationen/betriebslage.htm" title="Weitere Informationen finden Sie www.s-bahn-berlin.de">Weitere Informationen</a>';
				myHtml += '</p></div>';
			} else {
				myHtml += "<div style='font-family:Verdana; background: repeat-x scroll left top #" + style.fgcolor +"; border: 1px solid #C6C6C6; margin: 0 0 20px;padding: 15px 15px 0px; overflow: hidden;'>"; 
				myHtml += "<h1 style='font-family:Verdana; font-size:16px;margin:0 0 10px;'>Zur Zeit liegen keine Fahrplan&auml;nderungen vor.</h1> ";
				myHtml += "<p><a target='_blank' style='display: inline-block; font-family:Verdana;color:#" + style.color +";font-weight:normal; font-size:12px;";
				myHtml += "background:url(http://www.s-bahn-berlin.de/images/layout/ico-link-box-lokal.png) no-repeat scroll 0 5px transparent; ";
				myHtml += "padding:0 0 0 15px;' href='http://www.s-bahn-berlin.de/aktuell/fahrplan.linien.bahnhoefe.html' ";
				myHtml += "title='Weitere Informationen finden Sie www.s-bahn-berlin.de'>Weitere Informationen finden Sie www.s-bahn-berlin.de</a></p>";
				myHtml += "</div>";
			}
		
		}
	}
	
	if ('' != style.station_link && undefined != style.station_link) {
		myHtml += '<p>';
		myHtml += '<a target="_blank" style="display: inline-block; font-size:12px;font-family:Verdana;color:#' + style.headlinecolor + ';font-weight:normal; padding:0 0 0 15px; background:url(http://www.s-bahn-berlin.de/images/layout/ico-link-box-lokal.png) no-repeat scroll 0 5px transparent;" href="' + style.station_link + '" title="Bahnhof anzeigen">';
		myHtml += 'Weitere Bahnhofsinformationen anzeigen';
		myHtml += '</a>';
		myHtml += '</p>';
	}
	
	myHtml += '</div>';
		
	statusHTML.push(myHtml);
	document.getElementById('s-bahn-berlin-verkehrslage').innerHTML = statusHTML.join(''); 
}


