var arrSkyAds = new Array();
var arrTopAds = new Array();
var arrBottomAds = new Array();

var adTopStyle = "middle";
var adBottomStyle = "middle";
var adSkyStyle = "middle";

var adDesignTop = 'AdLine';
var adDesignBottom = 'AdLine';
var adNetworkType = 'C';
var googleAdsTitle = "";

var adNetworkLinkS = 'http://services.google.com/feedback/online_hws_feedback';

$('#leftSkyAdsContainer').hide('fast');


function showTopAdLine()
{
	var s;
	var arrAds = arrTopAds;
	
	
	
	if (arrAds.length > 0) {
		
		if (adDesignTop == 'AdLine') {
				s = '<div style="padding-left:10px;">';	
				s += tplAdDesignLineTop(arrAds);
				s += '</div>';				
		}
		
		if (adDesignTop == 'AdBox') {
				s = '<div style="margin-top:5px;">';
				s += tplAdDesignBoxTop(arrAds);
				s += '</div>';
		}
		
		if (adDesignTop == 'AdBoxDetail') {
				s = '<div style="margin-top:-8px;">';
				s += tplAdDesignBoxTop(arrAds);
				s += '</div>';
		}
		
		$('#adsLineTop').html(s);
		
		
		
		return true;
	}
	
	return false;
}

function showBottomAdLine(){

	var arrAds = arrBottomAds;
	
	
	if (arrAds.length > 0) {
	
		if (adDesignBottom == 'AdLine') {
			s = tplAdDesignLineBottom(arrAds);
		}
		
		if (adDesignBottom == 'AdBox') {
			s = tplAdDesignBoxBottom(arrAds);
		}
		
		$('#adsLineBottom').html(s);
		
		return true;
	}
	
	return false;
}



function tplAdDesignLineTop(arrAds)
{
		var s;
		var id;
		
		var adNetworkLink = adNetworkLinkS;
		
		if(adNetworkType == 'C'){adNetworkLink =  google_info.feedback_url;}
		
		if (arrAds[0].type == "image"){
	
				s += '<table width="100%" border="0" cellpadding="0" cellspacing="0">';
				s += '<tr>';
				s += '<td>';
				s += '<a href="' + arrTopAds[0].url + '" target="_blank" title="go to ' + arrTopAds[0].visible_url + '"><img style="border:none;" src="' + arrTopAds[0].image_url + '" width="' + arrTopAds[0].image_width + '" height="' + arrTopAds[0].image_height + '"></a>';
				s += '</td></tr>';
				s += '</table>';
		}else{
			s += '<table width="100%" border="0" cellpadding="0" cellspacing="0">';
			s += '<tr>';
			s += '<td>';
			s += '<table border=0 cellpadding=0 cellspacing=0 width=100%>';
			s += '<tr><td width="100%" align="left"><a style="font-size:12px;color:#000000;text-decoration:none;" href="'+adNetworkLink+'">Google Anzeigen</a></td></tr>';
			//s += '<tr height=1><td bgcolor="#fcd13c"></td></tr>';
			
			for(i=0; i < arrAds.length; ++i){
				id = 't' + i;
				
				googleAdsTitle = googleAdsTitle + arrAds[i].line1 + ' ';
				
				if(adTopStyle == 'middle'){
					s += tplAdLineMiddle(arrAds[i], id);
				}
				if(adTopStyle == 'small'){
					s += tplAdLineSmall(arrAds[i], id);
				}
				if(adTopStyle == 'middleTitelBrake'){
					s += tplAdLineMiddleTitelBrake(arrAds[i], id);
				}	
				if(adTopStyle == 'smallTitelBrake'){
					s += tplAdLineSmallTitelBrake(arrAds[i], id);
				}	
				
				if(adTopStyle == 'middleLinkBrakeGrau'){
					s += tplAdLineMiddleLinkBrakeGrau(arrAds[i], id);
				}	
				if(adTopStyle == 'smallLinkBrakeGrau'){
					s += tplAdLineSmallLinkBrakeGrau(arrAds[i], id);
				}	
	
				if(adTopStyle == 'middleLinkBrakeBlau'){
					s += tplAdLineMiddleLinkBrakeBlau(arrAds[i], id);
				}	
				if(adTopStyle == 'smallLinkBrakeBlau'){
					s += tplAdLineSmallLinkBrakeBlau(arrAds[i], id);
				}	
	
	
			}
			
			s += '</table>';
			s += '</td>';
			s += '</tr>';
			s += '</table>';
		}
		s = '</div>';
		return s;
}

