audi_ngw.namespace(audi_ngw,"vtp.statistic");audi_ngw.vtp.statistic.search={};audi_ngw.vtp.statistic.search.optionSelected=false;audi_ngw.vtp.statistic.search.exSearchStarted=false;audi_ngw.vtp.statistic.ignore=false;audi_ngw.vtp.statistic.ignoreDetails=false;audi_ngw.vtp.statistic.static_url="audi/de/de2/";audi_ngw.vtp.statistic.initialize=function(){this.__className="audi_ngw.vtp.statistic";this.__classVersion="1.0";this.initTrackOptions()};audi_ngw.vtp.statistic.initTrackOptions=function(c){var b=audi_ngw.form.vtpAjax;var a=$("#vtpTrack");if(a.size()>0&&a.get(0)){trackOptions=a.metadata().trackOptions;if(trackOptions){audi_ngw.vtp.statistic.trackOptions=trackOptions}}};audi_ngw.vtp.statistic.vtpTrack=function(b,a){if(audi_ngw.vtp.statistic.trackOptions){if(a=="doSearch"){audi_ngw.vtp.statistic.setIgnore(false);this.doSearch()}else{if(a=="doList"){this.doList()}else{if(a=="doDetail"){this.doDetail()}else{if(a=="doQuicksearch"){this.doSearch()}else{if(a=="initSearch"){this.doInitSearch()}else{if(a=="initList"){this.doInitList()
}else{if(a=="initDetail"){this.doInitDetail()}}}}}}}}};audi_ngw.vtp.statistic.doSearch=function(){if(audi_ngw.vtp.statistic.search.optionSelected==false&&audi_ngw.vtp.statistic.ignore==false){if(audi_ngw.vtp.statistic.trackOptions.page=="list"){audi_ngw.vtp.statistic.trackOptions.shortPageName="/quick_search/"}else{audi_ngw.vtp.statistic.trackOptions.shortPageName="/search/"}audi_ngw.vtp.statistic.trackOptions.prop1=audi_ngw.vtp.statistic.static_url+audi_ngw.vtp.statistic.trackOptions.shortProp1+audi_ngw.vtp.statistic.trackOptions.shortPageName+"started/";audi_ngw.vtp.statistic.trackOptions.pageName=audi_ngw.vtp.statistic.static_url+audi_ngw.vtp.statistic.trackOptions.shortPageName;audi_ngw.vtp.statistic.trackOptions.prop20="search started";audi_ngw.vtp.statistic.search.optionSelected=true;this.doTrack(s)}};audi_ngw.vtp.statistic.endSearch=function(){if(audi_ngw.vtp.statistic.search.optionSelected==true){if(audi_ngw.vtp.statistic.trackOptions.page=="list"){audi_ngw.vtp.statistic.trackOptions.shortPageName="/quick_search/"
}else{audi_ngw.vtp.statistic.trackOptions.shortPageName="/search/"}audi_ngw.vtp.statistic.trackOptions.prop1=audi_ngw.vtp.statistic.static_url+audi_ngw.vtp.statistic.trackOptions.shortProp1+audi_ngw.vtp.statistic.trackOptions.shortPageName+"ended/";audi_ngw.vtp.statistic.trackOptions.pageName=audi_ngw.vtp.statistic.static_url+audi_ngw.vtp.statistic.trackOptions.shortPageName;audi_ngw.vtp.statistic.trackOptions.prop20="search completed";audi_ngw.vtp.statistic.search.optionSelected=true;this.doTrack(s)}};audi_ngw.vtp.statistic.doInitSearch=function(){if(audi_ngw.vtp.statistic.trackOptions.page=="search"&&audi_ngw.vtp.statistic.ignore==false){audi_ngw.vtp.statistic.trackOptions.prop1=audi_ngw.vtp.statistic.static_url+audi_ngw.vtp.statistic.trackOptions.prop1+audi_ngw.vtp.statistic.trackOptions.pageName;audi_ngw.vtp.statistic.trackOptions.pageName=audi_ngw.vtp.statistic.static_url+audi_ngw.vtp.statistic.trackOptions.pageName;this.doTrack(s)}};audi_ngw.vtp.statistic.doInitList=function(){if(audi_ngw.vtp.statistic.trackOptions.page=="list"&&audi_ngw.vtp.statistic.ignore==false&&audi_ngw.vtp.statistic.trackOptions.insideAction==true){audi_ngw.vtp.statistic.trackOptions.prop1=audi_ngw.vtp.statistic.static_url+audi_ngw.vtp.statistic.trackOptions.prop1+audi_ngw.vtp.statistic.trackOptions.pageName;
audi_ngw.vtp.statistic.trackOptions.pageName=audi_ngw.vtp.statistic.static_url+audi_ngw.vtp.statistic.trackOptions.pageName;this.doTrack(s)}};audi_ngw.vtp.statistic.setIgnore=function(a){audi_ngw.vtp.statistic.ignore=a};audi_ngw.vtp.statistic.setIgnoreDetails=function(a){audi_ngw.vtp.statistic.ignoreDetails=a};audi_ngw.vtp.statistic.doInitTab=function(b,a){if(audi_ngw.vtp.statistic.ignore==false&&audi_ngw.vtp.statistic.trackOptions!=null){audi_ngw.vtp.statistic.cleanTrackOptions(audi_ngw.vtp.statistic.trackOptions);audi_ngw.vtp.statistic.trackOptions.shortPageName=a;audi_ngw.vtp.statistic.trackOptions.prop1=audi_ngw.vtp.statistic.static_url+b+a;audi_ngw.vtp.statistic.trackOptions.pageName=audi_ngw.vtp.statistic.static_url+a;audi_ngw.vtp.statistic.trackOptions.prop20=null;this.doTrack(s)}};audi_ngw.vtp.statistic.doInitTabExSearch=function(b,a){if(audi_ngw.vtp.statistic.search.exSearchStarted==false&&audi_ngw.vtp.statistic.trackOptions!=null){if(audi_ngw.vtp.statistic.ignore==false){audi_ngw.vtp.statistic.cleanTrackOptions(audi_ngw.vtp.statistic.trackOptions);
audi_ngw.vtp.statistic.trackOptions.shortPageName=a;audi_ngw.vtp.statistic.trackOptions.prop1=audi_ngw.vtp.statistic.static_url+b+a;audi_ngw.vtp.statistic.trackOptions.pageName=audi_ngw.vtp.statistic.static_url+a;audi_ngw.vtp.statistic.trackOptions.prop20=null;audi_ngw.vtp.statistic.search.exSearchStarted=true;this.doTrack(s)}}};audi_ngw.vtp.statistic.doInitDetail=function(){if(audi_ngw.vtp.statistic.trackOptions!=null&&(audi_ngw.vtp.statistic.trackOptions.page=="detail"||audi_ngw.vtp.statistic.trackOptions.page=="insurance")&&audi_ngw.vtp.statistic.ignoreDetails==false){audi_ngw.vtp.statistic.trackOptions.prop1=audi_ngw.vtp.statistic.static_url+audi_ngw.vtp.statistic.trackOptions.shortProp1+audi_ngw.vtp.statistic.trackOptions.shortPageName;audi_ngw.vtp.statistic.trackOptions.pageName=audi_ngw.vtp.statistic.static_url+audi_ngw.vtp.statistic.trackOptions.shortPageName;audi_ngw.vtp.statistic.setIgnoreDetails(true);this.doTrack(s)}};audi_ngw.vtp.statistic.doChangePage=function(){if(audi_ngw.vtp.statistic.ignore==false&&audi_ngw.vtp.statistic.trackOptions!=null){audi_ngw.vtp.statistic.trackOptions.prop1=audi_ngw.vtp.statistic.trackOptions.prop1;
audi_ngw.vtp.statistic.trackOptions.pageName=audi_ngw.vtp.statistic.trackOptions.pageName;this.doTrack(s)}};audi_ngw.vtp.statistic.startEvent=function(a,c,d,b){if(audi_ngw.vtp.statistic.ignore==false&&audi_ngw.vtp.statistic.trackOptions!=null){audi_ngw.vtp.statistic.cleanTrackOptions(audi_ngw.vtp.statistic.trackOptions);audi_ngw.vtp.statistic.trackOptions.prop20="action started";audi_ngw.vtp.statistic.trackOptions.pageName=audi_ngw.vtp.statistic.static_url+a;audi_ngw.vtp.statistic.trackOptions.prop2=d;audi_ngw.vtp.statistic.trackOptions.prop3=null;if(b!=""){audi_ngw.vtp.statistic.trackOptions.events="event2,"+b}else{audi_ngw.vtp.statistic.trackOptions.events="event2"}audi_ngw.vtp.statistic.trackOptions.prop1=audi_ngw.vtp.statistic.static_url+c;this.doTrack(s)}};audi_ngw.vtp.statistic.endEventOnPage=function(a,c,d,b){if(audi_ngw.vtp.statistic.trackOptions!=null){audi_ngw.vtp.statistic.endEvent(a,c,d,b)}};audi_ngw.vtp.statistic.endEvent=function(a,c,d,b){if(audi_ngw.vtp.statistic.ignore==false&&audi_ngw.vtp.statistic.trackOptions!=null){audi_ngw.vtp.statistic.cleanTrackOptions(audi_ngw.vtp.statistic.trackOptions);
audi_ngw.vtp.statistic.trackOptions.prop20="action completed";audi_ngw.vtp.statistic.trackOptions.prop1=audi_ngw.vtp.statistic.static_url+c;audi_ngw.vtp.statistic.trackOptions.pageName=audi_ngw.vtp.statistic.static_url+a;audi_ngw.vtp.statistic.trackOptions.prop2=null;audi_ngw.vtp.statistic.trackOptions.prop3=d;if(b!=""){audi_ngw.vtp.statistic.trackOptions.events="event3,"+b}else{audi_ngw.vtp.statistic.trackOptions.events="event3"}this.doTrack(s)}};audi_ngw.vtp.statistic.doAudiCode=function(a,b,c){if(audi_ngw.vtp.statistic.trackOptions!=null){audi_ngw.vtp.statistic.cleanTrackOptions(audi_ngw.vtp.statistic.trackOptions);audi_ngw.vtp.statistic.trackOptions.pageName=audi_ngw.vtp.statistic.static_url+a;audi_ngw.vtp.statistic.trackOptions.prop1=audi_ngw.vtp.statistic.static_url+b;if(c=="startEntercode"){audi_ngw.vtp.statistic.trackOptions.prop1=audi_ngw.vtp.statistic.trackOptions.prop1+a+"/started/";audi_ngw.vtp.statistic.trackOptions.prop2="entercode";audi_ngw.vtp.statistic.trackOptions.prop3=""}else{if(c=="endEntercode"){audi_ngw.vtp.statistic.trackOptions.prop1=audi_ngw.vtp.statistic.trackOptions.prop1+a+"/ended/";
audi_ngw.vtp.statistic.trackOptions.prop2="";audi_ngw.vtp.statistic.trackOptions.prop3="entercode";audi_ngw.vtp.statistic.trackOptions.events="event15"}else{if(c=="startGetcode"){audi_ngw.vtp.statistic.trackOptions.prop1=audi_ngw.vtp.statistic.trackOptions.prop1+a+"/started/";audi_ngw.vtp.statistic.trackOptions.prop2="getcode";audi_ngw.vtp.statistic.trackOptions.prop3=""}else{if(c=="endGetcode"){audi_ngw.vtp.statistic.trackOptions.prop1=audi_ngw.vtp.statistic.trackOptions.prop1+a+"/ended/";audi_ngw.vtp.statistic.trackOptions.prop2="";audi_ngw.vtp.statistic.trackOptions.prop3="getcode";audi_ngw.vtp.statistic.trackOptions.events="event14"}}}}this.doTrack(s)}};audi_ngw.vtp.statistic.customEvent=function(a,b,c){if(audi_ngw.vtp.statistic.trackOptions!=null){audi_ngw.vtp.statistic.cleanTrackOptions(audi_ngw.vtp.statistic.trackOptions);audi_ngw.vtp.statistic.trackOptions.prop20=c;audi_ngw.vtp.statistic.trackOptions.pageName=audi_ngw.vtp.statistic.static_url+a;audi_ngw.vtp.statistic.trackOptions.prop1=audi_ngw.vtp.statistic.static_url+b;
this.doTrack(s)}};audi_ngw.vtp.statistic.getProperty=function(a){if(a=="prop1"&&audi_ngw.vtp.statistic.trackOptions!=null){return audi_ngw.vtp.statistic.trackOptions.prop1}};audi_ngw.vtp.statistic.doTrack=function(b){var a=audi_ngw.vtp.statistic.trackOptions;if(a){a.pageName=a.pageName.replace("//","/");a.prop1=a.prop1.replace("//","/");b.pageName=a.pageName;b.prop1=b.hier1=b.eVar1=a.prop1;b.prop2=b.eVar2=a.prop2;b.prop3=b.eVar3=a.prop3;b.prop4=b.eVar4=a.prop4;b.prop5=b.eVar5=a.prop5;b.prop6=a.prop6;b.prop7=a.prop7;b.prop8=a.prop8;b.prop9=a.prop9;b.prop10=a.prop10;b.prop11=b.eVar11=a.prop11;b.prop12=b.eVar12=a.prop12;b.prop13=b.eVar13=a.prop13;b.prop14=b.eVar14=a.prop14;b.prop15=b.eVar15=a.prop15;b.prop16=b.eVar16=a.prop16;b.prop17=b.eVar17=a.prop17;b.prop18=b.eVar18=a.prop18;b.prop19=b.eVar19=a.prop19;b.prop20=b.eVar20=a.prop20;b.prop26=b.eVar26=a.prop26;b.prop27=b.eVar27=a.prop27;b.prop28=b.eVar28=a.prop28;b.prop29=b.eVar29=a.prop29;b.prop30=b.eVar30=a.prop30;b.products=a.products;if(b.products&&b.products.charAt(b.products.length-1)==","){b.products=b.products.substring(0,b.products.length-1)
}if(a.events&&a.events!=""){if(a.events.indexOf("event13")>-1){a.events=a.events}else{a.events="event13,"+a.events}}else{a.events="event13"}b.events=a.events;b.channel=a.channel;b.server=a.server}void (b.t())};audi_ngw.vtp.statistic.cleanTrackOptions=function(a){if(audi_ngw.vtp.statistic.trackOptions!=null){a.prop2=null;a.prop3=null;a.prop4=null;a.prop5=null;a.prop6=null;a.prop7=null;a.prop8=null;a.prop9=null;a.prop10=null;a.prop11=null;a.prop12=null;a.prop13=null;a.prop14=null;a.prop15=null;a.prop16=null;a.prop17=null;a.prop20=null;a.prop26=null;a.prop27=null;a.prop28=null;a.prop29=null;a.prop30=null;a.events=null;a.products=null}return false};function changeView(a,b){var c=document.p.act.value==a;document.p.act.value=a;if(b<0){b=-b;c=false}document.p.v.value=b;if(c&&$("form").is("form.vtpAjax")){document.p.action="controller.content_fragment.do";$("form.vtpAjax").trigger("submit")}else{document.p.submit()}}function changeSelection(a){document.p.v.value=0;if(a&&document.p.show){document.p.show.value=0}document.p.act.value="search";
document.p.tab.value=(a)?"all":"chg";document.p.submit()}function carDetails(){document.p.act.value="offer";document.p.submit()}function getViewStat(){var d=8;var c="";for(var b=1;b<=d;b++){var f=document.getElementById("a"+b);if(f==null){return c}var a=f.style;c+=(a.display=="none")?"1":"0"}return c}audi_ngw.config.sHostHTTP="http://"+window.location.host;audi_ngw.config.sHostHTTPS="https://"+window.location.host;audi_ngw.config.preload=new Array();audi_ngw.namespace(audi_ngw,"form.vtpAjax");$.fn.audi_vtpAjax=function(){audi_ngw.dom.vtpAjax._doSubmit(this);return this};audi_ngw.form.vtpAjax._addEvents=function(){var b=audi_ngw.form.vtpAjax;var a="form.";a+=b._oOptions._sClassNameMarker;jQuery(a).unbind("submit").bind("submit.vtpAjax",audi_ngw.form.vtpAjax.submit).parents(".audi_generated_corners_background").find(".close").unbind("click.vtpAjax").bind("click.vtpAjax",audi_ngw.form.vtpAjax.hide)};audi_ngw.form.vtpAjax.submit=function(d){d.preventDefault();var c=audi_ngw.form.vtpAjax;var a="form.";a+=c._oOptions._sClassNameMarker;
a+=".";a+=c._oOptions._sClassNameActiveMarker;if(jQuery(a).size()){return}var b=jQuery(d.target)||jQuery(d);audi_ngw.form.vtpAjax._doSumbit(b,d);return false};audi_ngw.form.vtpAjax._doSumbit=function(b){var d=audi_ngw.form.vtpAjax;b.parent().end().addClass(d._oOptions._sClassNameActiveMarker).audi_setLoading();var a=b.find(":input").serializeArray();var c=b.attr("action");$.post(c,a,audi_ngw.form.vtpAjax.onSuccess)};audi_ngw.form.vtpAjax.onSuccess=function(d){$(d).each(function(){if($(this).attr("id")=="sessionTimeout"){url=$(this).text();window.location=url}});var c=audi_ngw.form.vtpAjax;var a="form.";a+=c._oOptions._sClassNameMarker;a+=".";a+=c._oOptions._sClassNameActiveMarker;if(jQuery("#audi_modal_super_wrapper").css("display")!=="none"){audi_ngw.layer.modal._$elLayer.find("#audi_modal_body").replaceWith(jQuery("<div/>").append(d).find(" #audi_modal_body > *"));var f=d.match(/<script(.|\s)*?\/script>/g);if(f!==null&&f.length){var b=jQuery("<div/>").append(f.join(" ")).empty().remove();b=null}}else{jQuery("#audi_content_wrapper").html(jQuery("<div/>").append(d.replace(/<script(.|\s)*?\/script>/g,"")).find(" #audi_content_wrapper > *"))
}audi_ngw.event.trigger("ajaxSnippetReady",[{sId:"#audi_container_page"}]);audi_ngw.event.trigger("ajaxPageLoadContentReady");if(document.title.indexOf("Audi")<0){window.setTimeout(function(){var g=jQuery("#jQuery_history");if(0!==g.size()){g[0].document.title=audi_ngw.navigation.title}document.title=audi_ngw.navigation.title},3000)}};audi_ngw.form.vtpAjax.hide=function(b){var a=jQuery(b.target)||jQuery(b);audi_ngw.form.vtpAjax._doHide(a)};audi_ngw.form.vtpAjax._doHide=function(a){var b=audi_ngw.form.vtpAjax;a.parents(".audi_generated_corners_background").find("form."+b._oOptions._sClassNameActiveMarker).removeClass(b._oOptions._sClassNameActiveMarker).audi_unsetLoading()};audi_ngw.form.vtpAjax.onAjaxPageLoadContentReady=function(a,b){audi_ngw.form.vtpAjax._addEvents();audi_ngw.event.trigger("ajaxPageLoadContentPrepared");audi_ngw.vtp.search.initialize();audi_ngw.vtp.list.initialize();audi_ngw.vtp.detail.initialize()};audi_ngw.form.vtpAjax.onAjaxModalContentReady=function(a,b){if(!audi_ngw.url.hasXHRContent(b,a.timeStamp)){return false
}audi_ngw.log("EVENT - ajaxModalContentReady: audi_ngw.form.vtpAjax.onAjaxModalContentReady",arguments);audi_ngw.form.vtpAjax._addEvents();audi_ngw.event.trigger("ajaxModalContentPrepared")};function STD(b,a){document.p.ixList.value=b;document.p.v.value=a;document.p.act.value="offer";document.p.submit()}function nav_list(a){document.p.nav.value=a;document.p.act.value="offer";if($("form").is("form.vtpAjax")){document.p.action="controller.content_fragment.do";$("form.vtpAjax").trigger("submit")}else{document.p.submit()}}function checkAction(){var a=document.getElementsByName("act")[0].value;if(a.length==0){return false}else{return true}}function showCont(a,h,d){var c=document.getElementById(d).style.display;if(a==1){document.getElementById(h).style.display=(c=="none")?"":"none"}document.getElementById(d).style.display=(c=="none")?"":"none";var g="N"+h;document.images[g].src=(c=="none")?"img_vtp/arrow_bottom_7x4.gif":"img_vtp/arrow_right_4x7.gif";g="R"+h;var b=document.images[g].src;var f;if(c=="none"){f=b.replace(/s.jpg/,"l.jpg")
}else{f=b.replace(/l.jpg/,"s.jpg")}document.images[g].src=f}var largePic=null;var largePicWhich=null;function showLargePic(d,a,b,c){if(largePic!=null){document.body.removeChild(largePic);largePic=null}d.onmousemove=function(g){if(largePic==null){var j=document.createElement("div");j.innerHTML=a;j.style.position="absolute";j.style.zIndex="100000";j.style.visibility="hidden";largePic=document.body.appendChild(j)}var f,h;if(!g){f=event.clientX+getScrollX();h=event.clientY+getScrollY()}else{f=g.pageX;h=g.pageY}if(h+largePic.clientHeight>getScrollY()+getViewportHeight()){h=getScrollY()+getViewportHeight()-largePic.clientHeight}f+=(b!=undefined?b:10);h+=(c!=undefined?c:0);largePic.style.left=f+"px";largePic.style.top=h+"px";largePic.style.visibility="visible"}}function hideLargePic(){if(largePic!=null){document.body.removeChild(largePic);largePic=null}}function getScrollX(){if(window.pageXOffset){return window.pageXOffset}else{if(document.documentElement&&document.documentElement.scrollLeft){return document.documentElement.scrollLeft
}else{if(document.body){return document.body.scrollLeft}else{return 0}}}}function getScrollY(){if(window.pageYOffset){return window.pageYOffset}else{if(document.documentElement&&document.documentElement.scrollTop){return document.documentElement.scrollTop}else{if(document.body){return document.body.scrollTop}else{return 0}}}}function getViewportHeight(){if(window.innerHeight){return window.innerHeight}else{if(document.documentElement&&document.documentElement.clientHeight){return document.documentElement.clientHeight}else{if(document.body){return document.body.clientHeight}else{return 0}}}}audi_ngw.form.vtpAjax.initialize=function(a){var b=audi_ngw.form.vtpAjax;b.__className="audi_ngw.form.vtpAjax";b.__classVersion="1.1";b._oOptions={};b._oOptions._sClassNameMarker="vtpAjax";b._oOptions._sClassNameActiveMarker="runningRequest";audi_ngw.event.bind("ajaxModalContentReady",audi_ngw.form.vtpAjax.onAjaxModalContentReady);audi_ngw.event.bind("ajaxPageLoadContentReady",audi_ngw.form.vtpAjax.onAjaxPageLoadContentReady);
b._addEvents()};function agb(a){fenster=window.open(a,"Info","width=480,height=425,scrollbars=no,resizable=no,menubar=no,toolbar=no");self.focus}$(document).ready(function(){audi_ngw.vtp.statistic.initialize();audi_ngw.form.vtpAjax.initialize();audi_ngw.vtp.search.initialize();audi_ngw.vtp.list.initialize();audi_ngw.vtp.detail.initialize()});var currentModalId=new Object();audi_ngw.namespace(audi_ngw,"vtp.search");function rSel(d,c,a){if(!bWait){bWait=true;var b=vtpUrl+"&tab="+d+"&idx=-1";if(c){b+="&tab2="+c}if(a){b+="&tab3="+a}ajaxSearch(b)}else{bWait=false}}function doDSearch(b,a){if(!bWait){if(typeof b!="object"){return}if(b.name=="UkCity"){if(document.p.City.value==b.value){return}document.p.City.value=b.value;if(b.value!=""){$("#errorPlz").attr("style","display: none");if(document.s.UkDist.selectedIndex==0&&a){document.s.UkDist.selectedIndex=1;document.p.Distance.value=document.s.UkDist.options[document.s.UkDist.selectedIndex].value}else{if(document.s.UkDist.selectedIndex==0&&!a){return}}}}if(b.name=="UkPLZ"){if(document.p.PostCode.value==b.value){return
}if(b.value!=""){$("#errorPlz").attr("style","display: none");if(document.s.UkDist.selectedIndex==0&&a){document.s.UkDist.selectedIndex=1;document.p.Distance.value=document.s.UkDist.options[document.s.UkDist.selectedIndex].value}else{if(document.s.UkDist.selectedIndex==0&&!a){document.p.PostCode.value=b.value;return}}}if(b.value.length>0&&(b.value.length!=5||isNaN(b.value))){b.value=document.p.PostCode.value;$("#errorPlz").attr("style","display: block;margin-top:10px;margin-bottom:10px;");return}document.p.PostCode.value=b.value}if(b.name=="UkDist"){document.p.Distance.value=b.options[b.selectedIndex].value;if(document.p.PostCode.value==""&&document.p.City.value==""){return}if(document.p.Distance.value=="-1"){document.p.City.value=="";document.p.PostCode.value==""}}document.p.tab.value="dist";showWait();if(document.p.act.value=="list"&&document.p.selfAction){document.p.selfAction.value="search"}document.p.submit()}else{alert(sWait);bWait=false}}function showResultList(){if(document.p.Distance&&document.p.Distance.value=="-2"){document.p.tab.value="dist2"
}else{if(document.p.selfAction){document.p.selfAction.value="search"}document.p.act.value="list";document.p.v.value=0;document.p.submit()}showWait()}var busyTimer=null;function showWaitImg(){if(bWait){var a=$("#audi_content_wrapper").height();$("#busy_overlay").css({height:a}).show();if(jQuery.browser.msie===true&&parseFloat(jQuery.browser.version)<6.5){$(":input").attr("disabled","disabled")}$("#vtp_preloader").css({top:a/2}).show();busyTimer=setTimeout(function(){$("#vtp_preloader").hide();$("#busy_overlay").hide();$(":input").removeAttr("disabled");bWait=false;busyTimer=audi_ngw.clearTimer(busyTimer)},60000)}}function showWait(){bWait=true;setTimeout("showWaitImg()",100)}function chkSubmit(){return document.s.paramtransfer.value=="1"}function flagListe(){var c=getViewStat();var a=0;for(var b=c.length-1;b>=0;b--){a<<=1;if(c.charAt(b)=="1"){a|=1}}return a}function markTab(a){var b=+new Date();document.images.dummybild.src=a+"&ts="+b;return false}function selTab(c){if(!bWait){var b=c.options[c.selectedIndex].value;
bWait=true;var a=c.name;if(a=="t_location"&&b.charAt(0)=="M"){a="t_partner";b=b.substring(1)}if(a=="t_colorm"&&b.charAt(0)=="G"){a="t_color";b=b.substring(1)}if(a=="t_colorm"&&b=="-1"){ajaxSearch(vtpUrl+"&tab="+a+"&tab2=t_color&idx="+b)}if(a=="t_intcolorm"&&b.charAt(0)=="G"){a="t_intcolor";b=b.substring(1)}if(a=="t_intcolorm"&&b=="-1"){ajaxSearch(vtpUrl+"&tab="+a+"&tab2=t_intcolor&idx="+b)}if(a=="t_manuf"&&b==-1){ajaxSearch(vtpUrl+"&tab="+a+"&tab2=t_model&tab3=t_smod&idx="+b)}else{if(a=="t_model"&&b==-1){ajaxSearch(vtpUrl+"&tab="+a+"&tab2=t_smod&idx="+b)}else{if(a=="t_location"&&b=="-1"){ajaxSearch(vtpUrl+"&tab="+a+"&idx="+b)}else{ajaxSearch(vtpUrl+"&tab="+a+"&idx="+b)}}}audi_ngw.vtp.statistic.vtpTrack(s,"doSearch")}else{bWait=false}}function selLocation(c){if(!bWait){var b=c.options[c.selectedIndex].value;bWait=true;var a=c.name;if(a=="t_location"&&b.charAt(0)=="M"){a="t_partner";b=b.substring(1)}if(a=="t_location"&&b=="-1"){ajaxSearch(vtpUrl+"&tab="+a+"&idx="+b)}else{ajaxSearch(vtpUrl+"&tab="+a+"&idx="+b)}audi_ngw.vtp.statistic.vtpTrack(s,"doSearch")
}else{bWait=false}}function selCheck(a){if(!bWait){bWait=true;ajaxSearch(vtpUrl+"&tab="+a.name+"&idx="+a.value);audi_ngw.vtp.statistic.vtpTrack(s,"doSearch")}else{bWait=false}}function selUpdate(c){if(!c){return}bWait=false;busyTimer=audi_ngw.clearTimer(busyTimer);$("#vtp_preloader").hide();$("#busy_overlay").hide();$(":input").removeAttr("disabled");for(var f=0;f<c.length;f++){if(c[f].num){var b=c[f].num;var a=$("#vtp_num");var d=a.metadata();if($(".sidesearch").is("div")&&parseInt(b.replace(/[\s,\.]/,""))!=numCurrentResult){$(".grey").removeClass("grey").bind("click",function(){showResultList()}).addClass("red")}a.val(b+" "+((b=="1")?d.one:d.more))}else{setTabJSON(c[f]);fillCurrentSelection(c[f])}}if(oneSelected){oneSelected=false;if(!onlyAudi){ajaxSearch(vtpUrl+"&tab=t_manuf&idx=AA")}}else{onlyAudi=false}setTimeout("updateNumSelected()",50)}function updateNumSelected(){$(".num_equip").each(function(h){var b=0;var d=$(this).find(":input");d.each(function(k){var n=d[k];if(n.options){var j=n.options.length;for(var l=0;
l<j;l++){var m=n.options[l].value;if(m=="-1"&&!n.options[l].selected){b++}}}else{if(n.checked&&!n.disabled){b++}}});d=$(this).find(".num_slider > div[id^=slider]");d.each(function(k){var l=$(this);if(l.length>0){var m=l.slider("values");var j=l.slider("option","max");if(m[0]>0||m[1]<j){b++}}});var c=$("a.count_equip");var f=$(c[h]);var a=$.trim(f.text());var g=a.indexOf("(");if(g!=-1){a=a.substring(0,g)}if(b>0){f.text(a+" ("+b+")")}else{f.text(a)}f.css({width:"",paddingLeft:"10px",paddingRight:"10px"})})}var oneSelected=false;var onlyAudi=false;function setTabJSON(k){var l;try{l=k.t}catch(r){}if(l==undefined){return true}var j=l[0];if(j=="t_manuf"){if(!onlyAudi){onlyAudi=l.length==2||l.length==4&&l[3]=="Audi"}}else{if(!oneSelected&&(j=="t_eq_a"||j=="t_eq_p")){var b=l.length-1;for(var d=2;d<b;d++){if(l[d]==1){oneSelected=true;break}}}}var q=(j=="t_location")?paOnly:0;var v=document.s[j];if(!(v==undefined)){var h=(l.length-2)>>1;if(v.options){var t=document.getElementById("res"+j);var m=(l[1]!==null);if(q==1){m=(l[1]==l[2])&&(l[2].indexOf("M")==-1)
}if(t){t.style.display=(m)?"block":"none"}v.options.length=v.length=0;if(h>1&&!m){v.options[v.length]=new Option("",-1,false,false)}for(var o=0;o<h;o++){var c=l[(o<<1)+2];if(c!=-1){v.options[v.length]=new Option(l[(o<<1)+3],c,false,c==l[1])}}if(m){v.options[v.length]=new Option(tsReset,-1,false,false)}}else{if(l[1]=="C"){if(h==1){v.checked=(l[2]==v.value);v.disabled=(l[3]==0)}else{v.disabled=v.checked=false}}else{if(l[1]=="c"){var b=document.s.elements.length;for(var d=0;d<b;d++){var f=document.s.elements[d];if(j==f.name){var u=l[parseInt(f.value)+2];f.checked=(u==1);f.disabled=(u>1)}}}}}}else{if(l[1]=="s"){var g=j.substring(2,j.length-3);var p=j.indexOf("_fr")!=-1;var n=$("#slider_"+g);if(n.length==0){return}var a=[];for(var o=0;o<l.length-3;o++){a[o]=l[o+3]}n.slider("option",((p)?"ixListFr":"ixListTo"),a)}}}function fillCurrentSelection(j){var h;try{h=j.t}catch(g){}if(h==undefined){return true}var k=$("#slt"+h[0]);if(k.length>0){if(h[1]!=undefined){k.text(h[3])}else{k.text("")}}else{k=$("#slt_"+h[0].substring(2,4));
if(k.length>0){if(h[1]=="s"){var b=h[0].substring(2,4);var a=$(".fromto"+b+" span");var f=h[0].indexOf("_to")!=-1;var d=$("#t_"+b+"_fr").text();var l=getIxNum(d);var c=-1;$(a.eq(1)).text((l<0)?"":d.substring(l));if(f){txtTo=$("#t_"+b+"_to").text();c=getIxNum(txtTo);$(a.eq(3)).text((c<0)?"":txtTo.substring(c))}else{$(a.eq(3)).text("")}if(l>0&&c>0){$(a.eq(0)).text("");$(a.eq(2)).text(" - ")}else{$(a.eq(0)).text((l<0)?"":d.substring(0,l));$(a.eq(2)).text((c<0)?"":txtTo.substring(0,c))}if(b=="pe"||b=="pm"||b=="lm"){$(a.eq(4)).text((c<0&&l<0)?"":" EUR")}else{if(b=="km"){$(a.eq(4)).text((c<0&&l<0)?"":" km")}}}}}}function getIxNum(a){var b=-1;for(var c=0;c<a.length;++c){var d=a.charAt(c);if(d>="0"&&d<="9"){b=c;break}}return b}var dyn=false;function ajaxSearch(a){if(a.indexOf("&tab=")!=-1){if(dyn){a+="&d=1"}a+="&ts="+(new Date).getMilliseconds()}$.getJSON(a,"",function(b){selUpdate(b)});showWait()}audi_ngw.vtp.search.initialize=function(){this.__className="audi_ngw.vtp.search";this.__classVersion="1.1";$("#UkCity").keyup(function(a){if(a.keyCode==13){doDSearch(document.getElementById("UkCity"),true)
}});$("#UkPLZ").keyup(function(a){if(a.keyCode==13){doDSearch(document.getElementById("UkPLZ"),true)}});if($("#s select").length>0){vtpSliderInitialize({slider:["slider_pe","t_pe_fr","t_pe_to"]});vtpSliderInitialize({slider:["slider_ez","t_ez_fr","t_ez_to"]});vtpSliderInitialize({slider:["slider_km","t_km_fr","t_km_to"]});vtpSliderInitialize({slider:["slider_kw","t_kw_fr","t_kw_to"]});vtpSliderInitialize({slider:["slider_hu","t_hu_fr","t_hu_to"]});vtpSliderInitialize({slider:["slider_pm","t_pm_fr","t_pm_to"]});vtpSliderInitialize({slider:["slider_lm","t_lm_fr","t_lm_to"]});bWait=false;$("#s input:checkbox").bind("click",function(a){selCheck(this)});ajaxSearch(vtpUrl);audi_ngw.vtp.statistic.vtpTrack(s,"initSearch")}$("#allMzLink").click(function(){var a={onClose:vtpModalOnClose};audi_ngw.layer.modal.api.show($(this).attr("href"),a);return false});$("#allSaLink").click(function(){audi_ngw.layer.modal.api.show($(this).attr("href"));return false})};$(document).ajaxError(function(c,b,a){setTimeout(function(){window.location.href=window.location.href
},1000)});audi_ngw.namespace(audi_ngw,"vtp.list");var reloadOnClose=false;var viewToSet=0;function viewToSetTrigger(){$(".viewToSetClass").each(function(b){var c=$("#viewToSetId").attr({id:"viewToSetId"+b});var a=c.attr("href")+viewToSet;c.attr("href",a).trigger("click")})}function ResultSort(g,a,f,b){audi_ngw.vtp.statistic.setIgnore(true);var c;if(b==0){c=document.p}else{if(b==1){c=document.mz}else{return}}c.act.value=f;c.sortBy.value=g;c.v.value=b;if(a=="S"){c.sortOrder.value=(c.sortOrder.value=="U")?"D":"U"}else{c.sortOrder.value=a}var d=$("#"+c.name);if(d.hasClass("vtpAjax")||d.hasClass("simpleAjax")){c.action="controller.content_fragment.do";d.trigger("submit")}else{document.p.submit()}}function openPrintDialog(a){fenster=window.open(a,"Drucken","width=720,height=850,scrollbars=yes,resizable=yes,menubar=no,toolbar=no");self.focus}function openMZInfo(a){if(a){$("#buttonAddList").trigger("click")}}function lines(a){document.p.ixList.value=flagListe();document.p.act.value="list";document.p.lines.value=a;document.p.submit()
}function setLines(b,a){document.p.ixList.value=flagListe();document.p.lines.value=b.value;document.p.v.value=a;document.p.act.value="list";if($("form").is("form.vtpAjax")){document.p.action="controller.content_fragment.do";$("form.vtpAjax").trigger("submit")}else{document.p.submit()}}function flagListe(){if(!document.p.car){return 0}var a=0;for(i=document.p.car.length-1;i>=0;i--){a<<=1;if(document.p.car[i].checked){a|=1}}return a}function InitHoverIntent(){$("img.vtpid01").hoverIntent(function(d){var f=$(d.target).attr("id");var c="div[id^=footnote"+f+"]";var b=$("#audi_container_main").offset();var a=$("#audi_content_wrapper").offset();$(c).css("left",d.pageX-a.left-120);$("img[class='close']").css("display","none");$(c).show("slide",{direction:"down"},500);$("div.audi_generated_corners_background").css("width","243px")},function(b){var c=$(b.target).attr("id");var a="div[id^=footnote"+c+"]";$(a).hide("slide",{direction:"down"},500)})}function GoToPage(b,a){var c;if(a==0){c=document.p}else{if(a==1){c=document.mz
}else{return}}c.act.value="list";c.page.value=b;c.v.value=a;c.action="controller.content_fragment.do";$("html").scrollTop(0);var d=$("#"+c.name);if(d.hasClass("vtpAjax")||d.hasClass("simpleAjax")){c.action="controller.content_fragment.do";d.trigger("submit")}else{document.p.submit()}}function SelectList(c){var a="#"+c;var b=$("#prop1").attr("value");$(a).change(function(){var d="";$("select option:selected").each(function(){var g=$(this).attr("id");var l=$("#p input:checked, #mz input:checked");var f=l.length;for(var j=0;j<f;j++){var k=l[j];if((g=="doCompare"&&$(k).attr("name")!="car")||(g=="doCompareMz"&&$(k).attr("name")!="carMz")){l.splice(j,1);f--;j--}}if(g=="resetSelectList"||g=="resetSelectMz"){return}else{if(g=="addToMZ"){if(l.length==0){$("#errorMZ").attr("style","display: block");$("#errorCompare").attr("style","display: none")}else{if(audi_ngw.vtp.statistic.trackOptions!=null){audi_ngw.vtp.statistic.startEvent("result_page/notepad/started/",audi_ngw.vtp.statistic.trackOptions.shortProp1+"/result_page/notepad/started/","notepad","")
}MZ($("#getCarsInActPage").text(),"addList",g)}}else{if(g=="removeFromMZ"){if(l.length==0){$("#errorMZ_Mz").attr("style","display: block");$("#errorCompare_Mz").attr("style","display: none")}else{MZ($("#getCarsInActPageMz").text(),"removeList",g);var h=$("#buttonDelList").attr("href")+document.mz.ixList.value+"&notepad="+document.mz.notepad.value;reloadOnClose=true;$("#buttonDelList").attr("href",h).trigger("click")}}else{if(g=="doCompare"){if(l.length<2||l.length>3){$("#errorCompare").attr("style","display: block");$("#errorMZ").attr("style","display: none")}else{vtpcompare($("#getCarsInActPage").text(),"addList",10,$("#getCurrentComparisons").text(),$("#getMaxComparisons").text(),b,g);buildCompareLink("#buttonCompare",document.p)}}else{if(g=="doCompareMz"){if(l.length<2||l.length>3){$("#errorCompare_Mz").attr("style","display: block");$("#errorMZ_Mz").attr("style","display: none")}else{vtpcompare($("#getCarsInActPageMz").text(),"addList",10,$("#getCurrentComparisonsMz").text(),$("#getMaxComparisonsMz").text(),b,g);
var h=$("#buttonCompareMz").attr("href")+document.mz.ixList.value;buildCompareLink("#buttonCompareMz",document.mz);viewToSet=1}}}}}}$("#resetSelectList,#resetSelectMz").attr("selected","selected")})})}function buildCompareLink(a,f){var c=$(a).attr("href");var d="&ixList=";var b=c.indexOf(d);if(b!=-1){c=c.substring(0,b+d.length)+f.ixList.value}var g={onClose:vtpModalOnClose};audi_ngw.layer.modal.api.show(c,g)}function MZ(c,d,a){var f="";if(a=="removeFromMZ"){document.mz.notepad.value=d;if(d=="removeList"){if(document.mz.carMz){if(c>1){for(var b=(c-1);b>=0;b--){if(document.mz.carMz[b].checked){f+="$"+document.mz.carMz[b].value}}}else{if(document.mz.carMz.checked){f+="$"+document.mz.carMz.value}}}document.mz.ixList.value=f}else{document.mz.ixList.value=c}}else{if(a=="addToMZ"){document.p.notepad.value=d;document.p.v.value=0;if(d=="addList"){if(document.p.car){if(c>1){for(var b=(c-1);b>=0;b--){if(document.p.car[b].checked){f+="$"+document.p.car[b].value}}}else{if(document.p.car.checked){f+="$"+document.p.car.value
}}}document.p.ixList.value=f}else{document.p.ixList.value=c}document.p.act.value="notepad";document.p.action+="?show=";document.p.action+=getViewStat();document.p.submit()}}}function vtpcompare(c,a,l,g,k,d,h){if(h=="doCompareMz"){document.mz.compare.value=a;var f="";g=0;document.mz.ixList.value="";if(a=="addList"||a=="removeList"){if(document.mz.carMz){if(c>1){for(var b=0;b<c;b++){if(document.mz.carMz[b].checked){f+="c"+document.mz.carMz[b].value;g++}}}else{if(document.mz.carMz.checked){f+="c"+document.mz.carMz.value}}}document.mz.ixList.value=f}else{document.mz.ixList.value=c}}else{if(h=="doCompare"){document.p.compare.value=a;var f="";g=0;document.p.ixList.value="";if(a=="addList"||a=="removeList"){if(document.p.car){if(c>1){for(var b=0;b<c;b++){if(document.p.car[b].checked){f+="c"+document.p.car[b].value;g++}}}else{if(document.p.car.checked){f+="c"+document.p.car.value}}}document.p.ixList.value=f}else{document.p.ixList.value=c}}}if(audi_ngw.vtp.statistic.trackOptions!=null){audi_ngw.vtp.statistic.startEvent("details_page/comparision/started/",audi_ngw.vtp.statistic.trackOptions.shortProp1+"/details_page/comparision/started/","comparision","")
}}audi_ngw.vtp.list.initialize=function(){this.__className="audi_ngw.vtp.list";this.__classVersion="1.1";SelectList("listSelect");InitHoverIntent();audi_ngw.vtp.statistic.vtpTrack(s,"initList")};var vtpModalOnClose=function(){viewToSet=0;if(reloadOnClose){document.p.submit()}};audi_ngw.layer.modal.apiOnClose=vtpModalOnClose;audi_ngw.namespace(audi_ngw,"vtp.detail");function toggleNotepadLink(){var a="#toggleNotepadLink";$("a"+a).unbind("click").click(function(){var c=$(a).metadata();var b=$(a).attr("href");audi_ngw.layer.modal.api.show(b);if($(a).text()==c.txtMerken){b=b.replace("notepad=add","notepad=del");$("#detailNotepadEnable").show();$("#detailNotepadDisable").hide();numCarsInNotepad++}else{b=b.replace("notepad=del","notepad=add");numCarsInNotepad--;if(numCarsInNotepad==0){$("#detailNotepadEnable").hide();$("#detailNotepadDisable").show()}}$(a).attr("href",b).text($(a).text()==c.txtMerken?c.txtLoeschen:c.txtMerken);return false})}function getPreloader(){var a="<div id='preloader'><img src='/ngw_base/img/preloader.gif'/></div>";
$("#audi_modal_overlay").css({display:"block",opacity:0.5});$("#audi_modal_super_wrapper").css({height:$(window).height(),display:"block"});$("#audi_modal_container").html(a).css({left:$(window).width()/2,top:$(window).height()-350,position:"absolute","text-align":"center"}).show()}audi_ngw.gallery.clickImage=function(a){jQuery("#audi_gallery_fullscreen, #audi_gallery_video").hide();jQuery("#audi_gallery_image, .audi_gallery_toolbox").show().removeClass("audi_hide");elementData=a.metadata();var g=jQuery("#audi_gallery_image");var f=g.find("img");var d=elementData.big;var c=f.attr("src");f.attr("src",d);audi_ngw.gallery.fullscreen();var b=jQuery("#audi_gallery_image").parent().find(".audi_gallery_toolbox .toolbox");audi_ngw.gallery.updateToolbox(b,elementData);return false};audi_ngw.gallery.imageWidth=58;audi_ngw.gallery.galleryWidth=347;audi_ngw.layer.advice._calculatePosition=function(a,k,h,m){var b=audi_ngw.layer.advice;var j=(h)?"#audi_modal_body":b._options.sIdWrapper;var f=jQuery(j).outerHeight();var n=jQuery(j).offset().top;
var g={left:a.pageX,top:a.pageY};b._options.iAdvideLayerOffsetX=40;var l=k.position().left+b._options.iAdvideLayerOffsetX;l+="px";var c=b._options.iAdvideLayerOffsetY-120;if(g.top<500){c=-m.height()}var d=f+n-g.top+c;d+="px";return{sLeft:l,sBottom:d}};audi_ngw.layer.advice._doShowAnimated=function(a,c){var b=audi_ngw.layer.advice;if(b._$elLayer){b._$elLayer.hide()}var h=jQuery(c);var g=(h.get(0).tagName.toLowerCase()==="a")?h.attr("href").split("#")[1]:h.parents("a").eq(0).attr("href").split("#")[1];var k="#";k+=g;var l=jQuery(k);var d=false;if(!l.size()){l=jQuery(b._sHTMLFootnote).clone(true).attr("id",h.attr("href").split("#")[1]).audi_setLoading().appendTo("#audi_content_wrapper").find("img.close").bind("click.layerAdvice",b.layerHideAnimated).end();d=true}b._$elLayer=l;var j=(h.parents("#audi_modal_body").size())?true:false;var f=b._calculatePosition(a,h,j,l);l.css({visibility:"hidden",display:"block",left:f.sLeft,bottom:f.sBottom});audi_ngw.layer.setIE6Fix(b._$elLayer,{top:"",right:"",bottom:f.sBottom,left:f.sLeft},j);
l.css({display:"none",visibility:"visible"}).slideDown(300,function(){if(d===true){jQuery.get(h.attr("href").split("#")[0],{},function(m){l.find(".ajax_content").replaceWith(m);audi_ngw.layer.setIE6FixResize(l)})}audi_ngw.animation.onComplete(audi_ngw.layer.advice.__className)})};function reloadCaptcha(a){$("#captchaImg").attr("src","controller.do?act=sendtoafriend&v=5&sid="+a+"&ts="+(new Date).getTime())}audi_ngw.vtp.detail.initialize=function(){$("img[class='footnote']").click(function(){var b=$(this).attr("id");var a=$(this).attr("sid");$("div[id *= 'footnote' ]").hide();getFootnoteData(b,e,a);return false});$("#id16").click(function(){var a=$(this).attr("pid");var b=$(this).attr("typ");calculate(a,b);return false});$("#id17").click(function(){var a=$(this).attr("pid");var b=$(this).attr("typ");calculate(a,b);return false});$("#id20").click(function(){var a=$(this).attr("pid");var b=$(this).attr("typ");calculate(a,b);return false});$("#id18").click(function(){var a=$(this).attr("sid");var b=$(this).attr("typ");
var c=$(this).attr("fuoc");callSatellite(b,c,a);return false});$("#id19").click(function(){var a=$(this).attr("sid");var b=$(this).attr("typ");var c=$(this).attr("fuoc");callSatellite(b,c,a);return false});$("#id50").click(function(){var a=$(this).attr("sid");var b=$(this).attr("typ");var c=$(this).attr("fuoc");callSatellite(b,c,a);return false});$("#insuranceButton01").click(function(){var b=$(this).attr("par");var c=$(this).attr("typ");var a=$(this).attr("pid");recalculateRate(b,a,c);return false});$("#insuranceButton02").click(function(){var b=$(this).attr("par");var c=$(this).attr("typ");var a=$(this).attr("pid");recalculateRate(b,a,c);return false});$("#creditButton01").click(function(){var a=$(this).attr("pid");var b=$(this).attr("typ");audi_ngw.vtp.statistic.endEvent("/details_page/financing/ended/",audi_ngw.vtp.statistic.getProperty("prop1")+"/details_page/financing/ended/","financing","event6");calculateCredit(a,b);return false});$("#creditButton02").click(function(){var a=$(this).attr("par");callSatellite("Credit","UrlSat_B2C",a);
return false});$("#creditButton03").click(function(){var a=$(this).attr("pid");var b=$(this).attr("typ");calculateCredit(a,b);return false});$("#creditButton04").click(function(){var a=$(this).attr("par");callSatellite("Credit","UrlSat_B2C",a);return false});$("#leaseButton01").click(function(){var a=$(this).attr("pid");var b=$(this).attr("typ");calculateLease(a,b);return false});$("#leaseButton02").click(function(){var a=$(this).attr("par");callSatellite("Lease","UrlSat_B2C",a);return false});$("#leaseButton03").click(function(){var a=$(this).attr("pid");var b=$(this).attr("typ");calculateLease(a,b);return false});$("#leaseButton04").click(function(){var a=$(this).attr("par");callSatellite("Lease","UrlSat_B2C",a);return false});toggleNotepadLink();audi_ngw.vtp.statistic.vtpTrack(s,"initDetail")};audi_ngw.namespace(audi_ngw,"vtp.sagent");function processSearchEntry(b,a,c){document.sa.act.value=b;document.sa.v.value=a;document.sa.sagentid.value=c-1;document.sa.action="controller.content_fragment.do";$("#"+document.sa.name).trigger("submit")
}function showResultListSa(a){document.sa.act.value="list";document.sa.v.value=0;document.sa.sa_resultlist.value=a;document.sa.submit()}audi_ngw.vtp.sagent.initialize=function(){this.__className="audi_ngw.vtp.sagent";this.__classVersion="1.1";$("div[class='grey']").click(function(b){var a=$(b.target).attr("par");var c=$(b.target).attr("id");if(c=="arrow1"){window.location.replace(a)}if(c=="arrow2"){showResultListSa(a)}return false});$("a[class='vtpEditSa']").click(function(){reloadOnClose=true;var a={onClose:vtpModalOnClose};audi_ngw.layer.modal.api.show($(this).attr("href"),a);return false});$("a[class='vtpDeleteSa']").click(function(){reloadOnClose=true;var a={onClose:vtpModalOnClose};audi_ngw.layer.modal.api.show($(this).attr("href"),a);return false});$("a[class='vtpExtendSa']").click(function(){audi_ngw.layer.modal.api.show($(this).attr("href"));return false});$("a[class='vtpNewSa']").click(function(){reloadOnClose=true;var a={onClose:vtpModalOnClose};audi_ngw.layer.modal.api.show($(this).attr("href"),a);return false
})};function loginSAgent(){$("#inputForm").audi_setLoading();$.ajax({dataType:"jsonp",jsonp:"jsonp_callback",data:{user_name:$("#user_input").val(),password:$("#password_input").val()},url:ssoURL,success:function(a){}})}function evalResponse(d){var c=d.error;var g=d.myAudi;if(c!=null){$("#inputForm").audi_unsetLoading();$("#user_errorMessage_li").text(c);$("#user_errorMessage_ul").show();return}if(g!=null){var b=new Date();b.setTime(b.getTime()+(7200*1000));var f="myAudi="+g+"; expires="+b.toGMTString()+"; path=/";document.cookie=f;myUrl=window.location.href;var a=myUrl.indexOf("#");myUrl=myUrl.substring(0,a);window.location.href=myUrl}}(function(a){a.fn.hoverIntent=function(m,l){var n={sensitivity:7,interval:100,timeout:0};n=a.extend(n,l?{over:m,out:l}:m);var p,o,j,d;var h=function(f){p=f.pageX;o=f.pageY};var c=function(g,f){f.hoverIntent_t=clearTimeout(f.hoverIntent_t);if((Math.abs(j-p)+Math.abs(d-o))<n.sensitivity){a(f).unbind("mousemove",h);f.hoverIntent_s=1;return n.over.apply(f,[g])}else{j=p;d=o;f.hoverIntent_t=setTimeout(function(){c(g,f)
},n.interval)}};var k=function(g,f){f.hoverIntent_t=clearTimeout(f.hoverIntent_t);f.hoverIntent_s=0;return n.out.apply(f,[g])};var b=function(r){var q=(r.type=="mouseover"?r.fromElement:r.toElement)||r.relatedTarget;while(q&&q!=this){try{q=q.parentNode}catch(r){q=this}}if(q==this){return false}var g=jQuery.extend({},r);var f=this;if(f.hoverIntent_t){f.hoverIntent_t=clearTimeout(f.hoverIntent_t)}if(r.type=="mouseover"){j=g.pageX;d=g.pageY;a(f).bind("mousemove",h);if(f.hoverIntent_s!=1){f.hoverIntent_t=setTimeout(function(){c(g,f)},n.interval)}}else{a(f).unbind("mousemove",h);if(f.hoverIntent_s==1){f.hoverIntent_t=setTimeout(function(){k(g,f)},n.timeout)}}};return this.mouseover(b).mouseout(b)}})(jQuery);(function(c){c.effects=c.effects||{};c.extend(c.effects,{save:function(g,h){for(var f=0;f<h.length;f++){if(h[f]!==null){c.data(g[0],"ec.storage."+h[f],g[0].style[h[f]])}}},restore:function(g,h){for(var f=0;f<h.length;f++){if(h[f]!==null){g.css(h[f],c.data(g[0],"ec.storage."+h[f]))}}},setMode:function(f,g){if(g=="toggle"){g=f.is(":hidden")?"show":"hide"
}return g},getBaseline:function(g,h){var j,f;switch(g[0]){case"top":j=0;break;case"middle":j=0.5;break;case"bottom":j=1;break;default:j=g[0]/h.height}switch(g[1]){case"left":f=0;break;case"center":f=0.5;break;case"right":f=1;break;default:f=g[1]/h.width}return{x:f,y:j}},createWrapper:function(g){if(g.parent().attr("id")=="fxWrapper"){return g}var f={width:g.outerWidth({margin:true}),height:g.outerHeight({margin:true}),"float":g.css("float")};g.wrap('<div id="fxWrapper" style="font-size:100%;background:transparent;border:none;margin:0;padding:0"></div>');var k=g.parent();if(g.css("position")=="static"){k.css({position:"relative"});g.css({position:"relative"})}else{var j=g.css("top");if(isNaN(parseInt(j))){j="auto"}var h=g.css("left");if(isNaN(parseInt(h))){h="auto"}k.css({position:g.css("position"),top:j,left:h,zIndex:g.css("z-index")}).show();g.css({position:"relative",top:0,left:0})}k.css(f);return k},removeWrapper:function(f){if(f.parent().attr("id")=="fxWrapper"){return f.parent().replaceWith(f)}return f},setTransition:function(g,h,f,j){j=j||{};
c.each(h,function(l,k){unit=g.cssUnit(k);if(unit[0]>0){j[k]=unit[0]*f+unit[1]}});return j},animateClass:function(h,j,l,k){var f=(typeof l=="function"?l:(k?k:null));var g=(typeof l=="object"?l:null);return this.each(function(){var r={};var p=c(this);var q=p.attr("style")||"";if(typeof q=="object"){q=q.cssText}if(h.toggle){p.hasClass(h.toggle)?h.remove=h.toggle:h.add=h.toggle}var m=c.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(h.add){p.addClass(h.add)}if(h.remove){p.removeClass(h.remove)}var o=c.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(h.add){p.removeClass(h.add)}if(h.remove){p.addClass(h.remove)}for(var t in o){if(typeof o[t]!="function"&&o[t]&&t.indexOf("Moz")==-1&&t.indexOf("length")==-1&&o[t]!=m[t]&&(t.match(/color/i)||(!t.match(/color/i)&&!isNaN(parseInt(o[t],10))))&&(m.position!="static"||(m.position=="static"&&!t.match(/left|top|bottom|right/)))){r[t]=o[t]}}p.animate(r,j,g,function(){if(typeof c(this).attr("style")=="object"){c(this).attr("style")["cssText"]="";
c(this).attr("style")["cssText"]=q}else{c(this).attr("style",q)}if(h.add){c(this).addClass(h.add)}if(h.remove){c(this).removeClass(h.remove)}if(f){f.apply(this,arguments)}})})}});c.fn.extend({_show:c.fn.show,_hide:c.fn.hide,__toggle:c.fn.toggle,_addClass:c.fn.addClass,_removeClass:c.fn.removeClass,_toggleClass:c.fn.toggleClass,effect:function(f,h,g,j){return c.effects[f]?c.effects[f].call(this,{method:f,options:h||{},duration:g,callback:j}):null},show:function(){if(!arguments[0]||(arguments[0].constructor==Number||/(slow|normal|fast)/.test(arguments[0]))){return this._show.apply(this,arguments)}else{var f=arguments[1]||{};f.mode="show";return this.effect.apply(this,[arguments[0],f,arguments[2]||f.duration,arguments[3]||f.callback])}},hide:function(){if(!arguments[0]||(arguments[0].constructor==Number||/(slow|normal|fast)/.test(arguments[0]))){return this._hide.apply(this,arguments)}else{var f=arguments[1]||{};f.mode="hide";return this.effect.apply(this,[arguments[0],f,arguments[2]||f.duration,arguments[3]||f.callback])
}},toggle:function(){if(!arguments[0]||(arguments[0].constructor==Number||/(slow|normal|fast)/.test(arguments[0]))||(arguments[0].constructor==Function)){return this.__toggle.apply(this,arguments)}else{var f=arguments[1]||{};f.mode="toggle";return this.effect.apply(this,[arguments[0],f,arguments[2]||f.duration,arguments[3]||f.callback])}},addClass:function(g,f,j,h){return f?c.effects.animateClass.apply(this,[{add:g},f,j,h]):this._addClass(g)},removeClass:function(g,f,j,h){return f?c.effects.animateClass.apply(this,[{remove:g},f,j,h]):this._removeClass(g)},toggleClass:function(g,f,j,h){return f?c.effects.animateClass.apply(this,[{toggle:g},f,j,h]):this._toggleClass(g)},morph:function(f,h,g,k,j){return c.effects.animateClass.apply(this,[{add:h,remove:f},g,k,j])},switchClass:function(){return this.morph.apply(this,arguments)},cssUnit:function(f){var g=this.css(f),h=[];c.each(["em","px","%","pt"],function(j,k){if(g.indexOf(k)>0){h=[parseFloat(g),k]}});return h}});jQuery.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(g,f){jQuery.fx.step[f]=function(h){if(h.state==0){h.start=d(h.elem,f);
h.end=b(h.end)}h.elem.style[f]="rgb("+[Math.max(Math.min(parseInt((h.pos*(h.end[0]-h.start[0]))+h.start[0]),255),0),Math.max(Math.min(parseInt((h.pos*(h.end[1]-h.start[1]))+h.start[1]),255),0),Math.max(Math.min(parseInt((h.pos*(h.end[2]-h.start[2]))+h.start[2]),255),0)].join(",")+")"}});function b(g){var f;if(g&&g.constructor==Array&&g.length==3){return g}if(f=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(g)){return[parseInt(f[1]),parseInt(f[2]),parseInt(f[3])]}if(f=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(g)){return[parseFloat(f[1])*2.55,parseFloat(f[2])*2.55,parseFloat(f[3])*2.55]}if(f=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(g)){return[parseInt(f[1],16),parseInt(f[2],16),parseInt(f[3],16)]}if(f=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(g)){return[parseInt(f[1]+f[1],16),parseInt(f[2]+f[2],16),parseInt(f[3]+f[3],16)]}if(f=/rgba\(0, 0, 0, 0\)/.exec(g)){return a.transparent}return a[jQuery.trim(g).toLowerCase()]
}function d(h,f){var g;do{g=jQuery.curCSS(h,f);if(g!=""&&g!="transparent"||jQuery.nodeName(h,"body")){break}f="backgroundColor"}while(h=h.parentNode);return b(g)}var a={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]};
jQuery.easing.jswing=jQuery.easing.swing;jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(g,h,f,k,j){return jQuery.easing[jQuery.easing.def](g,h,f,k,j)},easeInQuad:function(g,h,f,k,j){return k*(h/=j)*h+f},easeOutQuad:function(g,h,f,k,j){return -k*(h/=j)*(h-2)+f},easeInOutQuad:function(g,h,f,k,j){if((h/=j/2)<1){return k/2*h*h+f}return -k/2*((--h)*(h-2)-1)+f},easeInCubic:function(g,h,f,k,j){return k*(h/=j)*h*h+f},easeOutCubic:function(g,h,f,k,j){return k*((h=h/j-1)*h*h+1)+f},easeInOutCubic:function(g,h,f,k,j){if((h/=j/2)<1){return k/2*h*h*h+f}return k/2*((h-=2)*h*h+2)+f},easeInQuart:function(g,h,f,k,j){return k*(h/=j)*h*h*h+f},easeOutQuart:function(g,h,f,k,j){return -k*((h=h/j-1)*h*h*h-1)+f},easeInOutQuart:function(g,h,f,k,j){if((h/=j/2)<1){return k/2*h*h*h*h+f}return -k/2*((h-=2)*h*h*h-2)+f},easeInQuint:function(g,h,f,k,j){return k*(h/=j)*h*h*h*h+f},easeOutQuint:function(g,h,f,k,j){return k*((h=h/j-1)*h*h*h*h+1)+f},easeInOutQuint:function(g,h,f,k,j){if((h/=j/2)<1){return k/2*h*h*h*h*h+f}return k/2*((h-=2)*h*h*h*h+2)+f
},easeInSine:function(g,h,f,k,j){return -k*Math.cos(h/j*(Math.PI/2))+k+f},easeOutSine:function(g,h,f,k,j){return k*Math.sin(h/j*(Math.PI/2))+f},easeInOutSine:function(g,h,f,k,j){return -k/2*(Math.cos(Math.PI*h/j)-1)+f},easeInExpo:function(g,h,f,k,j){return(h==0)?f:k*Math.pow(2,10*(h/j-1))+f},easeOutExpo:function(g,h,f,k,j){return(h==j)?f+k:k*(-Math.pow(2,-10*h/j)+1)+f},easeInOutExpo:function(g,h,f,k,j){if(h==0){return f}if(h==j){return f+k}if((h/=j/2)<1){return k/2*Math.pow(2,10*(h-1))+f}return k/2*(-Math.pow(2,-10*--h)+2)+f},easeInCirc:function(g,h,f,k,j){return -k*(Math.sqrt(1-(h/=j)*h)-1)+f},easeOutCirc:function(g,h,f,k,j){return k*Math.sqrt(1-(h=h/j-1)*h)+f},easeInOutCirc:function(g,h,f,k,j){if((h/=j/2)<1){return -k/2*(Math.sqrt(1-h*h)-1)+f}return k/2*(Math.sqrt(1-(h-=2)*h)+1)+f},easeInElastic:function(g,j,f,n,m){var k=1.70158;var l=0;var h=n;if(j==0){return f}if((j/=m)==1){return f+n}if(!l){l=m*0.3}if(h<Math.abs(n)){h=n;var k=l/4}else{var k=l/(2*Math.PI)*Math.asin(n/h)}return -(h*Math.pow(2,10*(j-=1))*Math.sin((j*m-k)*(2*Math.PI)/l))+f
},easeOutElastic:function(g,j,f,n,m){var k=1.70158;var l=0;var h=n;if(j==0){return f}if((j/=m)==1){return f+n}if(!l){l=m*0.3}if(h<Math.abs(n)){h=n;var k=l/4}else{var k=l/(2*Math.PI)*Math.asin(n/h)}return h*Math.pow(2,-10*j)*Math.sin((j*m-k)*(2*Math.PI)/l)+n+f},easeInOutElastic:function(g,j,f,n,m){var k=1.70158;var l=0;var h=n;if(j==0){return f}if((j/=m/2)==2){return f+n}if(!l){l=m*(0.3*1.5)}if(h<Math.abs(n)){h=n;var k=l/4}else{var k=l/(2*Math.PI)*Math.asin(n/h)}if(j<1){return -0.5*(h*Math.pow(2,10*(j-=1))*Math.sin((j*m-k)*(2*Math.PI)/l))+f}return h*Math.pow(2,-10*(j-=1))*Math.sin((j*m-k)*(2*Math.PI)/l)*0.5+n+f},easeInBack:function(g,h,f,l,k,j){if(j==undefined){j=1.70158}return l*(h/=k)*h*((j+1)*h-j)+f},easeOutBack:function(g,h,f,l,k,j){if(j==undefined){j=1.70158}return l*((h=h/k-1)*h*((j+1)*h+j)+1)+f},easeInOutBack:function(g,h,f,l,k,j){if(j==undefined){j=1.70158}if((h/=k/2)<1){return l/2*(h*h*(((j*=(1.525))+1)*h-j))+f}return l/2*((h-=2)*h*(((j*=(1.525))+1)*h+j)+2)+f},easeInBounce:function(g,h,f,k,j){return k-jQuery.easing.easeOutBounce(g,j-h,0,k,j)+f
},easeOutBounce:function(g,h,f,k,j){if((h/=j)<(1/2.75)){return k*(7.5625*h*h)+f}else{if(h<(2/2.75)){return k*(7.5625*(h-=(1.5/2.75))*h+0.75)+f}else{if(h<(2.5/2.75)){return k*(7.5625*(h-=(2.25/2.75))*h+0.9375)+f}else{return k*(7.5625*(h-=(2.625/2.75))*h+0.984375)+f}}}},easeInOutBounce:function(g,h,f,k,j){if(h<j/2){return jQuery.easing.easeInBounce(g,h*2,0,k,j)*0.5+f}return jQuery.easing.easeOutBounce(g,h*2-j,0,k,j)*0.5+k*0.5+f}})})(jQuery);(function(a){a.effects.slide=function(b){return this.queue(function(){var f=a(this),d=["position","top","left"];var k=a.effects.setMode(f,b.options.mode||"show");var j=b.options.direction||"left";a.effects.save(f,d);f.show();a.effects.createWrapper(f).css({overflow:"hidden"});var g=(j=="up"||j=="down")?"top":"left";var c=(j=="up"||j=="left")?"pos":"neg";var l=b.options.distance||(g=="top"?f.outerHeight({margin:true}):f.outerWidth({margin:true}));if(k=="show"){f.css(g,c=="pos"?-l:l)}var h={};h[g]=(k=="show"?(c=="pos"?"+=":"-="):(c=="pos"?"-=":"+="))+l;f.animate(h,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){if(k=="hide"){f.hide()
}a.effects.restore(f,d);a.effects.removeWrapper(f);if(b.callback){b.callback.apply(this,arguments)}f.dequeue()}})})}})(jQuery);audi_ngw.namespace(audi_ngw,"vtp.leadw");function changeDiv(b,a){if(a){document.getElementById(b).style.display="block"}else{document.getElementById(b).style.display="none"}return true}function clearFields(a,b,c){document.getElementById(a).value="";document.getElementById(b).value="";document.getElementById(c).value=""}function clearHiddenField(a){document.getElementById(a).value=""}function checkBirthDateInput(){var d=document.wega1;var a;for(var c=0;c<d.elements.length;c++){if(d.elements[c].name=="User.BirthDate"){a=d.elements[c]}}var b="";if(d.YEAR.value.length>0){b=d.YEAR.value}if(d.MONTH.value.length>0){b+="-";if(d.MONTH.value.length==1){b+="0"}b+=d.MONTH.value}if(d.DAY.value.length>0){b+="-";if(d.DAY.value.length==1){b+="0"}b+=d.DAY.value}a.value=b}function checkDateInput(){var a="";if($("#yyyy").val().length>0){a=$("#yyyy").val()}if($("#mm").val().length>0){a+="-";if($("#mm").val().length==1){a+="0"
}a+=$("#mm").val()}if($("#dd").val().length>0){a+="-";if($("#dd").val().length==1){a+="0"}a+=$("#dd").val()}document.getElementById("QualificationData.TestdriveDesiredDate").value=a}function getAuswahl(b,a,c){$.ajax({url:"controller.do?act=lead&v="+b+"&sid="+a+"&QualificationData.CurrentVehicle.Vendor="+c,type:"GET",dataType:"xml",timeout:20000,error:function(g,f,d){$("#Model").children().remove();$("#Model").append('<option value="" selected="selected">keine Auswahl gefunden</option>')},success:function(d){var g=$("option",d);$("#Model").children().remove();$("#Model").append('<option value="" selected="selected">Bitte w&auml;hlen Sie</option>');for(var f=0;f<g.length;f++){$("#Model").append('<option value="'+g[f].attributes[0].firstChild.nodeValue+'">'+g[f].firstChild.nodeValue+"</option>")}}})}function htmlspecialchars(a){if(typeof(a)=="string"){a=a.replace(/"/g,"'")}return a}function toggleCheckStatus(){var a=$("#DataUseAgreementEmail");var c=$("#DataUseAgreementPhone");var b=$(".toggle_selector");if($("#DataUseAgreementPostal").attr("checked")){a.removeAttr("disabled");
c.removeAttr("disabled");b.removeClass("disable_text")}else{a.attr("disabled","disabled");a.attr("checked",false);c.attr("disabled","disabled");c.attr("checked",false);b.addClass("disable_text")}}audi_ngw.vtp.leadw.initialize=function(){this.__className="audi_ngw.vtp.leadw";this.__classVersion="1.1";$("#bid_forward01").click(function(){if($("form").hasClass("simpleAjax")){var b=$("form.simpleAjax").find("input[name=act]").val();var c=$("form.simpleAjax").find("input[name=v]").val();var d=$("form.simpleAjax").attr("name");var f=document.forms[d]}if(d=="wega3"&&!isDealerSearch){c="7"}if(d=="wega2"){f.act.value="transfer";if(isLeadRequest){f.v.value="1"}else{f.v.value="2"}}else{if(d=="wegads"){f.act.value="dsearch";f.v.value="2";f.targetModul.value="lead"}else{f.act.value=b;f.v.value=c}}if(d=="wega1"){f.cid.value=cid;var a=htmlspecialchars($("#company").val());$("#company").attr("value",a);if($("#StandardSenderBox")[0].checked){$("#street").val("");$("#street_number").val("")}else{$("#postbox").val("")}}$(f).submit();
return false});$("#bid_search01").click(function(){document.wegads.act.value="dsearch";document.wegads.v.value="0";document.wegads.search.value="Url_DS_Audi";$("form#wegads").submit();return false});$("#vtpid01,#bid_back01").click(function(){var a=$("form.simpleAjax").attr("name");var b=document.forms[a];b.act.value="lead";b.v.value=(a=="wega1")?"10":(a=="wega3")?"11":(a=="wegads")?"17":"13";$(b).submit();return false});$("#vtpid02,#bid_back02").click(function(){var a=$("form.simpleAjax").attr("name");var b=document.forms[a];b.act.value="lead";b.v.value=(a=="wega3")?"12":(a=="wegads")?"18":"14";$(b).submit();return false});$("#vtpid03, #bid_back03").click(function(){var a=$("form.simpleAjax").attr("name");var b=document.forms[a];b.act.value="lead";b.v.value=(a=="wega2")?((isDealerSearch)?"16":"15"):"19";$(b).submit();return false});$("#vtpid04").click(function(){document.wega2.act.value="lead";document.wega2.v.value="16";$("form#wega2").submit();return false});$("#StandardSenderAddr").click(function(){$("#DivAddress").show();
$("#DivPOBox").hide()});$("#StandardSenderBox").click(function(){$("#DivAddress").hide();$("#DivPOBox").show()});$("#Vendor").change(function(b){var a=$(b.target).attr("sid");var c=$("#Vendor").val();if(!c){$("#Model").children().remove()}else{getAuswahl("30",a,$("#Vendor").val())}return false});toggleCheckStatus();$("#DataUseAgreementPostal").click(function(){toggleCheckStatus()})};function switchModul(b,a){document.p.act.value="dsearch";document.p.v.value=b;document.p.targetModul.value=a;document.p.submit()}function searchDealer(a){document.p.act.value="dsearch";document.p.v.value="0";document.p.search.value=a;document.p.submit()}function connectLead(){document.p.v.value=17;document.p.act.value="lead";document.p.submit()}function calculate(a,b){getPreloader();calCounter=-1;document.p.calCounter.value=calCounter;document.p.act.value="finance";document.p.pId.value=a;document.p.pT.value=b;document.p.submit()}function calculateCredit(a,b){counter=document.p.calCounter.value;if(counter>1){s.pageName="audi/de/de2/search/details_page/financing/started";
s.prop1="audi/de/de2/search/used_cars_search/details_page/financing/started";s.prop2="financing";s.eVar2=s.prop2;s.prop20="action started";s.eVar20=s.prop20;void (s.t())}s.pageName="audi/de/de2/search/used_cars_search/details_page/finance/ended/";s.prop2="";s.eVar2=s.prop2;s.prop3="financing";s.eVar3=s.prop3;s.prop20="action completed";s.eVar20=s.prop20;s.prop1="audi/de/de2/search/details_page/finance/ended/";s.hier1=s.prop1;s.eVar1=s.prop1;s.events="event3";void (s.t());calculateRate(a,b)}function calculateLease(a,c){var b="";var f="";var d="";if(audi_ngw.vtp.statistic.trackOptions!=null){b=audi_ngw.vtp.statistic.trackOptions.prop1;f=audi_ngw.vtp.statistic.trackOptions.prop18;d=audi_ngw.vtp.statistic.trackOptions.prop19}counter=document.p.calCounter.value;if(counter>1){s.pageName="audi/de/de2/details_page/leasing/started/";s.prop1="audi/de/de2/new_cars_search/details_page/"+b+"/started";s.prop2="leasing";s.eVar2=s.prop2;s.prop18=f;s.eVar18=s.prop18;s.prop19=d;s.eVar19=s.prop19;s.prop20="action started";s.eVar20=s.prop20;
void (s.t())}s.pageName="audi/de/de2/details_page/leasing/ended/";s.prop2="";s.eVar2=s.prop2;s.prop3="leasing";s.eVar3=s.prop3;s.prop18=f;s.eVar18=s.prop18;s.prop19=d;s.eVar19=s.prop19;s.prop20="action completed";s.eVar20=s.prop20;s.prop1="audi/de/de2/"+b+"/details_page/leasing/ended/";s.hier1=s.prop1;s.eVar1=s.prop1;s.events="event3,event8";void (s.t());calculateRate(a,c)}function calculateRate(a,b){document.p.act.value="finance";document.p.pId.value=a;document.p.pT.value=b;document.p.scanFinParam.value="true";document.p.submit()}function recalculateRate(c,a,b){document.p.act.value="finance";document.p.pId.value=a;document.p.pT.value=b;document.p.scanFinParam.value="true";document.p.groupName.value=c;document.p.submit()}function editInsuranceGroup(c,a,b){document.p.act.value="finance";document.p.pId.value=a;document.p.pT.value=b;document.p.scanFinParam.value="true";document.p.groupName.value=c;document.p.submit()}function getLeasingConditions(){document.p.action+="#calculate";document.p.act.value="finance";document.p.pT.value="paramLease";
document.p.submit()}function setSelectedLeasingRate(a){document.p.action+="#calculate";document.p.act.value="finance";document.p.pId.value=a;document.p.pT.value="idLease";document.p.submit()}var vtpSliderInitialize=function(f){var a="#"+f.slider[0];if($(a).length<=0){return}var c="#"+f.slider[1];var b="#"+f.slider[2];var d=$(a).metadata();$(c).text((d.ixFrom<0)?"all":d.labelFrom+" "+d.txtFr[d.ixFrom]);$(b).text(d.labelTo+" "+d.txtTo[d.ixTo]);$(a).slider({range:true,min:0,max:d.txtTo.length-1,values:[d.ixFrom,d.ixTo],oldLeftValue:d.ixFrom,start:function(k,l){orgValueMin=l.values[0];orgValueMax=l.values[1];var g=$(a);var j;var h;if(a.lastIndexOf("_sa")!=-1){j=d.ixKListFr;h=d.ixKListTo}else{j=_copyValid(d.ixKListFr,g.slider("option","ixListFr"));h=_copyValid(d.ixKListTo,g.slider("option","ixListTo"))}ixListMax=_getMax(j);ixListMin=_getMin(h);txtMin=$(c);txtMax=$(b)},slide:function(g,j){var k=true;if(j.values[0]==j.values[1]){if(j.values[0]!=oldLeftValue){j.values[0]--}else{j.values[1]++}k=false}oldLeftValue=j.values[0];
if(j.values[0]>ixListMax){j.values[0]=ixListMax;k=false}else{txtMin.text(d.labelFrom+" "+d.txtFr[j.values[0]])}if(j.values[1]<ixListMin){j.values[1]=ixListMin;k=false}else{txtMax.text(d.labelTo+" "+d.txtTo[j.values[1]])}if(!k){var h=$(a+" .ui-slider-range");h.addClass("noslide");setTimeout(function(){h.removeClass("noslide")},2000)}return k},change:function(g,h){$(c).text(d.labelFrom+" "+d.txtFr[h.values[0]]);$(b).text(d.labelTo+" "+d.txtTo[h.values[1]])},stop:function(g,m){if(orgValueMin==m.values[0]&&orgValueMax==m.values[1]){return}var l=$(a);var j=m.values[0]==m.value;var q=m.value;var p=q;if(j&&q==0||!j&&q==(d.txtTo.length-1)){p=-1}if(p>=0){p="r"+p}var h=f.slider[j?1:2];if(f.slider[0].lastIndexOf("_sa")==-1){ajaxSearch(vtpUrl+"&tab="+h+"&idx="+p)}else{var o=((j)?d.listKeyFr[q]:d.listKeyTo[q]);for(var k=0;k<document.sa.length;k++){var n=document.sa[k];if(!n||!n.value){continue}if(n.name==h.substr(3)){if(j&&q==0||!j&&q==(d.txtTo.length-1)){o=-1}n.value=o;break}}}}})};var _copyValid=function(g,a){if(a==undefined){return g
}var d=new Array();for(var c in g){var f=g[c];d[c]=-1;for(var b=0;b<a.length;++b){if(f==a[b]){d[c]=f;break}}}return d};var _getMin=function(b){for(var a in b){if(b[a]!=-1){return a}}return b.length-1};var _getMax=function(b){for(var a=b.length-1;a>=0;--a){if(b[a]!=-1){return a}}return 0};
