Object.extend=function(A,C,B){for(var D in C){if(B==false&&A[D]!=null){continue
}A[D]=C[D]
}return A
};
var IwAG={Base:{}};
var globalDialog=null;
var marginLeft=null;
var marginTop=null;
var IsPrintSite=false;
var ModalBackButtonCounter=0;
var ModalDialogonOpenFunction=null;
var ModalDialogonShowFunction=null;
var ModalDialogOnCloseFunction=null;
if(typeof IWhost=="undefined"){IWhost=""
}if(typeof mid=="undefined"){mid=0
}jQuery.extend({hasURLParam:function(A,B){return($.getURLParam(A,B)!="")
},getURLParam:function(D,G){var F="";
var E=(D!=undefined&&D!=null)?D:window.location.href;
if(E.indexOf("?")>-1){var C=E.substr(E.indexOf("?")).toLowerCase();
var H=C.split("&");
for(var B=0;
B<H.length;
B++){var A=H[B].split("=");
if(A[0]==G){F=A[1];
break
}}}return F
}});
IwAG.Events={};
IwAG.Events.Authentication=(function(){var uniqueInstance;
function Authentication(){var $txtPassword=$("#txtPassword");
var $lbtnLogin=$("a[id$=lbtnLogin]");
if(typeof $lbtnLogin.get(0)=="undefined"){return 
}function Loggin_keydown(e){e=e||window.event;
var code=e.keyCode||e.which;
if(code==13){eval($lbtnLogin.attr("href").replace("javascript:",""))
}}$txtPassword.keydown(function(e){Loggin_keydown(e)
})
}return{getInstance:function(){if(!uniqueInstance){uniqueInstance=Authentication()
}return uniqueInstance
}}
})();
$(document).ready(function(){var backButton=new Array();
var resizeTimer=null;
$.fn.SetDefaultModalPopupFunctions=function(onOpen,onShow,onClose){ModalDialogonOpenFunction=(onOpen!=undefined&&onOpen!=null?onOpen:null);
ModalDialogonShowFunction=(onShow!=undefined&&onShow!=null?onShow:null);
ModalDialogOnCloseFunction=(onClose!=undefined&&onClose!=null?onClose:null)
};
$.fn.SetDefaultModalPopupCorners=function(ModalPopUpHeaderImage,mid,bgImageIsSet){var _bg="";
if(typeof ModalPopUpHeaderImage!="undefined"&&ModalPopUpHeaderImage!=null&&mid!=undefined&&mid!=null&&mid>0&&mid!=114&&mid!=115){_bg=ModalPopUpHeaderImage
}else{var _backgroundImage2="_Images/V3/layout_head/header_bg.gif";
if(typeof PopUpImageDomain!="undefined"&&PopUpImageDomain!=null){_bg=PopUpImageDomain+"/"+_backgroundImage2;
if(PopUpImageDomain.lastIndexOf("/")==PopUpImageDomain.length-1){_bg=PopUpImageDomain+_backgroundImage2
}}else{_bg=IWhost+"/"+_backgroundImage2;
if(IWhost.lastIndexOf("/")==IWhost.length-1){_bg=IWhost+_backgroundImage2
}}}var bgUrl="url("+_bg+")";
if(!bgImageIsSet){bgUrl=""
}jQuery.fn.corner=function(options){var settings={tl:{radius:10},tr:{radius:10},bl:{radius:10},br:{radius:10},backgroundImage2:bgUrl,antiAlias:true,autoPad:true,validTags:["div"]};
if(options&&typeof (options)!="string"){jQuery.extend(settings,options)
}return this.each(function(){new curvyObject(settings,this).applyCorners()
})
}
};
$.fn.SetDefaultModalPopupStyle=function(width,height,backgroundColor,cssDialog,backgroundImage,corners){var o=$(this);
var bgImageIsSet=true;
var ModalPopUpHeaderImage="_Images/V3/layout_head/header_small_long_{0}.gif";
if(typeof backgroundImage!="undefined"&&backgroundImage!=null&&backgroundImage!=""){if(backgroundImage.indexOf("/")==0){backgroundImage=backgroundImage.substring(1,backgroundImage.length)
}ModalPopUpHeaderImage=backgroundImage;
bgImageIsSet=backgroundImage!=" "
}if(typeof PopUpImageDomain!="undefined"&&PopUpImageDomain!=null){if(PopUpImageDomain.lastIndexOf("/")==PopUpImageDomain.length-1){ModalPopUpHeaderImage=PopUpImageDomain+ModalPopUpHeaderImage
}else{ModalPopUpHeaderImage=PopUpImageDomain+"/"+ModalPopUpHeaderImage
}}else{ModalPopUpHeaderImage=IWhost+ModalPopUpHeaderImage
}if(typeof mid!="undefined"&&mid!=null&&mid>0){ModalPopUpHeaderImage=ModalPopUpHeaderImage.replace("{0}",mid);
_backgroundImageMID=ModalPopUpHeaderImage
}else{ModalPopUpHeaderImage=ModalPopUpHeaderImage.replace("_{0}","")
}var bgUrl=" url("+ModalPopUpHeaderImage+") no-repeat";
if(!bgImageIsSet){bgUrl=""
}if(corners!=false){o.SetDefaultModalPopupCorners(ModalPopUpHeaderImage,mid,bgImageIsSet)
}if(backgroundColor==undefined){backgroundColor="#fff"
}if(width!=undefined){$(o).css("width",width+"px")
}if(height!=undefined){$(o).css("height",height+(height!="auto"?"px":""))
}$(o).css({margin:"0 0 1px -"+o.width()/2+"px",color:"#000000",background:backgroundColor+bgUrl,"border-right":"1px solid #000000","vertical-align":"top",display:"none","table-layout":"fixed","font-size":"11px"});
if(cssDialog!=undefined&&cssDialog!=null){$(o).css(cssDialog)
}};
$.fn.setTransparent=function(){return this.each(function(e){var div=$("<DIV />");
for(var n in this.attributes){if(this[n]!=""&&this[n]!=null){if(n.substr(0,2)=="on"){div.bind(n.substr(2),this[n])
}else{if(n!="src"){div.attr(n,this[n])
}}}}div.attr("style",this.style.cssText);
div.css({width:this.width+"px",height:this.height+"px",filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.src+"', sizingMethod='scale')"});
if(this.align=="left"){div.css("float","left")
}if(this.align=="right"){div.css("float","right")
}if(this.parentNode.href){div.css("cursor","hand")
}this.parentNode.replaceChild(div[0],this);
div.css({visibility:"visible"})
})
};
$.fn.ImageResize=function(options){var settings={height:200,width:300,validTags:["img"]};
if(options&&typeof (options)!="string"){jQuery.extend(settings,options)
}var img=$(this).get(0);
if(img==null||img==NaN){return 
}var height=$(this).height();
var width=$(this).width();
var ratio=width/height;
if(height>=settings.height&&height>=width){var factor=height/settings.height;
width=width/factor;
$(this).height(settings.height);
$(this).width(width)
}else{if(width>settings.width&&height<width){var factor=width/settings.width;
height=height/factor;
$(this).width(settings.width);
$(this).height(height)
}}$(this).show()
};
$.fn.MiddleImage=function(jContainer){var image=this.get(0);
if(jContainer!=null&&jContainer!=NaN&&image!=null&&image!=NaN){var containerHeight=parseInt(jContainer.css("height"));
var imageHeight=parseInt(this.css("height"));
var marginTop=(containerHeight-imageHeight)/2;
if(marginTop<=0){return 
}image.style.marginTop=marginTop+"px"
}$(this).show()
};
$.fn.tooltip=function(html,options){var defaults={background:"#444",color:"#f1f1f1",padding:"5px 0px",opacity:0.95,rounded:true};
if($.browser.msie){defaults.opacity=1
}var settings=$.extend({},defaults,options);
var showTooltip=function(text,top,left,width){$("#box_tooltip").remove();
$('<div id="box_tooltip" style="z-index: 3000;"><div class="box_tooltip_start"></div><div class="box_tooltip_body"></div><div class="box_tooltip_end"></div></div>').prependTo("body").hide().css({top:top+5,left:left+width+15});
$(".box_tooltip_body").html(text);
$("#box_tooltip").show()
};
var removeTooltip=function(){$("#box_tooltip").remove()
};
this.each(function(){var $this=$(this);
var title=this.title;
if($this.attr("title")!=""){this.title="";
$this.hover(function(e){var offset=$this.offset();
showTooltip(title,e.pageY,e.pageX,0)
},function(){removeTooltip()
});
$this.mousemove(function(e){$("#box_tooltip").css({top:e.pageY+5,left:e.pageX+15})
})
}});
return this
};
$(window).resize(function(){marginLeft=$(window).width()/2;
if(resizeTimer){clearTimeout(resizeTimer)
}resizeTimer=setTimeout(function(){},100);
if($(window).height()<600||$(window).width()<600){$("#ModalContainer").css("position","absolute")
}else{$("#ModalContainer").css("position","fixed")
}});
if($("#modalContent")!=undefined&&$("#modalContent")!=null){$("#modalContent").SetDefaultModalPopupStyle(10,10)
}Object.extend(IwAG.Base,{adjustHeight:function(body){body.height($(window).height()).height($(document).height())
},LoadPagePartsIntoModalContentPanel:function(Pageurl,PageStringStartIndex,PageStringEndIndex,panel,width,height,top){panel=(panel!=undefined&&panel!=null?panel:"#DataContentPopup");
if($.browser.msie&&$.browser.version=="6.0"){w2=window.open(Pageurl,"Window2","scrollbars=yes,height="+height+", width="+width+", left=0, top=0, toolbar=no,menubar=no")
}else{IwAG.Base.LoadPagePartsIntoPanel(Pageurl,(PageStringStartIndex!=undefined&&PageStringStartIndex!=null?PageStringStartIndex:"<!--Modal Start-->"),(PageStringEndIndex!=undefined&&PageStringEndIndex!=null?PageStringEndIndex:"<!--Modal Ende-->"),panel,width,height,top);
$("#modalContent").SetDefaultModalPopupFunctions(ModalDialogonOpenFunction!=null?ModalDialogonOpenFunction:null,ModalDialogonShowFunction!=null?ModalDialogonShowFunction:null,ModalDialogOnCloseFunction!=null?ModalDialogOnCloseFunction:null);
$("#modalContent").SetDefaultModalPopupStyle(width,height);
$(panel).after("<iframe id='_statsCounter' src='"+Pageurl+"' style='display:none;' />");
IwAG.Base.showModalDialog("#modalContent","#lbtnCloseModal","#img2",null,null,true)
}},LoadPagePartsIntoPanel:function(Pageurl,PageStringStartIndex,PageStringEndIndex,panel,width,height,top,RefreshContentInside){$(panel).html("");
var refreshContentInside=typeof RefreshContentInside!="undefined"&&RefreshContentInside!=null?RefreshContentInside:true;
$.post(Pageurl,function(data){if(width!=undefined&&height!=undefined&&top!=undefined){$("#modalContent").height(height+"px");
$("#modalContent").width(width+"px");
$("#ModalContainer").css("top",top);
$(panel).height(height-50+"px");
$(panel).width(width-20+"px");
$(panel).css("overflow","hidden")
}var start=data.indexOf(PageStringStartIndex);
var ende=data.indexOf(PageStringEndIndex);
var back="";
if(backButton!=null&&backButton.length<ModalBackButtonCounter+1){backButton[ModalBackButtonCounter]="<div id='pModalBack'><a href=\"javascript:ModalBackButtonCounter--;IwAG.Base.LoadPagePartsIntoPanel('"+Pageurl+"','"+PageStringStartIndex+"' ,'"+PageStringEndIndex+"','"+panel+"','"+width+"',' "+height+"', '"+top+'\');"  style="float:left;color:Black;text-decoration:none;" onMouseover="this.style.color=\'#FF6600\'" onMouseout="this.style.color=\'#000\'">&lt;&lt; <b>zur&uuml;ck</b> &gt;&gt;</a></div>'
}if(ModalBackButtonCounter==0){back=""
}else{back=backButton[ModalBackButtonCounter-1]
}$(panel).html("<div style='overflow:auto;height:"+(height-60)+"px;'>"+data.substring(start,ende)+"</div>");
$("#pModalBack").remove();
if(back!=""){$(panel).before(back)
}$(panel+" a").each(function(e){var href=$(this).attr("href");
if(refreshContentInside&&href!=undefined&&href.indexOf("javascript:")==-1&&href.length>5&&href.toLowerCase().indexOf(".pdf")==-1){$(this).click(function(){ModalBackButtonCounter++;
$("#_statsCounter").attr("src",href);
if($.hasURLParam(href,"width")&&$.hasURLParam(href,"height")&&$.hasURLParam(href,"top")){IwAG.Base.LoadPagePartsIntoPanel(href,PageStringStartIndex,PageStringEndIndex,panel,$.getURLParam(href,"width"),$.getURLParam(href,"height"),$.getURLParam(href,"top"),RefreshContentInside)
}else{IwAG.Base.LoadPagePartsIntoPanel(href,PageStringStartIndex,PageStringEndIndex,panel,width,height,top,RefreshContentInside)
}return false
})
}else{$("#_statsCounter").attr("src",Pageurl)
}})
})
},showModalDialog:function(dialog,closeBtn,closeIcon,cssDialog,cssOverlay,roundedCorners){globalDialog=dialog;
if(roundedCorners!=undefined&&roundedCorners){if(!(dialog=="#geoPopup"&&$.browser.msie&&$.browser.version=="6.0")){$(dialog).corner()
}}if($.browser.msie&&$.browser.version=="6.0"){if(cssDialog!=undefined){$("#ModalContainer").css(cssDialog)
}$(dialog).modal({overlayId:"ModalOverlay",containerId:"ModalContainer",onOpen:ModalDialogonOpenFunction!=null?function(){eval(ModalDialogonOpenFunction)
}:null,onShow:function(){IwAG.Base.SetModalFocus(closeBtn);
ModalDialogonShowFunction!=null?eval(ModalDialogonShowFunction):null
},onClose:ModalDialogOnCloseFunction!=null?function(){eval(ModalDialogOnCloseFunction)
}:null});
$("select:visible").addClass("hiddenByModal").hide();
$("object").hide();
$(dialog+" select").show();
$("#ModalOverlay").css("height",$(document).height()+"px");
$("#ModalOverlay").css("width",$(document).width()+"px");
$("#ModalOverlay").css("background","#000");
$("#ModalContainer").css("witdh",$(dialog).width()+"px");
$(dialog).css({marginLeft:"0px"})
}else{$("object").hide();
$(dialog).modal({close:true,overlayId:"ModalOverlay",containerId:"ModalContainer",persist:true,onOpen:ModalDialogonOpenFunction!=null?function(){eval(ModalDialogonOpenFunction)
}:null,onShow:function(){IwAG.Base.SetModalFocus(closeBtn);
ModalDialogonShowFunction!=null?eval(ModalDialogonShowFunction):null
},onClose:ModalDialogOnCloseFunction!=null?function(){eval(ModalDialogOnCloseFunction)
}:null});
if(cssOverlay!=undefined){$("#ModalOverlay").css(cssOverlay)
}else{$("#ModalOverlay").css({background:"#000",opacity:"0.7",cursor:"auto"})
}if(cssDialog!=undefined){$(dialog).css(cssDialog)
}if($(window).height()<600||$(window).width()<600){var offset=$(dialog).attr("offsetTop");
if($(window).height()>$(dialog).height()){marginTop=($(window).height()-$(dialog).height())/2
}else{marginTop=10
}marginLeft=$(window).width()/2;
$("#ModalContainer").css("position","absolute");
$("#ModalContainer").css("top",$(window).scrollTop()+marginTop-offset+"px");
$("#ModalContainer").css("left",$(window).scrollLeft()+marginLeft+"px")
}else{$("#ModalContainer").css("left","50%");
$("#ModalContainer").css("top","30%")
}}if(closeBtn!=undefined&&closeBtn!=null){$(closeBtn).click(function(e){IwAG.Base.CloseModalDialog();
return false
})
}if(closeIcon!=undefined&&closeIcon!=null){$(closeIcon).click(function(e){IwAG.Base.CloseModalDialog();
return false
})
}if(closeIcon!=undefined&&closeIcon!=null&&closeBtn!=undefined&&closeBtn!=null){$("#ModalOverlay").click(function(e){$(closeIcon).click()
})
}},SetModalFocus:function(element){$(element).focus()
},CloseModalDialog:function(){if($.browser.msie&&$.browser.version=="6.0"){$("select:hidden.hiddenByModal").removeClass("hiddenByModal").show()
}$("object").show();
ModalBackButtonCounter=0;
backButton=new Array();
if($("#_statsCounter")){$("#_statsCounter").remove()
}$.modal.close()
},initOverlayMessageBox:function(initButton,container){$(initButton).bind("click",function(){if($(container).is(":hidden")){$(container).show();
$(document).one("click",function(){$(container).hide()
})
}else{$(container).hide()
}return false
})
},parseACData:function(data){var parsed=[];
if(typeof data!="undefined"&&data!=null&&data.d!=""){var rows=jQuery.parseJSON(data.d);
if(rows!=null){for(var i=0;
i<rows.length;
i++){var row=rows[i];
if(row){parsed[parsed.length]={data:row,value:row.id,result:row.suggest+" "+row.annotation}
}}}}return parsed
},autoCompleteForLocation:function(inputBox,servicePath,listHeight,listWidth,autoSubmit,postBack,addParams){if(listHeight==undefined){listHeight=300
}if(listWidth==undefined){listWidth=200
}if(typeof servicePath!="undefined"&&servicePath!=""){var extraParams={};
if(typeof addParams!="undefined"&&addParams!=undefined){$.each(addParams,function(key,param){extraParams[key]=typeof param=="function"?param():param
})
}if(extraParams.GeoID==undefined||extraParams.GeoID==null){extraParams=$.extend(extraParams,{GeoID:"108"})
}if(extraParams.ValidOnly==undefined||extraParams.ValidOnly==null){extraParams=$.extend(extraParams,{ValidOnly:false})
}if(extraParams.PLZ==undefined||extraParams.PLZ==null){extraParams=$.extend(extraParams,{PLZ:null})
}$(inputBox).autocomplete(servicePath,{width:listWidth,max:150,highlight:false,scroll:true,highlight:false,selectFirst:false,scrollHeight:listHeight,cacheLength:0,delay:100,multiple:false,requestType:"POST",dataType:"json",contentType:"application/json; charset=utf-8",extraParams:extraParams,parse:function(data){return IwAG.Base.parseACData(data)
},formatItem:function(row){return row.suggest+" "+row.annotation
},formatResult:function(row){return row.suggest+" "+row.annotation
}});
$(inputBox).result(function(event,data,formatted){var hidden=$(this).parent().find(">:hidden");
if(data!=undefined&&data!=null){hidden.val(data.id)
}});
if(autoSubmit==true&&postBack!=undefined){$(inputBox).result(function(e){e=e||window.event;
var code=e.keyCode||e.which;
if(code==13){eval(postBack)
}return true
});
$(inputBox).keydown(function(e){e=e||window.event;
var code=e.keyCode||e.which;
if(code==13){$(inputBox).hideautocomplete();
eval(postBack)
}return true
})
}}return true
},serialize:function(o){var m={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},s={"boolean":function(x){return String(x)
},"null":function(x){return"null"
},number:function(x){return isFinite(x)?String(x):"null"
},string:function(x){if(/["\\\x00-\x1f]/.test(x)){x=x.replace(/([\x00-\x1f\\"])/g,function(a,b){var c=m[b];
if(c){return c
}c=b.charCodeAt();
return"\\u00"+Math.floor(c/16).toString(16)+(c%16).toString(16)
})
}return'"'+x+'"'
},array:function(x){var a=["["],b,f,i,l=x.length,v;
for(i=0;
i<l;
i+=1){v=x[i];
f=s[typeof v];
if(f){v=f(v);
if(typeof v=="string"){if(b){a[a.length]=","
}a[a.length]=v;
b=true
}}}a[a.length]="]";
return a.join("")
},object:function(x){if(x){if(x instanceof Array){return s.array(x)
}var a=["{"],b,f,i,v;
for(i in x){v=x[i];
f=s[typeof v];
if(f){v=f(v);
if(typeof v=="string"){if(b){a[a.length]=","
}a.push(s.string(i),":",v);
b=true
}}}a[a.length]="}";
return a.join("")
}return"null"
}};
return s.object(o)
},setAccordion:function(expandedIndex,iconExpand,iconCollapse){ddaccordion.init({headerclass:"accordionhead",contentclass:"accordionContent",revealtype:"click",collapseprev:true,defaultexpanded:[expandedIndex],onemustopen:true,animatedefault:false,persiststate:true,toggleclass:["",""],togglehtml:["suffix",iconExpand,iconCollapse],animatespeed:"fast",oninit:function(headers,expandedindices){},onopenclose:function(header,index,state,isuseractivated){}});
return false
}},true);
Object.extend(String,{Format:function(){var s=arguments[0];
for(var i=0;
i<arguments.length-1;
i++){var reg=new RegExp("\\{"+i+"\\}","gm");
s=s.replace(reg,arguments[i+1])
}return s
}})
});
function removeURLParam(D,E){var C="";
if(D.indexOf("?")>-1){var B=D.substr(D.indexOf("?"));
var F=B.split("&");
var G=new Array();
for(var A=0;
A<F.length;
A++){if(F[A].toLowerCase().indexOf(E.toLowerCase()+"=")<0){G.push(F[A])
}}C=G.join("&");
if(C.indexOf("?")<0){C="?"+C
}}return C
}function hookEvent(B,A,C){if(typeof (B)=="string"){B=document.getElementById(B)
}if(B==null){return 
}if(B.addEventListener){if(A=="mousewheel"){B.addEventListener("DOMMouseScroll",C,false)
}B.addEventListener(A,C,false)
}else{if(B.attachEvent){B.attachEvent("on"+A,C)
}}}function unhookEvent(B,A,C){if(typeof (B)=="string"){B=document.getElementById(B)
}if(B==null){return 
}if(B.removeEventListener){if(A=="mousewheel"){B.removeEventListener("DOMMouseScroll",C,false)
}B.removeEventListener(A,C,false)
}else{if(B.detachEvent){B.detachEvent("on"+A,C)
}}}function cancelEvent(A){A=A?A:window.event;
if(A.stopPropagation){A.stopPropagation()
}if(A.preventDefault){A.preventDefault()
}A.cancelBubble=true;
A.cancel=true;
A.returnValue=false;
return false
};