function tplAdDesignBoxTop(arrAds)
{
		var s;
		var id;
		var adNetworkLink = adNetworkLinkS;
		
		if(adNetworkType == 'C'){adNetworkLink =  google_info.feedback_url;}
		
		if (arrAds[0].type == "image"){
				s = '<table width="100%" border="0" cellpadding="0" cellspacing="0">';
				s += '<tr>';
				s += '<td>';
				s += '<a href="' + arrTopAds[0].url + '" target="_blank" title="go to ' + arrTopAds[0].visible_url + '"><img style="border:none;" src="' + arrTopAds[0].image_url + '" width="' + arrTopAds[0].image_width + '" height="' + arrTopAds[0].image_height + '"></a>';
				s += '</td></tr>';
				s += '</table>';
		}else{
			s = '<table width="100%" border="0" cellpadding="0" cellspacing="0">';
			s += '<tr>';
			s += '<td>';
			s += '<table border=0 cellpadding=0 cellspacing=0 width=100%>';
			s += '<tr><td width="100%" align="left">';
			
			if(adDesignTop=='AdBox'){
				s += '<div style="padding-left:10px;">';
			}
			
			s += '<a style="font-size:12px;color:#000000;text-decoration:none;" href="'+adNetworkLink+'">Google Anzeigen</a>';
			
			if (adDesignTop == 'AdBox') {
	  		s += '</div>';
	  	}
			s += '</td></tr>';
			s += '<tr><td height="2" width="100%" align="left"></td></tr>';
			//s += '<tr height=1><td bgcolor="#fcd13c"></td></tr>';
			
			for(i=0; i < arrAds.length; ++i){
				id = 't' + i;
				
				googleAdsTitle = googleAdsTitle + arrAds[i].line1 + ' ';
				
				if(adTopStyle == 'middle'){
					s += tplAdLineMiddleBox(arrAds[i], id);
				}
			}
			
			s += '</table>';
			s += '</td>';
			s += '</tr>';
			s += '</table>';
		}
		return s;
}


