function checkoffer(s_url,s_target,b_isLastminute){var s_oldContent=dojo.byId("result_check_"+s_target).innerHTML;dojo.byId("result_avail_"+s_target).innerHTML='<img style="position: relative; right: 20px; top: 5px" src="/urlaubswelt/images/common/spinner_small.gif" border="0" />';dojo.byId("result_check_"+s_target).innerHTML="";dojo.xhrPost({url:s_url+"?format=ajax",handleAs:"json",form:"form_angebot_"+s_target,load:function(data){dojo.byId("result_check_"+s_target).innerHTML=s_oldContent;dojo.byId("response_angebot_"+s_target).innerHTML=data.content;dojo.parser.parse(dojo.byId("response_angebot_"+s_target));if(data.ba.ERGEBNIS=="-3"){dojo.byId("result_check_"+s_target).innerHTML="";dojo.byId("result_avail_"+s_target).innerHTML='<div class="offer-failed">Angebot<br />ausgebucht</div>';Shadowbox.open({player:"html",title:dojo.byId("pruefen_dialog_angebot").title,content:dojo.byId("pruefen_dialog_angebot").innerHTML,width:500,height:70})}else{if(data.ba.ERGEBNIS=="-4"){dojo.byId("result_check_"+s_target).innerHTML="";dojo.byId("result_avail_"+s_target).innerHTML='<div class="offer-failed">Angebot<br />ausgebucht</div>';Shadowbox.open({player:"html",title:dojo.byId("pruefen_dialog_zimmer").title,content:dojo.byId("pruefen_dialog_zimmer").innerHTML,width:500,height:70})}else{if(data.ba.ERGEBNIS=="-5"){dojo.byId("result_check_"+s_target).innerHTML="";dojo.byId("result_avail_"+s_target).innerHTML='<div class="offer-failed">&nbsp;</div>';Shadowbox.open({player:"html",title:dojo.byId("pruefen_dialog_problem").title,content:dojo.byId("pruefen_dialog_problem").innerHTML,width:500,height:70})}else{if(data.ba.ERGEBNIS=="1"||data.ba.ERGEBNIS=="-2"){dojo.require("dojo.currency");var s_price=dojo.currency.format(data.ba.ANGEBOT.GESAMTPREIS,{currency:"EUR",pattern:"#,##0.#"});s_price=s_price.replace(/00$/,"-");var s_checkResult='<div class="module-price module-price-checked"><div class="price-text"><p><span class="price-prefix">Gesamtpreis f&uuml;r alle Reisenden:</span> <span class="price-value">'+s_price+' </span> <span class="price-currency">&euro;</span></p></div>';if(data.pricechange>0){s_checkResult='<div class="offer-higher"><div>Der Preis hat sich ge&auml;ndert.</div><span>Sie sehen nun den g&uuml;nstigsten verf&uuml;gbaren Preis:</span></div>'+s_checkResult}else{if(data.pricechange<0){s_checkResult='<div class="offer-lower"><div>Das Angebot ist jetzt g&uuml;nstiger!</div><span>Sie sehen nun den g&uuml;nstigsten verf&uuml;gbaren Preis:</span></div>'+s_checkResult}else{if(data.incentive&&data.incentive.priceinfo){s_checkResult=data.incentive.priceinfo+s_checkResult}}}if(data.incentive&&data.incentive.overlay){var o_incentiveTarget=dojo.byId("incentive_overlay_"+s_target);if(o_incentiveTarget){o_incentiveTarget.innerHTML=data.incentive.overlay}}var o_departureSpacer=dojo.byId("incentive_spacer_"+s_target);if(o_departureSpacer){dojo.style(o_departureSpacer,"display","none")}dojo.style(dojo.byId("result_check_"+s_target),"clear","both");if(dojo.isIE&&(dojo.isIE<8)){dojo.style(dojo.byId("result_check_"+s_target),"float","none")}if(data.alternativeCurrency!=""){s_checkResult+='<div class="module-alternative-price"><div class="price-alternative-text"><p><span class="price-alternative-value">'+data.alternativeCurrency+"</span></p></div></div>"}dojo.byId("result_check_"+s_target).innerHTML=s_checkResult;dojo.byId("result_avail_"+s_target).innerHTML='<div class="offer-ok">Angebot<br />verf&uuml;gbar</div>';var o_headline1=dojo.byId("module-headline-offerlist-sub");var o_headline2=dojo.byId("module-headline-offerlist-sub-checked");if(""==o_headline1.style.top){dojo.fx.slideTo({node:o_headline1,duration:500,top:-30,delay:1000,onEnd:function(){o_headline1;dojo.fx.slideTo({node:o_headline2,duration:500,top:0}).play()}}).play()}}else{if(data.ba.ERGEBNIS=="-1"){dojo.byId("result_check_"+s_target).innerHTML="";dojo.byId("result_avail_"+s_target).innerHTML='<div class="offer-failed">Angebot<br />ausgebucht</div>'}}}}}s.prop1=null;s.prop2=null;s.prop3=null;s.prop7=null;s.prop8=null;s.eVar1=null;s.eVar2=null;s.eVar3=null;s.eVar7=null;s.eVar8=null;for(var key in data.sitecatalyst){eval("s."+key+" = data.sitecatalyst."+key)}void (s.t());patchButtonsForIE(dojo.byId("response_angebot_"+s_target));if(typeof parseForExitLinks=="function"){parseForExitLinks()}},error:function(error){dojo.byId("result_check_"+s_target).innerHTML="";dojo.byId("result_avail_"+s_target).innerHTML='<div class="offer-failed">Angebot<br />ausgebucht</div>'},timeout:60000});return false}function showFlight(a){Shadowbox.open({player:"html",content:dojo.byId("fluginfo_"+a).innerHTML,height:350,width:700,title:"Flug-Informationen"})};
