/**
 * shows the fakeAds at top off LP and
 * google Ads at page bottom
 * @see Bug 35445
 */

function showFakeAds() {
	    document.getElementById("LPTeaserText").style.display = 'none';
	    document.getElementById("FAdsLpTop").style.display = 'block';
	    textcaption = document.getElementById("LPFormText");
	    textcaption.innerHTML = lpFormText;
	    textcaption.style.color = 'red';
	    textcaption.style.fontSize = '16px';   	
	}	 
/**
 * handles google response array
 */
function google_afs_request_done(google_ads) {
	
	/*
	 * Verify that there are actually ads to display.
	 */
	var google_num_ads = google_ads.length;
	if (google_num_ads <= 0) 
		return;
	
	var wideAds = "";   //wide ad unit html text
	if(google_ads.length <= 4) {
		var wideAds2 = ""
	    for(i = 0; i < google_ads.length; i++){
	    	if (google_ads[i].type=="text/wide"){  
	    		//Link bauen
		        var href        = '<a onmousedown="triggerclick(\'google\');" target="_blank" rel="nofollow" href="' + google_ads[i].url + '">'; //link bauen
		        var hrefAnker   = google_ads[i].line1;
		        var line1       = google_ads[i].line2;
		        var line2       = google_ads[i].visible_url;
		               
		        wideAds +=  '<div class="google_adsense_bigsize_row">'; //eine Row  
		        	wideAds +=  href; //link geöffnet
		            wideAds +=  '<span class="ads"><span class="head">' + hrefAnker + '</span><br />';
		            wideAds +=  '  <span class="textads">' + line1 + '</span>';        
		            wideAds +=  '&nbsp;&nbsp;<span class="link">' + line2 + '</span>';
		            wideAds +=  '</span></a>'; //base span schliessen und link schliessen
		        wideAds +=  '</div>' //Row schließen       
	    	}    
	    }
	} 
	  
	//** Write HTML for wide and narrow ads to the proper <div> elements
	document.getElementById("wide_ad_unit1").innerHTML = wideAds;
}

//Fake Ads anzeigen [Bug 35445]
showFakeAds();

//google request starten		
google_afs_query = decodeURI(addKey);
google_afs_ad = 'w4';
google_afs_client  = 'unister-travel-lp'; 
google_afs_channel = 'channel1'; 

google_afs_ie = 'latin1';
google_afs_oe = 'latin1';
google_afs_adsafe = 'high';
if(testModeSense && testModeSense == true) {
	var google_afs_adtest = 'on';
} else {
	var google_afs_adtest = 'off';	
}  
google_afs_hl = 'de';
google_ad_client = 'unister_js';