function tplAdDesignBoxBottom(arrAds)
{
		var s;
		var id;
		var adNetworkLink = adNetworkLinkS;
		
		if(adNetworkType == 'C'){adNetworkLink =  google_info.feedback_url;}
		
		if (arrAds[0].type == "image"){
				s = '<table width="100%" border="0" cellpadding="0" cellspacing="0">';
				s += '<tr>';
				s += '<td>';
				s += '<a href="' + arrTopAds[0].url + '" target="_blank" title="go to ' + arrTopAds[0].visible_url + '"><img style="border:none;" src="' + arrTopAds[0].image_url + '" width="' + arrTopAds[0].image_width + '" height="' + arrTopAds[0].image_height + '"></a>';
				s += '</td></tr>';
				s += '</table>';
		}else{
			s = '<table width="100%" border="0" cellpadding="0" cellspacing="0">';
			s += '<tr>';
			s += '<td>';
			s += '<table border=0 cellpadding=0 cellspacing=0 width=100%>';
			s += '<tr><td width="100%" align="left">';
			
			if(adDesignTop=='AdBox'){
				s += '<div style="padding-left:10px;">';
			}
			
			s += '<a style="font-size:12px;color:#000000;text-decoration:none;" href="'+adNetworkLink+'">Google Anzeigen</a>';
			
			if (adDesignTop == 'AdBox') {
	  		s += '</div>';
	  	}
			s += '</td></tr>';
			s += '<tr><td height="2" width="100%" align="left"></td></tr>';
			//s += '<tr height=1><td bgcolor="#fcd13c"></td></tr>';
			
			for(i=0; i < arrAds.length; ++i){
				id = 'b' + i;
				
				googleAdsTitle = googleAdsTitle + arrAds[i].line1 + ' ';
				
				if(adTopStyle == 'middle'){
					s += tplAdLineMiddleBox(arrAds[i], id);
				}
			}
			
			s += '</table>';
			s += '</td>';
			s += '</tr>';
			s += '</table>';
		}
		return s;
}
function tplAdDesignLineBottom(arrAds)
{
		var s;
		var id;
		var adNetworkLink = adNetworkLinkS;
		
		if(adNetworkType == 'C'){adNetworkLink =  google_info.feedback_url;}
		
		if(arrAds.length>0){
			s = '<table width="100%" border="0" cellpadding="0" cellspacing="0">';
			s += '<tr>';
			s += '<td>';
			s += '<table border=0 cellpadding=0 cellspacing=0 width=100%>';
			s += '<tr><td width="100%" align="left"><a style="font-size:12px;color:#000000;text-decoration:none;" href="' + adNetworkLink + '">Google Anzeigen</a></td></tr>';
			//s += '<tr height=1><td bgcolor="#fcd13c"></td></tr>';
			
			for(i=0; i < arrAds.length; ++i){
				id = 'b' + i;
				
				googleAdsTitle = googleAdsTitle + arrAds[i].line1 + ' ';
				
				if(adTopStyle == 'middle'){
					s += tplAdLineMiddleBox(arrAds[i], id);
				}
			}
			
			s += '</table>';
			s += '</td>';
			s += '</tr>';
			s += '</table>';
			
			$('#adsLineBottom').html(s);
		}
}

function tplAdLineMiddleBox(arrAdLine, id)
{
	var s;
	s = '<tr onmouseover="this.style.backgroundColor=\'#fffcad\';document.getElementById(\'bottom'+id+'\').style.color=\'#FF0000\';window.status=\'gehe zu ' + arrAdLine.visible_url + '\'" onmouseout="this.style.backgroundColor=\'#FFFFFF\';document.getElementById(\'bottom'+id+'\').style.color=\'#0000CC\';window.status=\'\'">';
	s += '<td height="22" width="100%" style="padding:8px 0 8px 0;background-image:url(http://' + window.location.hostname + '/images/line.gif);background-position:bottom;background-repeat:repeat-x;" align="left" valign="middle"><a id="bottom'+id+'" style="font-size:16px;color:#0000cc;cursor:hand;text-decoration:underline" href="' + arrAdLine.url +
			'" target="_blank" onmouseover="window.status=\'gehe zu ' + arrAdLine.visible_url + '\'" onmouseout="window.status=\'\'"><b>' + arrAdLine.line1 + '</b></a>';
	s += '<font style="font-size:13px;color:#000;text-decoration:none">';
	s += ' ' + arrAdLine.line2 + ' ';
	if (arrAdLine.line3) {
  	s += arrAdLine.line3 + ' ';
	}
	s += '</font>';
	s += '<nobr><a style="font-size:13px;color:#666666;text-decoration:none" href="' + arrAdLine.url +
			'" target="_blank" onmouseover="window.status=\'gehe zu ' + arrAdLine.visible_url + '\'" onmouseout="window.status=\'\'">' + arrAdLine.visible_url + '</a></nobr>';

	s += '</td></tr>';
	
	s= '<tr>';
	s+= '<td>';
	s+= '<table style="width:100%;border:1px solid #65ade5;background-color:#f3f6fb;" onmouseover="this.style.backgroundColor=\'#fffcad\';document.getElementById(\'bottom'+id+'\').style.color=\'#FF0000\';window.status=\'gehe zu ' + arrAdLine.visible_url + '\'" onmouseout="this.style.backgroundColor=\'#f3f6fb\';document.getElementById(\'bottom'+id+'\').style.color=\'#0000CC\';window.status=\'\'">'
	s+= '<td>';
	s += '<div style="margin: 10px 5px 10px 10px;">';
	s += '<a id="bottom'+id+'" style="font-size:16px;color:#0000cc;cursor:hand;text-decoration:underline" href="' + arrAdLine.url +'" target="_blank" onmouseover="window.status=\'gehe zu ' + arrAdLine.visible_url + '\'" onmouseout="window.status=\'\'"><b>' + arrAdLine.line1 + '</b></a><br>';
	s += '<font style="font-size:13px;color:#000;text-decoration:none">';
	s += ' ' + arrAdLine.line2 + ' ';
	if (arrAdLine.line3) {
  	s += arrAdLine.line3 + ' ';
	}
	s += '</div></font>';
	s+= '</td>';
	s+= '<td align="right" valign="middle">';
	s += '<a style="font-size:12px;color:#000;text-decoration:none" href="' + arrAdLine.url + '" target="_blank" onmouseover="window.status=\'gehe zu ' + arrAdLine.visible_url + '\'" onmouseout="window.status=\'\'">' + arrAdLine.visible_url + '</a>&nbsp;&nbsp;';
	s+= '</td>';
	s+= '</table>'
	s+= '</td>';
	s+= '</tr>';
	s+= '<tr>';
	s+= '<td height="5"></a>';
	s+= '</tr>';
	return s;
}

