var _Mode='desktop';var instrument='EURHUF=X';var pagelang='hu';var instrefresh=30000;var instcache=30000;(function(window){'use strict';var re={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/bcdiefguxX/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[\+\-]/};function sprintf(){var key=arguments[0],cache=sprintf.cache;if(!(cache[key]&&cache.hasOwnProperty(key))){cache[key]=sprintf.parse(key)}return sprintf.format.call(null,cache[key],arguments)};sprintf.format=function(parse_tree,argv){var cursor=1,tree_length=parse_tree.length,node_type='',arg,output=[],i,k,match,pad,pad_character,pad_length,is_positive=true,sign='';for(i=0;i=0};switch(match[8]){case 'b':arg=parseInt(arg,10).toString(2);break;case 'c':arg=String.fromCharCode(parseInt(arg,10));break;case 'd':case 'i':arg=parseInt(arg,10);break;case 'j':arg=JSON.stringify(arg,null,match[6]?parseInt(match[6]):0);break;case 'e':arg=match[7]?parseFloat(arg).toExponential(match[7]):parseFloat(arg).toExponential();break;case 'f':arg=match[7]?parseFloat(arg).toFixed(match[7]):parseFloat(arg);break;case 'g':arg=match[7]?parseFloat(arg).toPrecision(match[7]):parseFloat(arg);break;case 'o':arg=arg.toString(8);break;case 's':arg=String(arg);arg=(match[7]?arg.substring(0,match[7]):arg);break;case 't':arg=String(!!arg);arg=(match[7]?arg.substring(0,match[7]):arg);break;case 'T':arg=get_type(arg);arg=(match[7]?arg.substring(0,match[7]):arg);break;case 'u':arg=parseInt(arg,10)>>>0;break;case 'v':arg=arg.valueOf();arg=(match[7]?arg.substring(0,match[7]):arg);break;case 'x':arg=parseInt(arg,10).toString(16);break;case 'X':arg=parseInt(arg,10).toString(16).toUpperCase();break};if(re.json.test(match[8])){output[output.length]=arg}else{;if(re.number.test(match[8])&&(!is_positive||match[3])){sign=is_positive?'+':'-';arg=arg.toString().replace(re.sign,'')}else{sign=''};pad_character=match[4]?match[4]==='0'?'0':match[4].charAt(1):' ';pad_length=match[6]-(sign+arg).length;pad=match[6]?(pad_length>0?str_repeat(pad_character,pad_length):''):'';output[output.length]=match[5]?sign+arg+pad:(pad_character==='0'?sign+pad+arg:pad+sign+arg)}}}return output.join('')};sprintf.cache={};sprintf.parse=function(fmt){var _fmt=fmt,match=[],parse_tree=[],arg_names=0;while(_fmt){;if((match=re.text.exec(_fmt))!==null){parse_tree[parse_tree.length]=match[0]}else if((match=re.modulo.exec(_fmt))!==null){parse_tree[parse_tree.length]='%'}else if((match=re.placeholder.exec(_fmt))!==null){;if(match[2]){arg_names|=1;var field_list=[],replacement_field=match[2],field_match=[];if((field_match=re.key.exec(replacement_field))!==null){field_list[field_list.length]=field_match[1];while((replacement_field=replacement_field.substring(field_match[0].length))!==''){;if((field_match=re.key_access.exec(replacement_field))!==null){field_list[field_list.length]=field_match[1]}else if((field_match=re.index_access.exec(replacement_field))!==null){field_list[field_list.length]=field_match[1]}else{throw new SyntaxError("[sprintf] failed to parse named argument key")}}}else{throw new SyntaxError("[sprintf] failed to parse named argument key")};match[2]=field_list}else{arg_names|=2};if(arg_names===3){throw new Error("[sprintf] mixing positional and named placeholders is not(yet) supported")};parse_tree[parse_tree.length]=match}else{throw new SyntaxError("[sprintf] unexpected placeholder")};_fmt=_fmt.substring(match[0].length)}return parse_tree};var vsprintf=function(fmt,argv,_argv){_argv=(argv||[]).slice(0);_argv.splice(0,0,fmt);return sprintf.apply(null,_argv)};function get_type(variable){;if(typeof variable==='number'){return 'number'}else if(typeof variable==='string'){return 'string'}else{return Object.prototype.toString.call(variable).slice(8,-1).toLowerCase()}};var preformattedPadding={'0':['','0','00','000','0000','00000','000000','0000000'],' ':['',' ',' ',' ',' ',' ',' ',' '],'_':['','_','__','___','____','_____','______','_______'],};function str_repeat(input,multiplier){;if(multiplier>=0&&multiplier<=7&&preformattedPadding[input]){return preformattedPadding[input][multiplier]}return Array(multiplier+1).join(input)};if(typeof exports!=='undefined'){exports.sprintf=sprintf;exports.vsprintf=vsprintf};if(typeof window!=='undefined'){window.sprintf=sprintf;window.vsprintf=vsprintf;if(typeof define==='function'&&define.amd){define(function(){return{sprintf:sprintf,vsprintf:vsprintf}})}}})(typeof window==='undefined'?this:window);var _URL='/arfolyam-panel/%s/%s-reszveny-arfolyam.html';var _Titles={'EURHUF=X':'Euró','HUF=X':'Dollár','CHFHUF=X':'Frank','EUR/HUF':'Euró','USD/HUF':'Dollár','CHF/HUF':'Frank'};Number.prototype.numberformat=function(c,d,t){var n=this,c=isNaN(c=Math.abs(c))?2:c,d=d==undefined?".":d,t=t==undefined?",":t,s=n<0?"-":"",i=parseInt(n=Math.abs(+n||0).toFixed(c))+"",j=(j=i.length)>3?j%3:0;return s+(j?i.substr(0,j)+t:"")+i.substr(j).replace(/(\d{3})(?=\d)/g,"$1"+t)+(c?d+Math.abs(n-i).toFixed(c).slice(2):"")};nf=function(num,round){;if(typeof num=='undefined'){return ''};num=Number(num);if(!round&&num<10){round=1};var suff=' ';if(num>=1000000000){num/=1000000000;suff=' '+language['milliard']}else if(num>=1000000){num/=1000000;suff=' '+language['millio']};if(typeof round=='undefined'){round=num<100?1:0}return num.numberformat(round,'.',' ')+suff};Number.prototype.print=function(round){return nf(this,round)};String.prototype.print=function(round){return isNaN(this)?this:nf(this,round)};Date.prototype.print=function(type){;if(type=='date'){return sprintf('%04d. %02d. %02d.',this.getFullYear(),this.getMonth()+1,this.getDate())}else if(type=='time'){return sprintf('%02d:%02d:%02d',this.getHours(),this.getMinutes(),this.getSeconds())}};String.prototype.strtr=function(fr,to){var re;var s=this;for(var i=0;ifő','ajanlat_db':'ajánlat
db','kum_HUF':'kum
HUF','HUF':'HUF','kum_db':'kum
db','db':'db','arf':'árf.','koteslista':'Kötéslista','ido':'idő','ar':'ár','darab':'darab','ertek':'érték','tovabbi_kot':'További kötések','statisztika':'Statisztikák, mutatók','tovabbi_sta':'További statisztikák','adatlap':'Adatlap','tovabbi_ada':'További adatok','hirek':'Hírek','tovabbi_arf':'További árfolyamok','friss_hirek':'Friss hírek','hirek_title':'hírei','tovabbi_hir':'további hírek...','forum':'Fórum','forum_title':'fórum, tőzsde fórum','tovabbi_top':'további topikok...','devizaker':'Devizakeresztek','NA':'Nincs adat','fejlec':'%s árfolyam','min':'napi min. érték','max':'napi max. érték','open':'nyitó. érték','avg':'napi átlag','close':'előző záró','forgalom':'forgalom (%s)','forgalomdb':'forgalom (db)','kapit':'kapitalizáció (%s)','buxkapit':'BÉT teljes kap. (%s)','chg1m':'változás 1 hó','chg3m':'változás 3 hó','chg1y':'változás 12 hó','vol1m':'volatilitás 1 hó','vol3m':'volatilitás 3 hó','vol1y':'volatilitás 12 hó','pe2000':'P/E 2017','pe2001':'P/E 2018','eps2000':'EPS 2017','eps2001':'EPS 2018','min1y':'52 heti min. érték','max1y':'52 heti max. érték','minall':'történelmi min. érték','maxall':'történelmi max. érték','closemin1y':'záró 52 heti min. érték','closemax1y':'záró 52 heti max. érték','closeminall':'záró történelmi min. érték','closemaxall':'záró történelmi max. érték','forgavg6m':'Az elmúlt 180 nap (naptári) forgalommal súlyozott átlaga','forgavg1y':'Az elmúlt 360 nap (naptári) forgalommal súlyozott átlaga','close1m':'Egyhónapos záró árfolyam','close3m':'Negyedéves záró árfolyam','activity':'Tevékenység','address':'Elérhetőség','auditor':'Könyvvizsgáló','contact-fax':'Befektetői kapcsolattartó fax','contact-mail':'Befektetői kapcsolattartó mail','contact-person':'Befektetői kapcsolattartó','contact-phone':'Befektetői kapcsolattartó tel','currency':'Kereskedés pénzneme','directorate':'Igazgatóság','equity_class':'Részvényfajta','exchange_category':'Tőzsdei kategória','facevalue':'Kereskedés pénzneme','fax':'Fax','first_day':'Első kereskedési nap','fullname':'Teljes név','launch_day':'Bevezetési nap','management':'Vállalatvezetés','owners':'Részvénytulajdonosok','phone':'Telefonszám','production_mode':'Értékpapír előállítási módja','sector':'Szektor','shortname':'Rövid név','supervisors':'Felügyelőbizottság','type':'Értékpapír típus','volume':'Bevezetett értékpapír mennyisége (db)','web':'Web'};var tickerRealNames={'EURHUF=X':'Euró','HUF=X':'Dollár','BTC=X':'Bitcoin','CHFHUF=X':'Frank','EURUSD=X':'EUR/USD','JPY=X':'USD/JPY','EURCHF=X':'EUR/CHF','EURJPY=X':'EUR/JPY','EURGBP=X':'EUR/GBP','EURPLN=X':'EUR/PLN','EURCZK=X':'EUR/CZK'};var getBreadcrumb=function(type,prefix,ticker,name){breadcrumb='Árfolyamok';switch(parseInt(type)){case 1:breadcrumb+=' » Részvények';break;case 2:;if(prefix=='BET'){breadcrumb+=' » Deviza'}else if(prefix=='FX'){breadcrumb+=' » Deviza'};break;case 3:;if(prefix=='BET'){breadcrumb+=' » Befektetési alapok'}else if(prefix=='TTWS'){breadcrumb+=' » Árupiac'};break;case 5:breadcrumb+=' » Határidős árfolyamok';break;case 16:breadcrumb+=' » Certifikátok';break;case 17:breadcrumb+=' » BÉTa részvények';breadcrumb+=' » BÉTa';break};switch(prefix){case 'BET':breadcrumb+=' » BÉT';break;case 'FX':breadcrumb+=' » FOREX';break};breadcrumb+=' » '+getTickerRealName(ticker)+'';return breadcrumb};loadGraphHeader=function(data){;if(typeof data['lasttime']!='undefined'){var lasttime=new Date(data.lasttime*1000);var dec=!decimals&&data.last<100?1:decimals;$('#ticker').html(sprintf(language.fejlec,getTickerRealName(data.ticker)));$('#datum').html(lasttime.print('date'));$('#lasttime').html(lasttime.print('time'));$('#last').html(data.last.print(decimals));$('#chg').html(data.chgpc+'%');$('#last, #chg, #chg-triangle').attr('class',(data.chg>0?'up':'dn'));if($('#legend').html()==''){$('#legend').html(''+language.ElozoZaro+''+''+language.Forgalom+'' )}}};getDailyTooltip=function(date,item,close){return '
'+date.print('time').substr(0,5)+'
'+language.Ar+': '+item.price.print(decimals)+' '+currency+'
'+(prefix!='FX'?'
'+language.Forgalom+': '+item.volume.print()+' db
' : '')+'
'+language.ElozoZaro+': '+close.print(decimals)+' '+currency+'
'+'
'};getVolumeTooltip=function(date,date2,volume){return '
'+date.print('time').substr(0,5)+'–'+date2.print('time').substr(0,5)+'
'+language.Forgalom+': '+volume.print()+' db
'+'
'};getHistoricalTooltip=function(date,item,close){return '
'+date.print('date')+'
'+language.Nyitoar+': '+item.open.print(decimals)+' '+currency+'
'+'
'+language.Zaroar+': '+item.close.print(decimals)+' '+currency+'
'+'
'+language.Max+': '+item.high.print(decimals)+' '+currency+'
'+'
'+language.Min+': '+item.low.print(decimals)+' '+currency+'
'+(prefix!='FX'?'
'+language.Forgalom+': '+item.volume.print()+' '+currency+'
' : '')+'
'};getAverageTooltip=function(date,today,average){return '
'+date.print('time').substr(0,5)+(today?'
'+language.MaiForgalom+': '+today.print()+' db
' : '')+(average?'
'+language.Atlagforg+': '+average.print()+' db
' : '')+'
'};showHideColumn=function(sel,chart,datatable,chartOptions,columns,series){;if(sel.length>0){;if(sel[0].row===null){var col=sel[0].column;if(columns[col]==col){columns[col]={label:datatable.getColumnLabel(col),type:datatable.getColumnType(col),calc:function(){return null}};series[col-1].color='#CCCCCC'}else{columns[col]=col;series[col-1].color=null}}};var view=new google.visualization.DataView(datatable);view.setColumns(columns);chart.draw(view,chartOptions)};showPriceGraph=function(prefix,dateformat,prices,minmax){var datatable=new google.visualization.DataTable();datatable.addColumn('datetime',language.Idopont);datatable.addColumn('number',language.Ar);datatable.addColumn({type:'string',role:'tooltip','p':{'html':true}});datatable.addColumn('number',language.Forgalom);datatable.addColumn({type:'string',role:'tooltip','p':{'html':true}});datatable.addColumn('number',language.ElozoZaro);datatable.addColumn({type:'string',role:'tooltip','p':{'html':true}});datatable.addRows(prices);var chartOptions={isStacked:true,vAxes:{0:{viewWindow:{min:minmax[0].min,max:minmax[0].max}},1:{viewWindow:{min:minmax[1].min,max:minmax[1].max},format:'short',gridlineColor:'none',textPosition:'none'},2:{viewWindow:{min:minmax[0].min,max:minmax[0].max},baselineColor:'#fff',gridlineColor:'none',textPosition:'none'}},series:{0:{targetAxisIndex:0,type:"line",lineWidth:3},1:{targetAxisIndex:1,type:"bars"},2:{targetAxisIndex:2,type:"line",lineWidth:2,lineDashStyle:[2,2]},},hAxis:{textStyle:{fontSize:10},format:dateformat},interpolateNulls:true,tooltip:{isHtml:true,textStyle:{color:'#666'}},legend:{position:'none'},lineWidth:2,chartArea:{left:60,top:20,right:20,bottom:20},colors:['#339B94','#FF5700','#EDC92B'],height:240,bars:{groupWidth:'100%'}};var chart=new google.visualization.ComboChart(document.getElementById('arfolyam'));var columns=[];var series={};for(var i=0;i0){series[i-1]={}}};$('#cbZaro').click(function(){zaroOn=$(this).is(':checked');showHideColumn([{column:5,row:null}],chart,datatable,chartOptions,columns,series)});$('#cbForgalom').click(function(){forgalomOn=$(this).is(':checked');showHideColumn([{column:3,row:null}],chart,datatable,chartOptions,columns,series)});var cols=[];if(!forgalomOn){cols.push({column:3,row:null})};if(!zaroOn){cols.push({column:5,row:null})};showHideColumn(cols,chart,datatable,chartOptions,columns,series)};showAverageGraph=function(ticker,sumOfVolumes){var datatable=new google.visualization.DataTable();datatable.addColumn('datetime',language.Idopont);datatable.addColumn('number',language.MaiForgalom);datatable.addColumn({type:'string',role:'tooltip','p':{'html':true}});datatable.addColumn('number',language.Elmult30);datatable.addColumn({type:'string',role:'tooltip','p':{'html':true}});_portfolioData('chart/json/'+ticker+':type=average30',{headers: _pfHeaders},function(data){var dt,date,sum,average;for(var i=0;iminmax[0].max)minmax[0].max=max};if(volumeminmax[1].max)minmax[1].max=volume};updateMinMax=function(minmax){minmax.min-=minmax.min/1000;minmax.max+=minmax.max/1000};loadGraphs=function(){var graphData=graphCache[currentInterval];if(typeof graphData=='undefined'||typeof graphData['imgdata']=='undefined'){return};var prices=[];var volumes={};var minmax={0:{min:Number.MAX_VALUE,max:Number.MIN_VALUE},1:{min:Number.MAX_VALUE,max:Number.MIN_VALUE}};var close=interval=='1D'?parseFloat(graphData.close):null;var date,price,volume,ttip;if(interval=='1D'){volumes=groupVolumes(graphData)};graphData.imgdata.data.forEach(function(item){date=new Date(item.date*1000);if(interval=='1D'){price=parseFloat(item.price);ttip=getDailyTooltip(date,item,close,currency,prefix,decimals);if(typeof volumes[item.date]){volume=volumes[item.date];delete volumes[item.date]}else{volume=null}}else{price=parseFloat(item.close);ttip=getHistoricalTooltip(date,item,close,currency,prefix,decimals);volume=parseFloat(item.volume)};prices.push([date,price,ttip,volume,ttip,close,ttip]);setMinMax(minmax,price,volume,close)});Object.keys(volumes).forEach(function(dt){date=new Date(dt*1000);date2=new Date((parseInt(dt)+600)*1000);volume=volumes[dt];ttip=getVolumeTooltip(date,date2,volume);prices.push([date,null,ttip,volume,ttip,null,ttip]);setMinMax(minmax,null,volume,null)});updateMinMax(minmax[0]);updateMinMax(minmax[1]);showPriceGraph(graphData.prefix,graphData.imgdata.imgdateformat,prices,minmax);if(interval!='1D'||graphData.prefix!='BET'){hideAverageGraph()}};loadStatistics=function(data){;if(graphUpdate){return};isNotNull=function(object){return(typeof object!='undefined'&&object!=null)};data.avg=(Number(data.min)+Number(data.max))/2;var stats='';['min','max','open','avg','close'].forEach(function(tag){;if(isNotNull(data[tag])){stats+=''+language[tag]+':'+data[tag].print(data.decimals)+''}});if(isNotNull(data['forgalomdb'])){stats+=''+language['forgalomdb']+':'+data['forgalomdb'].numberformat(0,'.',' ')+''};if(isNotNull(data['forgalom'])){stats+=''+sprintf(language['forgalom'],data['currency'])+':'+data['forgalom'].print()+''};['kapit','buxkapit'].forEach(function(tag){;if(isNotNull(data[tag])){stats+=''+sprintf(language[tag],data.currency)+':'+data[tag].print()+' '+language['milliard']+''}});['chg1m','chg3m','chg1y'].forEach(function(tag){;if(isNotNull(data[tag])){stats+=''+language[tag]+':'+data[tag].print()+'%'}});['vol1m','vol3m','vol1y','pe2000','pe2001','eps2000','eps2001'].forEach(function(tag){;if(isNotNull(data[tag])){stats+=''+language[tag]+':'+data[tag].print()+''}});['min1y','max1y','minall','maxall','closemin1y','closemax1y','closeminall','closemaxall'].forEach(function(tag){;if(isNotNull(data[tag])){var date='';if(typeof data[tag+'time']!='undefined'){date=new Date(data[tag+'time']*1000).print('date')};stats+=''+language[tag]+':'+date+''+data[tag].print()+''}});['forgavg6m','forgavg1y','close1m','close3m'].forEach(function(tag){;if(isNotNull(data[tag])){stats+=''+language[tag]+':'+data[tag].print()+''}});$('#statisztika tbody').html(stats)};loadBounds=function(data){;if(data['prefix']=='FX'||typeof data['kotesek']=='undefined'||!data['kotesek']){return};var dec;var html='';var bounds=Object.keys(data.kotesek);if(bounds.length){bounds.reverse();for(var i=0,c=(bounds.length>30?30:bounds.length);i'+new Date(bound[0]*1000).print('time')+''+bound[3].print(dec)+' '+bound[4]+''+val.print()+'\n'}};$('#koteslista tbody').html(html);if(html!=''){$('#koteslista').show()}};loadBids=function(data){;if(typeof data['bid5']=='undefined'){return};$('#ajanlati_konyv tbody .vetel').remove();var html='';var bids=Object.keys(data.bid5);if(bids.length){var cPrice=0;var cSize=0;var count;bids.forEach(function(idx){;if(data.bid5[idx]){cSize+=Number(data.bid5_size[idx]);cPrice+=Number(data.bid5[idx])*(data.bid5_size[idx]);count=data.bid5_num[idx]?data.bid5_num[idx]:'';html+=''+count+''+cPrice.print()+''+(data.bid5[idx]*data.bid5_size[idx]).print()+''+cSize.print()+''+data.bid5_size[idx]+''+data.bid5[idx]+''}});$('#ajanlati_konyv tbody').append(html)}};loadAsks=function(data){;if(typeof data['ask5']=='undefined'){return};$('#ajanlati_konyv tbody .eladas').remove();var html='';var asks=Object.keys(data.ask5);if(asks.length){var _cp=0,_cs=0;var cPrice={},cSize={};var count;asks.forEach(function(idx,i){_cs+=Number(data.ask5_size[idx]);_cp+=Number(data.ask5[idx]*data.ask5_size[idx]);cSize[idx]=_cs;cPrice[idx]=_cp});asks.reverse().forEach(function(idx){;if(data.ask5[idx]){count=data.ask5_num[idx]?data.ask5_num[idx]:'';html+=''+data.ask5[idx]+''+data.ask5_size[idx]+''+cSize[idx].print()+''+(data.ask5[idx]*data.ask5_size[idx]).print()+''+cPrice[idx].print()+''+count+''}});$('#ajanlati_konyv tbody').append(html)}};loadBidsAsks=function(data){loadAsks(data);loadBids(data);if($('#ajanlati_konyv tbody').html()!=''){$('#ajanlati_konyv').show()}else{$('#ajanlati_konyv').hide()}};loadDataSheet=function(data){;if(graphUpdate){return};_portfolioData('issuer/json/'+data.ticker.replace(/\//g,'_'),{_cacheTTL:3600000,headers:_pfHeaders},function(data){var html='';var value;if(typeof data!='undefined'&&data){Object.keys(data).forEach(function(key,di){;if(key=='owners'){value='';for(var i=0;i',data.owners[i].name,data.owners[i].ownership)}}else if(typeof data[key]=='object'){value=data[key].join('
')}else if(key=='first_day'||key=='launch_day'){value=new Date(data[key]*1000).print('date')}else{value=data[key]};html+=''+language[key]+':'+value+''});$('#adatlap tbody').html(html);if($('#adatlap tbody').html()!=''){$('#adatlap').css('display','inline-block')}else{$('#adatlap').hide()}}else{$('#adatlap').hide()}})};loadFreshNews=function(){;if(graphUpdate){return};$('#friss_hirek .box-content').html('');try{_portfolioData('news/json/:type=fresh&limit=20',{_cacheTTL: 300000,headers: _pfHeaders},function(data){var html='';for(var i=0;i '+data[i].datetime.substr(11,5)+' | '+data[i].title+(data[i].minbymin?' ':'')+''};$('#friss_hirek .box-content').html(html);$('#friss_hirek .tovabb').show()})}catch(ex){$('#friss_hirek .preloader').remove();console.error(ex)}};loadNews=function(fname){;if(graphUpdate){return};$('#hirek .box-content').html('');var tickerNews=prefix!='TTWS';try{_portfolioData('news/json'+(tickerNews?'/:ticker='+fname : ''),{_cacheTTL: 600000,headers: _pfHeaders},function(data){;if(data.length){var hirek='',piaci='';for(var i=0;i'+data[i].title+''+''+data[i].datetime+''+'
'+data[i].lead+'
'+'';if(data[i].type=='news'||(!tickerNews&&i%2==0)){hirek+=html}else if((_Mode=='desktop'&&data[i].type=='market')||(!tickerNews&&i%2!=0)){piaci+=html}};$('#hirek .box-content').html('
'+hirek+'
'+piaci+'
');$('#hirek').show()}else{$('#hirek').hide()}})}catch(ex){$('#hirek .preloader').remove();console.error(ex)}};loadLastTopics=function(ticker){;if(graphUpdate){return};$('#forum .box-content').html('');try{ticker=getTickerRealName(ticker);$.ajax({url:'https://forum.portfolio.hu/api/topic/6e0fb4e36bc2a315b008be397650e55e/'+(ticker?ticker+'-':'')+'15',dataType:'json',success:function(data){;if(data.length){var html='';for(var i=0;i '+data[i].dateText+' | '+data[i].cim+''};$('#forum .box-content').html(html);$('#forum .tovabb').show()}else{$('#hirek').hide()};setTimeout(function(){loadLastTopics(instrument)},300000)}})}catch(ex){$('#forum .preloader').remove();console.error(ex)}};var lastrefresh;var intUpdater;var currentInterval;var prefix,currency,decimals;var unknownTicker=0;var graphUpdate=0;var forgalomOn=false;var zaroOn=true;var interval='1D';var graphHistory=[];var graphCache={'1M':null,'3M':null,'6M':null,'1Y':null,'5Y':null};var _pfHeaders={};updateSearchbar=function(){;if(_Mode=='mobile')return;$("#rv_kereso input").autocomplete({minChars:0,width:'200px',serviceUrl:'/ajax/infopanel-tickers.php',onSelect:function(value,data){data=JSON.parse(data);var url=getURL({ticker:data.ticker,name:data.name,prefix:data.src});if(url){document.location.href=url}}})};displayLinkedExchanges=function(prefix){;if(graphUpdate||_Mode=='mobile')return;var linked=[];switch(prefix){case 'BET':linked=[['OTP','OTP'],['MOL','MOL'],['RICHTER','RICHTER'],['MTELEKOM','MTELEKOM'],['PANNERGY','PANNERGY'],['FHB','FHB'],['ANY','ANY BIZTONSÁGI NYOMDA']];break;case 'TTWS':case 'FX':linked=[['EURHUF=X',getTickerRealName('EURHUF=X')],['HUF=X',getTickerRealName('HUF=X')],['BTC=X',getTickerRealName('BTC=X')],['CHFHUF=X',getTickerRealName('CHFHUF=X')],['EURUSD=X',getTickerRealName('EURUSD=X')],['JPY=X',getTickerRealName('JPY=X')],['EURCHF=X',getTickerRealName('EURCHF=X')],['EURJPY=X',getTickerRealName('EURJPY=X')],['EURGBP=X',getTickerRealName('EURGBP=X')],['EURPLN=X',getTickerRealName('EURPLN=X')],['EURCZK=X',getTickerRealName('EURCZK=X')]];break};var c=120;var html='';for(var i=0;i'+linked[i][1]+'';c-=5};if(html!=''){$('#tovabbi_arfolyamok .cimkek').html(html);$('#tovabbi_arfolyamok').show()}else{$('#tovabbi_arfolyamok').hide()}};initLayout=function(){$('#ajanlati_konyv thead tr:eq(0) th').html(getTickerRealName()+' '+language.ajanlati);$('#koteslista thead tr:eq(0) th').html(getTickerRealName()+' '+language.koteslista);$('#statisztika thead tr:eq(0) th').html(getTickerRealName()+' '+language.statisztika);$('#adatlap thead tr:eq(0) th').html(getTickerRealName()+' '+language.adatlap);$('#hirek .greentitle').html(getTickerRealName()+' '+language.hirek);$('#forum .greentitle a').html(language.forum);$('#rv_kereso input').attr('placeholder',language.rv_kereso);$('#intervallum button').eq(0).html(language.D1);$('#intervallum button').eq(1).html(language.M1);$('#intervallum button').eq(2).html(language.M3);$('#intervallum button').eq(3).html(language.M6);$('#intervallum button').eq(4).html(language.Y1);$('#intervallum button').eq(5).html(language.Y5);$('#ajanlati_konyv thead tr:eq(1) th:eq(0)').html(language.vetel);$('#ajanlati_konyv thead tr:eq(1) th:eq(2)').html(language.eladas);$('th:eq(0), th:eq(12)', '#ajanlati_konyv thead tr:eq(2)').html(language.ajanlat_fo);$('th:eq(1), th:eq(11)', '#ajanlati_konyv thead tr:eq(2)').html(language.ajanlat_db);$('th:eq(2), th:eq(10)', '#ajanlati_konyv thead tr:eq(2)').html(language.kum_HUF);$('th:eq(3), th:eq(9)', '#ajanlati_konyv thead tr:eq(2)').html(language.HUF);$('th:eq(4), th:eq(8)', '#ajanlati_konyv thead tr:eq(2)').html(language.kum_db);$('th:eq(5), th:eq(7)', '#ajanlati_konyv thead tr:eq(2)').html(language.db);$('th:eq(6)','#ajanlati_konyv thead tr:eq(2)').html(language.arf);$('#koteslista thead tr:eq(1) th:eq(0)').html(language.ido);$('#koteslista thead tr:eq(1) th:eq(1)').html(language.ar);$('#koteslista thead tr:eq(1) th:eq(2)').html(language.darab);$('#koteslista thead tr:eq(1) th:eq(3)').html(language.ertek);$('#statisztika tfoot th').html(language.tovabbi_sta+'').click(function(){$(this).closest('table').removeClass('short-table');$(this).remove()});$('#adatlap tfoot th').html(language.tovabbi_ada+'').click(function(){$(this).closest('table').removeClass('short-table');$(this).remove()});$('#devizakeresztek .greentitle').html(language.devizaker);$('#tovabbi_arfolyamok .greentitle').html(language.tovabbi_arf);$('#friss_hirek .greentitle').html(language.friss_hirek);$('#friss_hirek .tovabb a').html(language.tovabbi_hir);$('#forum .tovabb a').html(language.tovabbi_top);updateSearchbar()};canRefresh=function(){return currentInterval!=interval||Math.floor(new Date().getTime()/1000)-lastrefresh>=(instrefresh/1000)};invalidTicker=function(){alert('Ismeretlen ticker!');unknownTicker=1;$('#fejlec, #grafikon, #koteslista, #statisztika').hide()};loadTickerData=function(force){;if(unknownTicker||!canRefresh()){return};if(intUpdater){clearInterval(intUpdater)};if(typeof force=='undefined'){force=1};try{_portfolioData('all/json/'+instrument.replace(/\//g,'_')+':interval='+interval+(force?'' : '&change='+lastrefresh)+'&resolution='+600,{_cacheTTL: instcache,headers: _pfHeaders},function(data){;if(data.error){;if(data.error.match('Unknown ticker')){invalidTicker()}else if(data.error.match('Invalid request')){setTimeout(function(){location.reload()},20000)}}else{currentInterval=interval;graphCache[interval]=data;if(data.prefix=='FX'){$('#devizakeresztek').show();$('#devizakeresztek .box-content').load('/tozsde/infopanel2017/devizakeresztek-layout.php');setTimeout('getCrossDeviza()',5000)};prefix=data.prefix;currency=data.currency;decimals=data.decimals;displayLinkedExchanges(data.prefix);loadGraphHeader(data);loadGraphs();loadBounds(data);loadBidsAsks(data);loadStatistics(data);loadDataSheet(data);loadNews(data.fname);saveHistory(data);$('#breadcrumb').html(getBreadcrumb(data.type,data.prefix,data.ticker,data.name));lastrefresh=Math.floor(new Date().getTime()/1000);intUpdater=setInterval(function(){loadTickerData()},instrefresh)}})}catch(ex){console.error(ex)}};updateGraph=function(){;if(!canRefresh())return;if(interval=='1D'||!graphCache[interval]){try{_portfolioData('chart/json/'+instrument.replace(/\//g,'_')+':interval='+interval+'&resolution='+600,{_cacheTTL: instcache,headers: _pfHeaders},function(data){currentInterval=interval;graphCache[interval]={close:data.close,imgdata:data};loadGraphs()})}catch(ex){console.error(ex)}}else{currentInterval=interval;loadGraphs()}};setGraphInterval=function(int){;if(typeof int!='undefined'){interval=int}else{interval='1D'};updateGraph();$('#intervallum button').removeClass('active');$('#b'+int).addClass('active');$('#cbZaro').parent().css('display',interval=='1D'?'inline':'none')};saveHistory=function(data){try{for(i=0;i' + graphHistory[i].name + '')}}}}catch(ex){console.error('Localstorage error',ex)}};getCrossDeviza=function(){url='/static/crossdeviza.csv?'+Math.random();$.get(url,function(data){var ary=data.split(';');var i=0;var pos=0;var oldvalue=0;var value=0;var id='';var obj=null;for(i in ary){pos=ary[i].indexOf(',');if(pos==-1)continue;id=ary[i].substring(0,pos);value=ary[i].substring(pos+1);obj=$('#'+id);oldvalue=obj.text();if(value==oldvalue)continue;dir=value>oldvalue?'up':(value