(function(b){var a=1801;b.fn.dropShadow=function(d){var e=b.extend({left:4,top:4,blur:2,opacity:0.5,color:"black",swap:false},d);var f=b([]);this.not(".dropShadow").each(function(){var t=b(this);var o=[];var h=(e.blur<=0)?0:e.blur;var r=(h==0)?e.opacity:e.opacity/(h*8);var u=(e.swap)?a:a+1;var g=(e.swap)?a+1:a;var v;if(this.id){v=this.id+"_dropShadow"}else{v="ds"+(1+Math.floor(9999*Math.random()))}b.data(this,"shadowId",v);b.data(this,"shadowOptions",d);t.attr("shadowId",v).css("zIndex",u);if(t.css("position")!="absolute"){t.css({position:"relative",zoom:1})}bgColor=t.css("backgroundColor");if(bgColor=="rgba(0, 0, 0, 0)"){bgColor="transparent"}if(bgColor!="transparent"||t.css("backgroundImage")!="none"||this.nodeName=="SELECT"||this.nodeName=="INPUT"||this.nodeName=="TEXTAREA"){o[0]=b("<div></div>").css("background",e.color)}else{o[0]=t.clone().removeAttr("id").removeAttr("name").removeAttr("shadowId").css("color",e.color)}o[0].addClass("dropShadow").css({height:t.outerHeight(),left:h,opacity:r,position:"absolute",top:h,width:t.outerWidth(),zIndex:g});var q=(8*h)+1;for(p=1;p<q;p++){o[p]=o[0].clone()}var p=1;var n=h;while(n>0){o[p].css({left:n*2,top:0});o[p+1].css({left:n*4,top:n*2});o[p+2].css({left:n*2,top:n*4});o[p+3].css({left:0,top:n*2});o[p+4].css({left:n*3,top:n});o[p+5].css({left:n*3,top:n*3});o[p+6].css({left:n,top:n*3});o[p+7].css({left:n,top:n});p+=8;n--}var l=b("<div></div>").attr("id",v).addClass("dropShadow").css({left:e.left-h,marginTop:t.css("marginTop"),marginRight:t.css("marginRight"),marginBottom:t.css("marginBottom"),marginLeft:t.css("marginLeft"),position:"absolute",top:e.top-h,zIndex:g,display:"none"});for(p=0;p<q;p++){l.append(o[p])}t.after(l);l.fadeIn(100);f=f.add(l);b(window).resize(function(){try{l.css({left:e.left-h,top:e.top-h})}catch(w){}});a+=2});return this.pushStack(f)};b.fn.redrawShadow=function(){this.removeShadow();return this.each(function(){var d=b.data(this,"shadowOptions");b(this).dropShadow(d)})};b.fn.removeShadow=function(){return this.each(function(){var d=b(this).shadowId();b("div#"+d).fadeOut(100)})};b.fn.shadowId=function(){return b.data(this[0],"shadowId")};b(function(){var d="<style type='text/css' media='print'>";d+=".dropShadow{visibility:hidden;}</style>";b("head").append(d)})})(jQuery);var APP_EXTENSION=".html";var FACTSHEET_URL=DAB_MARKETS_BASE_URL+"/kursdetails/{idInstrument}_"+APP_EXTENSION;var MULTI_ASSET_SEARCH_URL=DAB_MARKETS_BASE_URL+"/schnellsuche"+APP_EXTENSION;var IMG_PATH=DAB_MARKETS_BASE_URL+"/img";var aFactsheetUrl=new Array();aFactsheetUrl.FTL=DAB_PORTAL_BASE_URL+"/maerkte-kurse/aktien-suche/allgemeines_kurssuchergebnis.app.html?swptyp=STK&spring=search&searchfor=";aFactsheetUrl.MDG=FACTSHEET_URL;var multiAssetSearchUrl=MULTI_ASSET_SEARCH_URL;function hideBackground(){jQuery("#navLevel1Container").css("zIndex","-1");jQuery("#bd").css("zIndex","-1")}function showBackground(){jQuery("#navLevel1Container").css("zIndex","100");jQuery("#bd").css("zIndex","100");showSelectBoxes()}function showAutosuggester(){hideBackground();jQuery("#IDMS_autocomplete_choices_dropShadow").show();jQuery("#IDMS_autocomplete_choices").show()}function hideAutosuggester(){showBackground();jQuery("#IDMS_autocomplete_choices_dropShadow").hide();jQuery("#IDMS_autocomplete_choices").hide()}function onShowSuggester(){hideSelectBoxes();hideBackground()}function onHideSuggester(){showSelectBoxes();showBackground()}function showSelectBoxes(){if(jQuery.browser.msie&&jQuery.browser.version<7){jQuery("#idCategory").css("visibility","visible")}}function hideSelectBoxes(){if(jQuery.browser.msie&&jQuery.browser.version<7){jQuery("#idCategory").css("visibility","hidden")}}function SuggestCallback(a){var b=jQuery("input#IDMS_autocomplete").val();var d;if(a.TOOL=="IND"||a.TOOL=="COM"||a.TOOL=="MET"||a.TOOL=="FUT"||a.TOOL=="CUR"){d=aFactsheetUrl.MDG.replace("{idInstrument}",a.ID_NOTATION)}else{if(a.TOOL=="DAB"){d=a.ISIN+"&searchValue="+b}else{d=aFactsheetUrl.FTL+a.ISIN}}var e=DAB_MARKETS_BASE_URL+"/redirect/redirect.action?redirectUrl="+escape(d)+"&searchValue="+b;location.href=e}var aToolTranslate=new Array();aToolTranslate.STO="stocks";aToolTranslate.FUN="funds";aToolTranslate.IND="indices";aToolTranslate.BON="bonds";aToolTranslate.CUR="others";aToolTranslate.COM="others";aToolTranslate.MET="others";aToolTranslate.FUT="others";aToolTranslate.DAB="cq";function SuggestCategoryCallback(a,b){location.href=multiAssetSearchUrl+"?tool="+aToolTranslate[a]+"&searchValue="+b}function Set_Cookie(d,f,a,l,e,h){var b=new Date();b.setTime(b.getTime());if(a){a=a*1000*60*60*24}var g=new Date(b.getTime()+(a));document.cookie=d+"="+escape(f)+((a)?";expires="+g.toGMTString():"")+((l)?";path="+l:"")+((e)?";domain="+e:"")+((h)?";secure":"")}function Get_Cookie(d){var e=document.cookie.indexOf(d+"=");var a=e+d.length+1;if((!e)&&(d!=document.cookie.substring(0,d.length))){return null}if(e==-1){return null}var b=document.cookie.indexOf(";",a);if(b==-1){b=document.cookie.length}return unescape(document.cookie.substring(a,b))}function Delete_Cookie(a,d,b){document.cookie=a+"="+((d)?";path="+d:"")+((b)?";domain="+b:"")+";expires=Thu, 01-Jan-1970 00:00:01 GMT"}function IDMS_ajax_snippet(a,d,b,e){if(jQuery("#"+d)){Scheduler.ajaxSnippet(a,d,b,e)}}var SchedulerClass={Version:"1.0",initialize:function(){this.aInterval=new Array();this.aIntervalId=new Array();this.sInterval=0;jQuery(window).scroll(function(){Scheduler.scheduleManual()});jQuery(window).resize(function(){Scheduler.scheduleManual()})},scheduleManual:function(){Scheduler.sInterval+=1;for(i=0;i<this.aIntervalId.length;i++){eval(this.aInterval[this.aIntervalId[i]]["ACTION"])}},switchToManuelMode:function(d,b,a){if(this.aInterval[d]["INTERVAL"]!="ad_server"){clearInterval(this.aInterval[d]["INTERVAL"]);Scheduler.unsubscribe(d);Scheduler.subscribe(d,b,a)}},ajaxSnippet:function(n,f,l,e){var g=/^IDMS_[a-zA-Z_]*(_[0-9])$/;var d=f.match(g);n+=(d)?"&AJAX_TARGET_NR="+d[1]:"";if(jQuery("#"+f+"_loading")){jQuery(f+"_loading").show()}var h=(f==undefined)?"":(Scheduler.skipIdSuffix(f).replace("IDMS","ajax"))+".html";var b=(e==undefined)?h:e+h;var e=(e==undefined)?"":e;$aRequestAsPost="get";if(l=="submit"){if(this.aInterval[f]==undefined){subscribe(f,l,"");Scheduler.incrSubscriptionCount(f);if(jQuery("#IDMS_save")){IDMS_UpdateMyFtdDataArray(f,jQuery("#"+f+"_form").serialize())}jQuery("#"+f+"_form").request({parameters:n,onComplete:function(p){jQuery("#"+f).html(p.responseText);Scheduler.unsubscribe(f);Scheduler.ajaxSnippetCallback(f)}})}}else{if(l=="load"){if(this.aInterval[f]==undefined){this.subscribe(f,l,"");this.incrSubscriptionCount(f);if(jQuery("#IDMS_save")){IDMS_UpdateMyFtdDataArray(f,n)}var a=new Ajax.Request(b,{method:$sMethod,parameters:n,onComplete:function(p){jQuery("#"+f).html(p.responseText);this.unsubscribe(f);this.ajaxSnippetCallback(f)}})}}else{if(l=="load_all"){var o=new RegExp("IDMS","i");for(i=0;i<this.aIntervalId.length;i++){if(this.aIntervalId[i].match(o)){this.aInterval[this.aIntervalId[i]]["ENFORCE_LOADING"]=true}}}else{if(l=="load_smart"){if(this.aInterval[f]==undefined){this.subscribe(f,l,'this.ajaxSnippet("'+n+'","'+f+'","'+l+'","'+e+'")')}if(this.aInterval[f]["ACTIVE"]){this.incrSubscriptionCount(f);if(this.visiblePosition(f)||this.aInterval[f]["ENFORCE_LOADING"]){this.aInterval[f]["ACTIVE"]=false;var a=new Ajax.Request(b,{method:"get",parameters:n,onComplete:function(p){jQuery("#"+f).html(p.responseText);this.unsubscribe(f);this.ajaxSnippetCallback(f)}})}}}}}}},subscribe:function(d,b,a){this.aIntervalId.push(d);this.aInterval[d]=new Array();this.aInterval[d]["ENFORCE_LOADING"]=false;this.aInterval[d]["ACTIVE"]=true;this.aInterval[d]["ID"]=d;this.aInterval[d]["AJAX_COMPLETE"]=false;this.aInterval[d]["INTERVAL"]=b;this.aInterval[d]["ACTION"]=a;this.aInterval[d]["COUNT"]=0},incrSubscriptionCount:function(a){this.aInterval[a]["COUNT"]++},getSubscriptionCount:function(a){return this.aInterval[a]["COUNT"]},unsubscribe:function(a){this.aInterval[a]["AJAX_COMPLETE"]=true;this.aIntervalId=jQuery.grep(this.aIntervalId,function(b){return b!=a});delete this.aInterval[a]},ajaxSnippetCallback:function(sId){var iCountScriptSections=document.getElementById(sId).getElementsByTagName("script").length;for(i=0;i<iCountScriptSections;i++){eval(document.getElementById(sId).getElementsByTagName("script")[i].html())}},skipIdSuffix:function(b){var d=/^IDMS_[a-zA-Z_]*(_[0-9])$/;var a=b.match(d);return(a)?(b.replace(a[1],"")):b},visiblePosition:function(a){return(Position.page(jQuery("#"+a))[1]<=this.getWindowHeight()&&Position.page(jQuery("#"+a))[1]>=0)},numsort:function(e,d){return d-e},getWindowHeight:function(){var a=new Array(document.body.clientHeight,document.documentElement.clientHeight,window.innerHeight);a.compact();aHeight=a.sort(this.numsort);return aHeight[0]},printAll:function(){var d="PRINT_ALL";this.scheduleManual();if(this.aInterval[d]==undefined){this.aIntervalId.push(d);this.aInterval[d]=new Array();this.aInterval[d]["INTERVAL"]=setInterval('this.printAll("'+d+'")',100);this.aInterval[d]["ACTION"]="";this.aInterval[d]["ACTIVE"]=true;this.aInterval[d]["ID"]=d;this.aInterval[d]["AJAX_COMPLETE"]=true;this.aInterval[d]["COUNT"]=0;jQuery("#"+d).src="/images/print_ani.gif";this.ajaxSnippet("","","load_all","")}this.incrSubscriptionCount(d);var a=new RegExp("IDMS","i");var b=this.aIntervalId.join(" ");if(!(b.match(a))){clearInterval(this.aInterval[d]["INTERVAL"]);this.unsubscribe(d);jQuery("#"+d).src="/images/print.gif";print()}},monitorStart:function(){if(!(jQuery("#IDMS_debug"))){var b=Builder.node("div",{id:"IDMS_debug",style:"display: none;"},"&nbsp;");var a=document.getElementsByTagName("body").item(0);a.appendChild(b)}sInterval=0;IntervalDebug=window.setInterval("Scheduler.monitorShow()",250);jQuery("#IDMS_debug").show()},monitorStop:function(){clearInterval(IntervalDebug);jQuery("#IDMS_debug").hide()},monitorShow:function(){var a;var b="font-size:10px;border:solid red 2px; position:fixed;top:130px;right:10px;z-index:1000; background-color:white;color:black";a='<table style="'+b+'" cellspacing="0" cellpadding="0" border="1">';a+="<tr>";a+='<td colspan="6" style="font-size:12px;text-align:center"><b>Scheduler Monitor&nbsp;</b><span style="font-size:10px">('+this.sInterval+" intervals)</span></td>";a+="</tr>";a+="<tr>";a+='<th width="170">Target Id</th>';a+='<th width="40">Y-Pos.<br>Target</th>';a+='<th width="60">Action</th>';a+='<th width="30">Attempts <br>to load</th>';a+='<th width="30">Activ</th>';a+='<th width="30">Ajax<br>done</th>';a+="</tr>";for(i=0;i<this.aIntervalId.length;i++){sId=this.aIntervalId[i];yOffset=(jQuery("#"+sId)).offset().top;jQuery("#"+sId).css("visibility","hidden");jQuery("#"+sId).show();jQuery("#"+sId).css("visibility","visible");yPosition=(jQuery("#"+sId)).offset().top;yPosTarget=yPosition-yOffset;a+="<tr>";a+="<td>&nbsp;"+this.aIntervalId[i]+"</td>";a+='<td align="center">'+yPosTarget+"</td>";a+='<td align="center">'+this.aInterval[sId]["INTERVAL"]+"</td>";a+='<td align="center">'+this.aInterval[sId]["COUNT"]+"</td>";a+=(this.aInterval[sId]["ACTIVE"])?'<td align="center" style="background-color:lightgreen">'+this.aInterval[sId]["ACTIVE"]+"</td>":'<td align="center" style="background-color:red">'+this.aInterval[sId]["ACTIVE"]+"</td>";a+=(this.aInterval[sId]["AJAX_COMPLETE"])?'<td align="center" style="background-color:lightgreen">'+this.aInterval[sId]["AJAX_COMPLETE"]+"</td>":'<td align="center" style="background-color:red">'+this.aInterval[sId]["AJAX_COMPLETE"]+"</td>";a+="</tr>"}a+="</table>";jQuery("#IDMS_debug").html(a)}};var Scheduler=SchedulerClass;Scheduler.initialize();c=new Array();c.AF="Afghanistan";c.EG="&Auml;gypten";c.AL="Albanien";c.DZ="Algerien";c.VI="Amerik. Jungferninseln";c.AS="Amerikanisch-Samoa";c.AD="Andorra";c.AO="Angola";c.AI="Anguilla";c.AG="Antigua und Barbuda";c.GQ="&Auml;quatorialguinea";c.AR="Argentinien";c.AM="Armenien";c.AW="Aruba";c.AZ="Aserbaidschan";c.ET="&Auml;thiopien";c.AU="Australien";c.BS="Bahamas";c.BH="Bahrain";c.BD="Bangladesch";c.BB="Barbados";c.BE="Belgien";c.BZ="Belize";c.BJ="Benin";c.BM="Bermuda";c.BT="Bhutan";c.BO="Bolivien";c.BA="Bosnien und Herzegowina";c.BW="Botsuana";c.BR="Brasilien";c.VG="Britische Jungferninseln";c.BN="Brunei";c.BG="Bulgarien";c.BF="Burkina Faso";c.BI="Burundi";c.CL="Chile";c.CN="China";c.CR="Costa Rica";c.DK="D&auml;nemark";c.DE="Deutschland";c.DM="Dominica";c.DO="Dominikanische Republik";c.DJ="Dschibuti";c.EC="Ecuador";c.SV="El Salvador";c.CI="Elfenbeink&uuml;ste";c.ER="Eritrea";c.EE="Estland";c.FO="Faroer";c.FJ="Fidschi";c.FI="Finnland";c.FR="Frankreich";c.GF="Franz&ouml;sisch-Guayana";c.PF="Franz&ouml;sisch-Polynesien";c.GA="Gabun";c.GM="Gambia";c.GE="Georgien";c.GH="Ghana";c.GI="Gibraltar";c.GD="Grenada";c.GR="Griechenland";c.GL="Gr&ouml;nland";c.GB="Gro&szlig;britannien";c.GP="Guadeloupe";c.GU="Guam";c.GT="Guatemala";c.GG="Guernsey";c.GN="Guinea";c.GW="Guinea-Bissau";c.GY="Guyana";c.HT="Haiti";c.HN="Honduras";c.HK="Hong Kong";c.IN="Indien";c.ID="Indonesien";c.IQ="Irak";c.IR="Iran";c.IE="Irland";c.IS="Island";c.IM="Isle of man";c.IL="Israel";c.IT="Italien";c.JM="Jamaika";c.JP="Japan";c.YE="Jemen";c.JE="Jersey";c.JO="Jordanien";c.YU="Jugoslawien, F&ouml;derative Republik";c.KY="Kaiman Inseln";c.KH="Kambodscha";c.CM="Kamerun";c.CA="Kanada";c.CV="Kap Verde";c.KZ="Kasachstan";c.QA="Katar";c.KE="Kenia";c.KG="Kirgisistan";c.KI="Kiribati";c.CO="Kolumbien";c.KM="Komoren";c.CD="Kongo, Dem. Republik";c.CG="Kongo, Republik";c.HR="Kroatien";c.CU="Kuba";c.KW="Kuwait";c.LA="Laos";c.LS="Lesotho";c.LV="Lettland";c.LB="Libanon";c.LR="Liberia";c.LY="Libyen";c.LI="Liechtenstein";c.LT="Litauen";c.LU="Luxemburg";c.MO="Macao";c.MG="Madagaskar";c.MW="Malawi";c.MY="Malaysia";c.MV="Malediven";c.ML="Mali";c.MT="Malta";c.MP="Mariannen";c.MA="Marokko";c.MH="Marshallinseln";c.MQ="Martinique";c.MR="Mauretanien";c.MU="Mauritius";c.YT="Mayotte";c.MK="Mazedonien";c.MX="Mexiko";c.FM="Mikronesien";c.MD="Moldavien";c.MC="Monaco";c.MN="Mongolei";c.ME="Montenegro";c.MZ="Mosambik";c.MM="Myanmar";c.NA="Namibia";c.NP="Nepal";c.NC="Neukaledonien";c.NZ="Neuseeland";c.NI="Nicaragua";c.NL="Niederlande";c.NE="Niger";c.NG="Nigeria";c.AN="NL-Antillen";c.KP="Nordkorea";c.NO="Norwegen";c.OM="Oman";c.TL="Ost Timor";c.AT="&Ouml;sterreich";c.PK="Pakistan";c.PW="Palau";c.PA="Panama";c.PG="Papua Neuguinea";c.PY="Paraguay";c.PE="Peru";c.PH="Philippinen";c.PL="Polen";c.PT="Portugal";c.PR="Puerto Rico";c.RE="R&eacute;union";c.RW="Ruanda";c.RO="Rum&auml;nien";c.RU="Russland";c.EH="Sahara Arabische Republik";c.SB="Salomonen";c.ZM="Sambia";c.WS="Samoa";c.SM="San Marino";c.ST="S&atilde;o Tom&eacute; und Pr&iacute;ncipe";c.SA="Saudi-Arabien";c.SE="Schweden";c.CH="Schweiz";c.SN="Senegal";c.RS="Serbien";c.CS="Serbien und Montenegro";c.SC="Seychellen";c.SL="Sierra Leone";c.ZW="Simbabwe";c.SG="Singapur";c.SK="Slowakische Republik";c.SI="Slowenien";c.SO="Somalia";c.ES="Spanien";c.LK="Sri Lanka";c.KN="St. Kitts und Nevis";c.LC="St. Lucia";c.VC="St. Vincent / Grenadinen";c.ZA="S&uuml;dafrika";c.SD="Sudan";c.KR="S&uuml;dkorea";c.SR="Surinam";c.SZ="Swasiland";c.SY="Syrien";c.TJ="Tadschikistan";c.TW="Taiwan";c.TZ="Tansania";c.TH="Thailand";c.TG="Togo";c.TO="Tonga";c.TT="Trinidad und Tobago";c.TD="Tschad";c.CZ="Tschechische Republik";c.TN="Tunesien";c.TR="T&uuml;rkei";c.TM="Turkmenistan";c.TV="Tuvalu";c.UG="Uganda";c.UA="Ukraine";c.HU="Ungarn";c.UY="Uruguay";c.US="USA";c.UZ="Usbekistan";c.VU="Vanuatu";c.VE="Venezuela";c.AE="Ver. Arabische Emirate";c.VN="Vietnam";c.BY="Weissrussland";c.WG="West Bank und Gaza";c.CF="Zentralafrik. Rep.";c.CY="Zypern";c.EU="Europa";var aReturnNameFields=new Array("NAME","ID_NOTATION","ISIN");var aSearchNameFields=new Array("NAME","ISIN");if(s=="undefined"||s==null){var s=new Array()}if(s.STO==null){s.STO=new Array()}if(s.BON==null){s.BON=new Array()}if(s.FUN==null){s.FUN=new Array()}if(s.IND==null){s.IND=new Array()}if(s.COM==null){s.COM=new Array()}if(s.MET==null){s.MET=new Array()}if(s.CUR==null){s.CUR=new Array()}if(s.FUT==null){s.FUT=new Array()}if(s.BON==null){s.BON=new Array()}if(s.DAB==null){s.DAB=new Array()}var aToolName=new Array();aToolName.STO="Aktien";aToolName.IND="Indizes";aToolName.FUN="Fonds";aToolName.CUR="W\u00E4hrungen";aToolName.MET="Edelmetall";aToolName.COM="Rohstoffe";aToolName.FUT="Futures";aToolName.BON="Anleihen";aToolName.DAB="DAB";var aTools=new Array("STO","IND","FUN","CUR","MET","COM","FUT","BON","DAB");var aToolMatches=new Array();aToolMatches.STO=5;aToolMatches.IND=5;aToolMatches.FUN=5;aToolMatches.CUR=5;aToolMatches.MET=5;aToolMatches.COM=5;aToolMatches.FUT=5;aToolMatches.BON=5;aToolMatches.DAB=5;var isShadowEffectEnabled=true;var aNameFieldsPosition=new Array();for(i=0;i<aReturnNameFields.length;i++){aNameFieldsPosition[aReturnNameFields[i]]=0}function internalCallback(d){var e=new Array();e[0]="TOOL";for(m=0;m<aReturnNameFields.length;m++){e[m+1]=aReturnNameFields[m]}var b=d.split("|||");var a=new Array(e);for(i=0;i<e.length;i++){a[e[i]]=b[i]}SuggestCallback(a)}function Suggester(d,b,a){jQuery("#"+d).autocomplete(b,a,"")}(function(jQuery){jQuery.fn.extend({autocomplete:function(IdSuggestList,UrlSuggest,options){options=jQuery.extend({},jQuery.Autocompleter.defaults,{url:UrlSuggest});return this.each(function(){new jQuery.Autocompleter(this,options)})}});jQuery.Autocompleter=function(input,options){var KEY={UP:38,DOWN:40,DEL:46,TAB:9,RETURN:13,ESC:27,COMMA:188,PAGEUP:33,PAGEDOWN:34,BACKSPACE:8};var timeout;var lastKeyPressCode;var blockSubmit;var previousValue="";var hasFocus=0;var config={mouseDownOnSelect:false};var $input=jQuery(input).attr("autocomplete","off");var select=jQuery.Autocompleter.Select(options,input,selectCurrent,config);var element=jQuery("#IDMS_autocomplete_choices").css("position","absolute").css("display","none");jQuery.browser.opera&&jQuery(input.form).bind("submit.autocomplete",function(){if(blockSubmit){blockSubmit=false;return false}});$input.bind((jQuery.browser.opera?"keypress":"keydown")+".autocomplete",function(event){lastKeyPressCode=event.keyCode;switch(event.keyCode){case KEY.UP:case KEY.DOWN:case KEY.PAGEUP:case KEY.PAGEDOWN:case KEY.TAB:case KEY.RETURN:break;case KEY.ESC:hideResultsNow();select.hide();break;default:clearTimeout(timeout);timeout=setTimeout(onChange,options.delay);break}}).focus(function(){hasFocus++}).click(function(){onChange("click",true)}).blur(function(){hasFocus=0;if(!config.mouseDownOnSelect){hideResults()}});function selectCurrent(){var selected=select.selected();if(!selected){return false}var v=selected.result;previousValue=v;hideResultsNow();$input.trigger("result",[selected.data,selected.value]);return true}function updateChoices(choices){if(choices.match("<li>")){onShowSuggester();jQuery("#IDMS_autocomplete_choices").html(choices);if(isShadowEffectEnabled){jQuery("#IDMS_autocomplete_choices").fadeIn("fast");jQuery("#IDMS_autocomplete_choices").redrawShadow({left:590,top:50,blur:1,color:"light-grey"})}else{jQuery("#IDMS_autocomplete_choices").show()}var offset=$input.offset();var topFix=20}else{if(isShadowEffectEnabled){jQuery("#IDMS_autocomplete_choices").removeShadow();jQuery("#IDMS_autocomplete_choices").fadeOut("fast")}else{jQuery("#IDMS_autocomplete_choices").hide()}}}function onChange(crap,skipPrevCheck){if(input.value.length==0){hideResultsNow()}if(lastKeyPressCode==KEY.DEL){select.hide();return}var currentValue=$input.val();if(!skipPrevCheck&&currentValue==previousValue){return}previousValue=currentValue;if(currentValue.length>=options.minChars){getUpdatedChoices()}else{select.hide()}}function hideResults(){clearTimeout(timeout);timeout=setTimeout(hideResultsNow,200)}function hideResultsNow(){onHideSuggester();$input.val("");if(isShadowEffectEnabled){jQuery("#IDMS_autocomplete_choices").fadeOut("fast");jQuery("#IDMS_autocomplete_choices").removeShadow()}else{jQuery("#IDMS_autocomplete_choices").hide()}var wasVisible=select.visible();select.hide();clearTimeout(timeout);if(options.mustMatch){$input.search(function(result){if(!result){$input.val("")}})}if(wasVisible){jQuery.Autocompleter.Selection(input,input.value.length,input.value.length)}}function buildSuggestList(aInput){var d=new Array();for(i=0;i<aTools.length;i++){d[aTools[i]]=new Array()}if(!(aInput==undefined)){eval(aInput)}var aInstrument=new Array();for(i=0;i<aTools.length;i++){aInstrument[aTools[i]]=new Array();for(j=0;j<aReturnNameFields.length;j++){aInstrument[aTools[i]][aReturnNameFields[j]]=new Array()}}var aToolMatchesFound=new Array();var iLinkNumber=0;var sSearchValue=($input.val().match(options.AllowedPattern))?$input.val().toUpperCase():"sign not allowed";var sSearchPattern=new RegExp(""+sSearchValue+"","i");var sToHighLite="";var sHightLite="";var aToolUrl=new Array();for(i=0;i<aTools.length;i++){aToolMatchesFound[aTools[i]]=0}for(i=0;i<aTools.length;i++){for(j=0;j<aReturnNameFields.length;j++){aNameFieldsPosition[aReturnNameFields[j]]=j}var iDatasetOffset=aReturnNameFields.length;var sTool=aTools[i];var iCount=(s[sTool]).length;sSearchValue=(aTranslate[sSearchValue]==undefined)?sSearchValue:aTranslate[sSearchValue];var sSearchPattern=new RegExp(""+sSearchValue+"","i");for(j=0;j<iCount;j+=iDatasetOffset){if(aToolMatchesFound[sTool]>=aToolMatches[sTool]){break}else{var sSearchValues="";for(m=0;m<aSearchNameFields.length;m++){sSearchValues+=s[sTool][aNameFieldsPosition[aSearchNameFields[m]]]+"{|}"}if((sSearchValues).match(sSearchPattern)){var instrumentsAsString="{|}"+(aInstrument[sTool]["NAME"]).join("{|}");var instrumentAsItem="{|}"+s[sTool][aNameFieldsPosition.NAME];if(instrumentsAsString.indexOf(instrumentAsItem)=="-1"&&s[sTool][aNameFieldsPosition.ID_NOTATION]!=""){for(k=0;k<aReturnNameFields.length;k++){aInstrument[sTool][aReturnNameFields[k]].push(s[sTool][aNameFieldsPosition[aReturnNameFields[k]]])}aToolMatchesFound[sTool]++}}for(k=0;k<aReturnNameFields.length;k++){aNameFieldsPosition[aReturnNameFields[k]]+=iDatasetOffset}}}}for(i=0;i<aTools.length;i++){for(j=0;j<aReturnNameFields.length;j++){aNameFieldsPosition[aReturnNameFields[j]]=j}var iDatasetOffset=aReturnNameFields.length;var sTool=aTools[i];var iCount=(d[sTool]).length;for(j=0;j<iCount;j+=iDatasetOffset){if(aToolMatchesFound[sTool]>=aToolMatches[sTool]){break}else{if(((aInstrument[sTool]["NAME"]).join("{|}").indexOf(d[sTool][aNameFieldsPosition.NAME]))=="-1"&&d[sTool][aNameFieldsPosition.ID_NOTATION]!=""){for(k=0;k<aReturnNameFields.length;k++){aInstrument[sTool][aReturnNameFields[k]].push(d[sTool][aNameFieldsPosition[aReturnNameFields[k]]])}aToolMatchesFound[sTool]++}}for(k=0;k<aReturnNameFields.length;k++){aNameFieldsPosition[aReturnNameFields[k]]+=iDatasetOffset}}}var SuggestList="<ul>";for(i=0;i<aTools.length;i++){sTool=aTools[i];iCount=(aInstrument[sTool]["NAME"]).length;if(iCount>0){$sIeFix=(navigator.userAgent.indexOf("MSIE")!="-1")?'style="margin-top:-1px"':"";SuggestList+='<li class="IDMS_Suggestheader" '+$sIeFix+">";SuggestList+='<span style="float: left">'+aToolName[sTool]+" ("+iCount+") </span>";if(sSearchValue.length>=3){SuggestList+='<span style="float: right"><a style="display: inline" href="javascript:SuggestCategoryCallback(\''+sTool+"','"+sSearchValue+"')\">Alle Treffer</a></span>"}SuggestList+="</li>";iLinkNumber+=1;for(j=0;j<iCount;j++){SuggestList+="<li>";sToHighLite=(aInstrument[sTool]["NAME"][j]).substr(0,32);sHightLite=sToHighLite.replace(sSearchPattern,"<b>"+sSearchValue+"</b>");var sCallbackValues=sTool;for(k=0;k<aReturnNameFields.length;k++){sCallbackValues+="|||"+aInstrument[sTool][aReturnNameFields[k]][j]}sIsin=aInstrument[sTool]["ISIN"][j];iIdNotation=aInstrument[sTool]["ID_NOTATION"][j];sName=aInstrument[sTool]["NAME"][j];SuggestList+='<a id="link_'+iLinkNumber+'" title="'+sName+'" href="javascript:internalCallback(\''+sCallbackValues+'\')"><div class="IDMS_Suggest1Col">'+sHightLite+"</div>";sToHighLite=sIsin;sHightLite=sToHighLite.replace(sSearchPattern,"<b>"+sSearchValue+"</b>");sHightLite=(sHightLite=="")?"&nbsp;":sHightLite;if(sTool!="DAB"){SuggestList+='<div class="IDMS_Suggest2Col">'+sHightLite+"</div>";sFlagId=(sTool=="CUR")?"":(sIsin.substr(0,2));if(options.show_flags){sCountry=(c[sFlagId]==undefined)?"":c[sFlagId];sFlag='<img title="'+sCountry+'" src="'+IMG_PATH+"/flags/"+sFlagId.toLowerCase()+'_flag.gif" alt="" />';SuggestList+='<div class="IDMS_Suggest0Col">'+sFlag+"</div></a>"}}SuggestList+="</li>";iLinkNumber+=1}}}SuggestList+="</ul>";updateChoices(SuggestList);if(sSearchValue=="-SHOWPANEL--"){jQuery("#IDMS_panel").show();Set_Cookie("SHOW_IDMS_PANEL","1",30,"/","","");jQuery("#SHOW_IDMS_PANEL:checkbox").val(["SHOW_IDMS_PANEL"])}}function getUpdatedChoices(){entry=encodeURIComponent("SEARCH_VALUE")+"="+encodeURIComponent($input.val());if($input.val().match(options.AllowedPattern)){if($input.val().length>=options.ask_backend){buildSuggestList();if(typeof(Scheduler)=="object"){if(Scheduler.aInterval.IDMS_autocomplete_choices==undefined){var now=new Date();Scheduler.subscribe("IDMS_autocomplete_choices","load","");if(USE_XHR){document.getElementById("ifrm_ajax").contentWindow.xGet(options.url+"?"+entry,null,function(text){buildSuggestList(text);if(typeof(Scheduler)=="object"){Scheduler.unsubscribe("IDMS_autocomplete_choices");Scheduler.ajaxSnippetCallback("IDMS_autocomplete_choices")}},"html")}else{jQuery.ajax({type:"GET",url:options.url+"?"+entry,dataType:"html",success:function(text){buildSuggestList(text);if(typeof(Scheduler)=="object"){Scheduler.unsubscribe("IDMS_autocomplete_choices");Scheduler.ajaxSnippetCallback("IDMS_autocomplete_choices")}}})}}}}else{buildSuggestList()}}}};jQuery.Autocompleter.defaults={minChars:2,ask_backend:3,delay:100,show_flags:true,max:20,mustMatch:false,selectFirst:true,width:0,AllowedPattern:/^[0-9a-zA-Z-_!\.&\u00E4\u00F6\u00FC\u00C4\u00D6\u00DC\u00DF\s]{0,30}$/,highlight:function(value,term){var sSearchValue=(term.match(options.AllowedPattern))?term.toUpperCase():"sign not allowed";var sSearchPattern=new RegExp(""+term+"","i");var sToHighLite="";var sHightLite="";sToHighLite=value.substr(0,19);sHightLite=sToHighLite.replace(sSearchPattern,"<b>"+sSearchValue+"</b>");return sHightLite},scroll:false,scrollHeight:180};jQuery.Autocompleter.Select=function(options,input,select,config){var CLASSES={ACTIVE:"ac_over"};var listItems,active=-1,data,term="",element,list;return{display:function(d,q){init();data=d;term=q},next:function(){moveSelect(1)},prev:function(){moveSelect(-1)},pageUp:function(){if(active!=0&&active-8<0){moveSelect(-active)}else{moveSelect(-8)}},pageDown:function(){if(active!=listItems.size()-1&&active+8>listItems.size()){moveSelect(listItems.size()-1-active)}else{moveSelect(8)}},hide:function(){element&&element.hide();listItems&&listItems.removeClass(CLASSES.ACTIVE);active=-1},visible:function(){return element&&element.is(":visible")},current:function(){return this.visible()&&(listItems.filter("."+CLASSES.ACTIVE)[0]||options.selectFirst&&listItems[0])},show:function(){var offset=jQuery(input).offset();element.css({width:typeof options.width=="string"||options.width>0?options.width:jQuery(input).width(),top:offset.top+input.offsetHeight,left:offset.left}).show();if(options.scroll){list.scrollTop(0);list.css({maxHeight:options.scrollHeight,overflow:"auto"});if(jQuery.browser.msie&&typeof document.body.style.maxHeight==="undefined"){var listHeight=0;listItems.each(function(){listHeight+=this.offsetHeight});var scrollbarsVisible=listHeight>options.scrollHeight;list.css("height",scrollbarsVisible?options.scrollHeight:listHeight);if(!scrollbarsVisible){listItems.width(list.width()-parseInt(listItems.css("padding-left"))-parseInt(listItems.css("padding-right")))}}}}}};jQuery.Autocompleter.Selection=function(field,start,end){if(field.createTextRange){var selRange=field.createTextRange();selRange.collapse(true);selRange.moveStart("character",start);selRange.moveEnd("character",end);selRange.select()}else{if(field.setSelectionRange){field.setSelectionRange(start,end)}else{if(field.selectionStart){field.selectionStart=start;field.selectionEnd=end}}}field.focus()}})(jQuery);