function showLeftAdSky()
{		
		var arrAds = arrSkyAds;
		var s;
		
		if(arrAds.length>0)
		{
		
			s = '<table width="200" border="0" cellpadding="0" cellspacing="0">';
			
			for(var i=0; i < arrAds.length; ++i){
				
				if(adSkyStyle == 'middle'){
					s += tplAdSkyLineMiddle(arrAds[i], i);
				}
				if(adSkyStyle == 'small'){
					s += tplAdSkyLineSmall(arrAds[i], i);
				}
			}
			
			s += '</table>';
					
			$('#adsSkyLeft').html(s);
			$('#leftSkyAdsContainer').css("visibility","visible");
			
		}
}

function tplAdLineMiddle(arrAdLine, id)
{
	var s;
	s = '<tr onmouseover="this.style.backgroundColor=\'#fffcad\';document.getElementById(\'bottom'+id+'\').style.color=\'#FF0000\';window.status=\'gehe zu ' + arrAdLine.visible_url + '\'" onmouseout="this.style.backgroundColor=\'#FFFFFF\';document.getElementById(\'bottom'+id+'\').style.color=\'#0000CC\';window.status=\'\'">';
	s += '<td height="22" width="100%" style="padding:8px 0 8px 0;background-image:url(http://' + window.location.hostname + '/images/line.gif);background-position:bottom;background-repeat:repeat-x;" align="left" valign="middle"><a id="bottom'+id+'" style="font-size:16px;color:#0000cc;cursor:hand;text-decoration:underline" href="' + arrAdLine.url +
			'" target="_blank" onmouseover="window.status=\'gehe zu ' + arrAdLine.visible_url + '\'" onmouseout="window.status=\'\'"><b>' + arrAdLine.line1 + '</b></a>';
	s += '<font style="font-size:13px;color:#000;text-decoration:none">';
	s += ' ' + arrAdLine.line2 + ' ';
	if (arrAdLine.line3) {
  	s += arrAdLine.line3 + ' ';
	}
	s += '</font>';
	s += '<nobr><a style="font-size:13px;color:#666666;text-decoration:none" href="' + arrAdLine.url +
			'" target="_blank" onmouseover="window.status=\'gehe zu ' + arrAdLine.visible_url + '\'" onmouseout="window.status=\'\'">' + arrAdLine.visible_url + '</a></nobr>';

	s += '</td></tr>';
	
	return s;
}

function tplAdLineSmall(arrAdLine, id)
{
	var s;
	s = '<tr onmouseover="this.style.backgroundColor=\'#fffcad\';document.getElementById(\'bottom'+id+'\').style.color=\'#FF0000\';window.status=\'gehe zu ' + arrAdLine.visible_url + '\'" onmouseout="this.style.backgroundColor=\'#FFFFFF\';document.getElementById(\'bottom'+id+'\').style.color=\'#0000CC\';window.status=\'\'">';
	s += '<td height="22" width="100%" style="padding:8px 0 8px 0;background-image:url(http://' + window.location.hostname + '/images/line.gif);background-position:bottom;background-repeat:repeat-x;" align="left" valign="middle"><a id="bottom'+id+'" style="font-size:15px;color:#0000cc;cursor:hand;text-decoration:underline" href="' + arrAdLine.url +
			'" target="_blank" onmouseover="window.status=\'gehe zu ' + arrAdLine.visible_url + '\'" onmouseout="window.status=\'\'"><b>' + arrAdLine.line1 + '</b></a>';
	s += '<font style="font-size:12px;color:#000;text-decoration:none">';
	s += ' ' + arrAdLine.line2 + ' ';
	if (arrAdLine.line3) {
  	s += arrAdLine.line3 + ' ';
	}
	s += '</font>';
	s += '<nobr><a style="font-size:12px;color:#666666;text-decoration:none" href="' + arrAdLine.url +
			'" target="_blank" onmouseover="window.status=\'gehe zu ' + arrAdLine.visible_url + '\'" onmouseout="window.status=\'\'">' + arrAdLine.visible_url + '</a></nobr>';

	s += '</td></tr>';
	
	return s;
}

function tplAdLineMiddleTitelBrake(arrAdLine, id)
{
	var s;

	s = '<tr onmouseover="this.style.backgroundColor=\'#fffcad\';document.getElementById(\'bottom'+id+'\').style.color=\'#FF0000\';window.status=\'gehe zu ' + arrAdLine.visible_url + '\'" onmouseout="this.style.backgroundColor=\'#FFFFFF\';document.getElementById(\'bottom'+id+'\').style.color=\'#0000CC\';window.status=\'\'">';
	s += '<td height="22" width="100%" style="padding:8px 0 8px 0;background-image:url(http://' + window.location.hostname + '/images/line.gif);background-position:bottom;background-repeat:repeat-x;" align="left" valign="middle"><a id="bottom'+id+'" style="font-size:17px;color:#0000cc;cursor:hand;text-decoration:underline" href="' + arrAdLine.url +
			'" target="_blank" onmouseover="window.status=\'gehe zu ' + arrAdLine.visible_url + '\'" onmouseout="window.status=\'\'"><b>' + arrAdLine.line1 + '</b></a>';
	s += '<font style="font-size:12px;color:#000;text-decoration:none">';
	s += '<br>' + arrAdLine.line2 + ' ';
	if (arrAdLine.line3) {
  	s += arrAdLine.line3 + ' ';
	}
	s += '</font>';
	s += '<a style="font-size:12px;color:#666666;text-decoration:none" href="' + arrAdLine.url +
			'" target="_blank" onmouseover="window.status=\'gehe zu ' + arrAdLine.visible_url + '\'" onmouseout="window.status=\'\'">' + arrAdLine.visible_url + '</a>';

	s += '</td></tr>';
	
	return s;
}

function tplAdLineSmallTitelBrake(arrAdLine, id)
{
	var s;

	s = '<tr onmouseover="this.style.backgroundColor=\'#fffcad\';document.getElementById(\'bottom'+id+'\').style.color=\'#FF0000\';window.status=\'gehe zu ' + arrAdLine.visible_url + '\'" onmouseout="this.style.backgroundColor=\'#FFFFFF\';document.getElementById(\'bottom'+id+'\').style.color=\'#0000CC\';window.status=\'\'">';
	s += '<td height="22" width="100%" style="padding:8px 0 8px 0;background-image:url(http://' + window.location.hostname + '/images/line.gif);background-position:bottom;background-repeat:repeat-x;" align="left" valign="middle"><a id="bottom'+id+'" style="font-size:15px;color:#0000cc;cursor:hand;text-decoration:underline" href="' + arrAdLine.url +
			'" target="_blank" onmouseover="window.status=\'gehe zu ' + arrAdLine.visible_url + '\'" onmouseout="window.status=\'\'"><b>' + arrAdLine.line1 + '</b></a>';
	s += '<font style="font-size:12px;color:#000;text-decoration:none">';
	s += '<br>' + arrAdLine.line2 + ' ';
	if (arrAdLine.line3) {
  	s += arrAdLine.line3 + ' ';
	}
	s += '</font>';
	s += '<a style="font-size:12px;color:#666666;text-decoration:none" href="' + arrAdLine.url +
			'" target="_blank" onmouseover="window.status=\'gehe zu ' + arrAdLine.visible_url + '\'" onmouseout="window.status=\'\'">' + arrAdLine.visible_url + '</a>';

	s += '</td></tr>';
	
	return s;
}


function tplAdLineMiddleLinkBrakeGrau(arrAdLine, id)
{
	var s;

	s = '<tr onmouseover="this.style.backgroundColor=\'#fffcad\';document.getElementById(\'bottom'+id+'\').style.color=\'#FF0000\';window.status=\'gehe zu ' + arrAdLine.visible_url + '\'" onmouseout="this.style.backgroundColor=\'#FFFFFF\';document.getElementById(\'bottom'+id+'\').style.color=\'#0000CC\';window.status=\'\'">';
	s += '<td height="22" width="100%" style="padding:8px 0 8px 0;background-image:url(http://' + window.location.hostname + '/images/line.gif);background-position:bottom;background-repeat:repeat-x;" align="left" valign="middle"><a id="bottom'+id+'" style="font-size:16px;color:#0000cc;cursor:hand;text-decoration:underline" href="' + arrAdLine.url +
			'" target="_blank" onmouseover="window.status=\'gehe zu ' + arrAdLine.visible_url + '\'" onmouseout="window.status=\'\'"><b>' + arrAdLine.line1 + '</b></a>';
	s += '<font style="font-size:12px;color:#000;text-decoration:none">';
	s += ' ' + arrAdLine.line2 + ' ';
	if (arrAdLine.line3) {
  	s += arrAdLine.line3 + '<br>';
	}
	s += '</font>';
	s += '<a style="font-size:12px;color:#666666;text-decoration:none" href="' + arrAdLine.url +
			'" target="_blank" onmouseover="window.status=\'gehe zu ' + arrAdLine.visible_url + '\'" onmouseout="window.status=\'\'">' + arrAdLine.visible_url + '</a>';

	s += '</td></tr>';
	
	return s;
}

function tplAdLineSmallLinkBrakeGrau(arrAdLine, id)
{
	var s;

	s = '<tr onmouseover="this.style.backgroundColor=\'#fffcad\';document.getElementById(\'bottom'+id+'\').style.color=\'#FF0000\';window.status=\'gehe zu ' + arrAdLine.visible_url + '\'" onmouseout="this.style.backgroundColor=\'#FFFFFF\';document.getElementById(\'bottom'+id+'\').style.color=\'#0000CC\';window.status=\'\'">';
	s += '<td height="22" width="100%" style="padding:8px 0 8px 0;background-image:url(http://' + window.location.hostname + '/images/line.gif);background-position:bottom;background-repeat:repeat-x;" align="left" valign="middle"><a id="bottom'+id+'" style="font-size:15px;color:#0000cc;cursor:hand;text-decoration:underline" href="' + arrAdLine.url +
			'" target="_blank" onmouseover="window.status=\'gehe zu ' + arrAdLine.visible_url + '\'" onmouseout="window.status=\'\'"><b>' + arrAdLine.line1 + '</b></a>';
	s += '<font style="font-size:12px;color:#000;text-decoration:none">';
	s += ' ' + arrAdLine.line2 + ' ';
	if (arrAdLine.line3) {
  	s += arrAdLine.line3 + '<br>';
	}
	s += '</font>';
	s += '<a style="font-size:12px;color:#666666;text-decoration:none" href="' + arrAdLine.url +
			'" target="_blank" onmouseover="window.status=\'gehe zu ' + arrAdLine.visible_url + '\'" onmouseout="window.status=\'\'">' + arrAdLine.visible_url + '</a>';

	s += '</td></tr>';
	
	return s;
}


function tplAdLineMiddleLinkBrakeBlau(arrAdLine, id)
{
	var s;

	s = '<tr onmouseover="this.style.backgroundColor=\'#fffcad\';document.getElementById(\'bottom'+id+'\').style.color=\'#FF0000\';document.getElementById(\'bottom1'+id+'\').style.color=\'#FF0000\';window.status=\'gehe zu ' + arrAdLine.visible_url + '\'" onmouseout="this.style.backgroundColor=\'#FFFFFF\';document.getElementById(\'bottom'+id+'\').style.color=\'#0000CC\';document.getElementById(\'bottom1'+id+'\').style.color=\'#0000CC\';window.status=\'\'">';
	s += '<td height="22" width="100%" style="padding:8px 0 8px 0;background-image:url(http://' + window.location.hostname + '/images/line.gif);background-position:bottom;background-repeat:repeat-x;" align="left" valign="middle"><a id="bottom'+id+'" style="font-size:16px;color:#0000cc;cursor:hand;text-decoration:underline" href="' + arrAdLine.url +
			'" target="_blank" onmouseover="window.status=\'gehe zu ' + arrAdLine.visible_url + '\'" onmouseout="window.status=\'\'"><b>' + arrAdLine.line1 + '</b></a>';
	s += '<font style="font-size:12px;color:#000;text-decoration:none">';
	s += ' ' + arrAdLine.line2 + ' ';
	if (arrAdLine.line3) {
  	s += arrAdLine.line3 + '<br>';
	}
	s += '</font>';
	s += '<a id="bottom1'+id+'" style="font-size:12px;color:#0000cc;text-decoration:none" href="' + arrAdLine.url +
			'" target="_blank" onmouseover="window.status=\'gehe zu ' + arrAdLine.visible_url + '\'" onmouseout="window.status=\'\'">' + arrAdLine.visible_url + '</a>';

	s += '</td></tr>';
	
	return s;
}

function tplAdLineSmallLinkBrakeBlau(arrAdLine, id)
{
	var s;

	s = '<tr onmouseover="this.style.backgroundColor=\'#fffcad\';document.getElementById(\'bottom'+id+'\').style.color=\'#FF0000\';document.getElementById(\'bottom1'+id+'\').style.color=\'#FF0000\';window.status=\'gehe zu ' + arrAdLine.visible_url + '\'" onmouseout="this.style.backgroundColor=\'#FFFFFF\';document.getElementById(\'bottom'+id+'\').style.color=\'#0000CC\';document.getElementById(\'bottom1'+id+'\').style.color=\'#0000CC\';window.status=\'\'">';
	s += '<td height="22" width="100%" style="padding:8px 0 8px 0;background-image:url(http://' + window.location.hostname + '/images/line.gif);background-position:bottom;background-repeat:repeat-x;" align="left" valign="middle"><a id="bottom'+id+'" style="font-size:15px;color:#0000cc;cursor:hand;text-decoration:underline" href="' + arrAdLine.url +
			'" target="_blank" onmouseover="window.status=\'gehe zu ' + arrAdLine.visible_url + '\'" onmouseout="window.status=\'\'"><b>' + arrAdLine.line1 + '</b></a>';
	s += '<font style="font-size:12px;color:#000;text-decoration:none">';
	s += ' ' + arrAdLine.line2 + ' ';
	if (arrAdLine.line3) {
  	s += arrAdLine.line3 + '<br>';
	}
	s += '</font>';
	s += '<a id="bottom1'+id+'" style="font-size:12px;color:#0000cc;text-decoration:none" href="' + arrAdLine.url +
			'" target="_blank" onmouseover="window.status=\'gehe zu ' + arrAdLine.visible_url + '\'" onmouseout="window.status=\'\'">' + arrAdLine.visible_url + '</a>';

	s += '</td></tr>';
	
	return s;
}


function tplAdSkyLineMiddle(arrAdLine, id)
{
	var s;
	if(id==0){padding=0;}else{padding=10;}
	
	s = '<tr onmouseover="this.style.backgroundColor=\'#fffcad\';document.getElementById(\'sky'+id+'\').style.color=\'#FF0000\';window.status=\'gehe zu ' + arrAdLine.visible_url + '\'" onmouseout="this.style.backgroundColor=\'#FFFFFF\';document.getElementById(\'sky'+id+'\').style.color=\'#0000CC\';window.status=\'\'">';
	s += '<td width="200" style="width:200px;padding:'+padding+'px 0 8px 0;background-image:url(http://' + window.location.hostname + '/images/line.gif);background-position:bottom;background-repeat:repeat-x;" align="left" valign="middle"><a id="sky'+id+'" style="font-size:16px;color:#0000cc;cursor:hand;text-decoration:underline" href="' + arrAdLine.url +
			'" target="_blank" onmouseover="window.status=\'gehe zu ' + arrAdLine.visible_url + '\'" onmouseout="window.status=\'\'"><b>' + arrAdLine.line1 + '</b></a>';
	s += '<font style="font-size:12px;color:#000;text-decoration:none">';
	s += '<br>' + arrAdLine.line2 + ' ';
	if (arrAdLine.line3) {
  	s += arrAdLine.line3;
	}
	s += '</font>';
	s += '<br><a style="font-size:10px;color:#666666;text-decoration:none" href="' + arrAdLine.url +
			'" target="_blank" onmouseover="window.status=\'gehe zu ' + arrAdLine.visible_url + '\'" onmouseout="window.status=\'\'">' + arrAdLine.visible_url + '</a>';
	s += '</td></tr>';	
	
	return s;
}

function tplAdSkyLineSmall(arrAdLine, id)
{
	var s;
	if(id==0){padding=0;}else{padding=10;}
	
	s = '<tr onmouseover="this.style.backgroundColor=\'#fffcad\';document.getElementById(\'sky'+id+'\').style.color=\'#FF0000\';window.status=\'gehe zu ' + arrAdLine.visible_url + '\'" onmouseout="this.style.backgroundColor=\'#FFFFFF\';document.getElementById(\'sky'+id+'\').style.color=\'#0000CC\';window.status=\'\'">';
	s += '<td width="200" style="width:200px;padding:'+padding+'px 0 8px 0;background-image:url(http://' + window.location.hostname + '/images/line.gif);background-position:bottom;background-repeat:repeat-x;" align="left" valign="middle"><a id="sky'+id+'" style="font-size:15px;color:#0000cc;cursor:hand;text-decoration:underline" href="' + arrAdLine.url +
			'" target="_blank" onmouseover="window.status=\'gehe zu ' + arrAdLine.visible_url + '\'" onmouseout="window.status=\'\'"><b>' + arrAdLine.line1 + '</b></a>';
	s += '<font style="font-size:12px;color:#000;text-decoration:none">';
	s += '<br>' + arrAdLine.line2 + ' ';
	if (arrAdLine.line3) {
  	s += arrAdLine.line3;
	}
	s += '</font>';
	s += '<br><a style="font-size:10px;color:#666666;text-decoration:none" href="' + arrAdLine.url +
			'" target="_blank" onmouseover="window.status=\'gehe zu ' + arrAdLine.visible_url + '\'" onmouseout="window.status=\'\'">' + arrAdLine.visible_url + '</a>';
	s += '</td></tr>';	
	
	return s;
}