1function handleMsg(msg,frm){if(typeof frm=='undefined'){frm=!1} 2var omsg=msg;var success='error';var session_timeout=!1;$('#bill_details, #contract_details').find('tr td > span').each(function(){if(!$(this).hasClass('html_DOKUMENT')&&$(this).hasClass('detail_value')){$(this).html('')}});if(typeof msg=='object'){var errors=new Array();for(var i in msg){var sMessageKey=i.toString();if((i!='503'&&parseInt(i).toString()==sMessageKey)||'msg'==sMessageKey){errors.push(msg[sMessageKey])} 3else if(sMessageKey=='session_timeout'){errors.push(msg[i]);success='';session_timeout=!0} 4else if(sMessageKey=='503'){self.location.href=unescape(msg[i]);break;return !1} 5else if(frm&&frm.length){var input=frm.find('input[name="'+sMessageKey+'"]');if(0==input.length&&!1===strpos(sMessageKey,'::')){input=frm.find('input.'+sMessageKey)} 6if(0<input.length&&('text'==input.attr('type')||'password'==input.attr('type'))){input.val(unescape(msg[i]))} 7else if(0<input.length&&'checkbox'==input.attr('type')){input.prop('checked',(1==parseInt(unescape(msg[i]),10)))} 8var textarea=frm.find('textarea[name="'+sMessageKey+'"]');if(0==textarea.length&&!1===strpos(sMessageKey,'::')){textarea=frm.find('textarea.'+sMessageKey)} 9if(0<textarea.length){textarea.val(unescape(msg[i]))} 10var select=frm.find('select[name="'+sMessageKey+'"]');if(0==select.length&&!1===strpos(sMessageKey,'::')&&!1===strpos(sMessageKey,':')){select=frm.find('select.'+sMessageKey)} 11if(select.length){(!1!==strpos(unescape(msg[i]),'<option'))?select.html(unescape(msg[i])):select.val(unescape(msg[i]))} 12if(select.length&&select.closest('table.customer_address_data').length>0&&!select.attr('disabled')){select.attr('disabled','disabled')} 13var oHTMLElement=(strpos(sMessageKey,':')===!1)?$('.html_'+sMessageKey):!1;if(oHTMLElement&&oHTMLElement.length>0){switch(sMessageKey){case 'DOKUMENT':var sDokument=unescape(msg[i]);var oTrDokument=oHTMLElement.closest('tr');if('HIDDEN'!=sDokument){oHTMLElement.find('span').hide();oTrDokument.show();oHTMLElement.find('span.DOKUMENT_'+sDokument).show()} 14else{oTrDokument.hide();oTrDokument.removeClass('last')} 15break} 16if('DOKUMENT'!=sMessageKey){oHTMLElement.html(decode_utf8(unescape(msg[i])))}}} 17if('contract_template_ap_details'==sMessageKey||'contract_template_nbp_list_target'==sMessageKey||('undefined'!=typeof msg.power_sales_src&&1==parseInt(msg.power_sales_src,10)&&'contract_template_ap_target'==sMessageKey)){var sPriceTemplate=decode_utf8(unescape(msg[i]))}} 18if($('#contract_details').length>0){$('#contract_details').find('span').each(function(){var oSpanElement=$(this);var sCSSClassNames=('undefined'!=typeof oSpanElement.attr('class'))?oSpanElement.attr('class'):'';if(!1===strpos(sCSSClassNames,'ignore_fill')){var oTrSpan=oSpanElement.closest('tr');if(oSpanElement.text()==''&&!oSpanElement.hasClass('html_contract_tariff_name_detailed')){var bValid=!0;if(''!=sCSSClassNames){bValid=(strpos(sCSSClassNames,'unit')!=!1)?!1:!0} 19if(bValid&&!oTrSpan.hasClass('cc_allow')){oTrSpan.hide()}} 20else{var sSpanName='';if(''!=sCSSClassNames&&!1!==strpos(sCSSClassNames,'_html')){sSpanName=sCSSClassNames.split(' ')[0].split('_')[1].toString()} 21if('DOKUMENT'!=sSpanName){oTrSpan.show()}}}});if(!$('#contract_details').find('tr.dismissal').is(':visible')){$('#contract_details').find('tr.line:first').hide()} 22else{$('#contract_details').find('tr.line:first').show()} 23$('#contract_details').parent().show();if(!$('#contract_details tr:visible:last').hasClass('last')){$('#contract_details tr:visible:last').addClass('last')} 24$('#contract_details').parent().hide();$('#contract_details ._juhu_price_table').remove();$('#contract_details ._price_table').remove();$('#contract_details .taxes_info').hide();if('undefined'!=typeof sPriceTemplate&&''!=sPriceTemplate){$('#contract_details .preisliste:first').after(sPriceTemplate);$('#contract_details .taxes_info').show()}} 25if($('#bill_details').length>0){$('#bill_details').find('span').each(function(){var span=$(this);if(span.text()==''){var valid=!0;if(span.attr('class')){var classname=span.attr('class');valid=(strpos(classname,'Einheit')!==!1)?!1:!0} 26if(valid){span.parent().parent().hide()}} 27else{span.parent().parent().show()}});$('#bill_details').parent().show();if(!$('#bill_details tr:visible:last').hasClass('last')){$('#bill_details tr:visible:last').addClass('last')} 28$('#bill_details').parent().hide()} 29if(msg!=null)msg=(msg.result)?unescape(msg.result)+errors.join('::'):errors.join('::')} 30if(msg!=null){if(msg.toString().substr(0,3)=='ok:'){msg=msg.substr(3).split('::');success='ok'} 31else if(msg.toString().substr(0,6)=='error:'){msg=msg.substr(6).split('::');success='error'} 32else if(msg.length){msg=msg.split('::')} 33if(msg.length){var output=((msg.length==1)?msg[0]:msg.join("\n"));if(output.length&&('undefined'==typeof omsg.register_box||'auto'==omsg.register_box)){msgBox(output,success,session_timeout)} 34else if('pin'==omsg.register_box){msgBoxPin(omsg.customer_number,output)}}} 35if(_IE&&$('#kundenbereich').css('display')=='none')$('#kundenbereich').show();return success} 36function initMessages(){var count=0;$('.msg_timed').each(function(){var timer=$(this);if(timer.hasClass('inited'))return;timer.addClass('inited');setTimeout(function(){timer.data('h',timer.height());timer.animate({height:'10px',opacity:'hide'},300,function(){timer.addClass('collapsed')})},++count*1+100);timer.click(function(){if(timer.hasClass('collapsed')){timer.animate({height:timer.data('h')+'px',opacity:'show'},200);timer.removeClass('collapsed')}else{timer.animate({height:'10px',opacity:'hide'},250,function(){timer.addClass('collapsed')})}})})} 37function addMessage(str,timed){if('undefined'==typeof timed){timed=!1} 38var ct=$('#msg div.ct');if(timed){ct.append('<div class="item">'+str+'</div>')}else{ct.append('<div class="timed"><div class="item">'+str+'</div></div>')} 39initMessages()} 40function msgOverlayHide(sBoxType){if('undefined'!=typeof sBoxType&&'error'==sBoxType){$('body .preloader').remove()} 41if($('body').find('#msgbox_bg:first').is(':visible')){$('#msgbox_bg').remove()} 42if($('body').find('#msgbox:first').is(':visible')){$('#msgbox').remove()}} 43function msgBox(sMessage,sMessageBoxType,bSessionTimeout,bSplitMessageByEnter,sOkButtonText){bSessionTimeout=(typeof bSessionTimeout=='undefined')?!1:bSessionTimeout;bSplitMessageByEnter=(typeof bSplitMessageByEnter=='undefined')?!0:bSplitMessageByEnter;sMessageBoxType=(typeof sMessageBoxType=='undefined')?'':sMessageBoxType;if('undefined'==typeof sOkButtonText){sOkButtonText='Ok'} 44var sMessageBoxTitle='';var sMessageOutput='';var iC=0;if(bSplitMessageByEnter){sMessage=unescape(sMessage).replace(/\[:enter:\]/g,"\n");var aMessageList=sMessage.split("\n")} 45else if(!is_array(sMessage)||'undefined'==typeof sMessage[0]){var aMessageHoldCache=[];aMessageHoldCache[0]=sMessage;var aMessageList=aMessageHoldCache} 46var k,sMessageHoldCache,sSearchHoldCache,iFindPosition;for(k=0;k<aMessageList.length;k++){sMessageHoldCache=aMessageList[k];if('line_wrap'==sMessageHoldCache.toLowerCase()){sMessageOutput+='<li class="line_wrap no_icon"> </li>'} 47else if(!1!==strpos(sMessageHoldCache,'Warnung: ')){sSearchHoldCache='Warnung: ';iFindPosition=parseInt(strpos(sMessageHoldCache,sSearchHoldCache))+sSearchHoldCache.length;sMessageHoldCache=sMessageHoldCache.substring(iFindPosition);sMessageOutput+='<li class="warning">'+sMessageHoldCache+'</li>'} 48else if(!1!==strpos(sMessageHoldCache,'Textblock: ')){sSearchHoldCache='Textblock: ';iFindPosition=parseInt(strpos(sMessageHoldCache,sSearchHoldCache))+sSearchHoldCache.length;sMessageHoldCache=sMessageHoldCache.substring(iFindPosition);sMessageOutput+='<li class="no_icon">'+sMessageHoldCache+'</li>'} 49else if('pin'==sMessageBoxType||'confirm'==sMessageBoxType){sMessageOutput+='<li class="no_icon">'+sMessageHoldCache+'</li>'} 50else if('tipp'==sMessageBoxType){if(sMessageHoldCache.match(/<br>/g)){var sMessageHoldCache=sMessageHoldCache.replace(/<br>/g,'<br>')} 51sMessageOutput+='<li class="no_icon">'+sMessageHoldCache+'</li>'} 52else{if(bSplitMessageByEnter&&0<iC){sMessageOutput+='<li class="no_icon">'+sMessageHoldCache+'</li>'} 53else{sMessageOutput+='<li>'+sMessageHoldCache+'</li>';iC++}}} 54switch(sMessageBoxType){case 'safe_mode':sMessageBoxTitle=('undefined'!=typeof _LABEL_MSG_TITLE_SAFE_MODE)?_LABEL_MSG_TITLE_SAFE_MODE:'Sicherheitsmeldung';break;case 'error_data':sMessageBoxTitle=('undefined'!=typeof _LABEL_MSG_TITLE_ERROR_DATA)?_LABEL_MSG_TITLE_ERROR_DATA:'Unvollständige Daten';break;case 'error':sMessageBoxTitle=('undefined'!=typeof _LABEL_MSG_TITLE_ERROR)?_LABEL_MSG_TITLE_ERROR:'Fehler';break;case 'pin':sMessageBoxTitle=('undefined'!=typeof _LABEL_MSG_TITLE_PIN)?_LABEL_MSG_TITLE_PIN:'PIN-Abfrage';break;case 'confirm':sMessageBoxTitle=('undefined'!=typeof _LABEL_MSG_TITLE_DEFAULT)?_LABEL_MSG_TITLE_DEFAULT:'Hinweis';break;case 'tipp':sMessageBoxTitle=('undefined'!=typeof _LABEL_MSG_TITLE_TIPP)?_LABEL_MSG_TITLE_TIPP:'Hinweis';break;default:sMessageBoxTitle=('undefined'!=typeof _LABEL_MSG_TITLE_DEFAULT)?_LABEL_MSG_TITLE_DEFAULT:'Hinweis';sMessageBoxType='info'} 55$('body').append(''+'<div id="msgbox_bg" class="msgbox_bg"></div>'+'<div id="msgbox" class="'+sMessageBoxType+'">'+'<h1>'+sMessageBoxTitle+'</h1>'+'<div class="msg">'+'<div class="msg_close"></div>'+'<ul>'+sMessageOutput+'</ul>'+(('pin'!=sMessageBoxType&&'confirm'!=sMessageBoxType)?('<div class="tcenter _mTop10">'+'<div class="btn_wrapper">'+'<a id="_ok" class="global_button" href="javascript:void(0);" title="'+sOkButtonText+'">'+sOkButtonText+'</a>
55'+'</div>'+'</div>'):'')+'</div>'+'</div>'+'');if(!bSessionTimeout){initMessageBoxClickEvent(sMessageBoxType)} 56else{$(window).off('mousedown');$(window).on('mousedown',function(){var ref=self.location.href;var adr=ref.replace(/(.*)$/,'$1');self.location.href=adr;return !1})}} 57function initMessageBoxClickEvent(sMessageBoxType){var oMessageBoxElement=$('#msgbox:first');var oMessageBoxWrapperElement=$('#msgbox_bg:first');oMessageBoxWrapperElement.off('click');oMessageBoxWrapperElement.on('click',function(oEvent){if($(this).is(':visible')){msgOverlayHide(sMessageBoxType)}});oMessageBoxElement.off('click');oMessageBoxElement.on('click',function(oEvent){if($(this).is(':visible')){msgOverlayHide(sMessageBoxType)}})} 58function removeMessageBoxClickEvent(){var oMessageBoxElement=$('#msgbox:first');var oMessageBoxWrapperElement=$('#msgbox_bg:first');oMessageBoxElement.off('click');oMessageBoxWrapperElement.off('click')} 59function msgBoxRegister(sMsg,bError,bSplitMessageByEnter,bPasswordCreateQuestion,sPasswordResetToken){if('undefined'==typeof sMsg){sMsg=MSG_SYSTEM_DEFAULT_ERROR;bError=!0} 60if('undefined'==typeof bError){bError=!1} 61if('undefined'==typeof bPasswordCreateQuestion){bPasswordCreateQuestion=!1} 62if('undefined'==typeof sPasswordResetToken){sPasswordResetToken=''} 63if(bError){msgBox(sMsg,'error',!1,bSplitMessageByEnter)} 64else{msgBox(sMsg,'info',!1,bSplitMessageByEnter)} 65removeMessageBoxClickEvent();$(window).off();$(window).on('mousedown',function(){if(_IFRAME&&!bPasswordCreateQuestion){window.parent.location.href=_PORTAL_PARENT_DOMAIN} 66else{if(!bPasswordCreateQuestion){self.location.href=self.location.protocol+'//'+self.location.host+_EXTENSION_URL_ROOT} 67else{self.location.href=self.location.protocol+'//'+self.location.host+_EXTENSION_URL_ROOT+_EXTENSION_URL_PASSWORD_FORGET+'?reset_token='+sPasswordResetToken}} 68return !1})} 69function msgBoxPin(sCustomerNumber,sMsg){sMessageBoxContent=trim(''+'<div class="pin_wrapper">'+'<div>'+sMsg+'</div>'+'<div class="pin_input">'+'<input id="msg_pin" type="text" value="" />'+'</div>'+'<div class="pin_button _mTop10">'+'<div class="btn_wrapper">'+'<a class="global_button send_pin"'+'title="'+_LABEL_REGISTER_USER_ACCOUNT_UNLOCK_BUTTON+'">'+_LABEL_REGISTER_USER_ACCOUNT_UNLOCK_BUTTON+'</a>'+'</div>'+'</div>'+'</div>'+'');msgBox(sMessageBoxContent,'pin');var oInputElement=$('.pin_wrapper input[type="text"]:first');oInputElement.focus();oInputElement.off('mouseover');oInputElement.on('mouseover',function(oEvent){removeMessageBoxClickEvent()});oInputElement.off('mouseout');oInputElement.on('mouseout',function(oEvent){initMessageBoxClickEvent()});var oAnchorElement=$('#msgbox .pin_wrapper:first').find('a.send_pin:first');oAnchorElement.off('mouseover');oAnchorElement.on('mouseover',function(oEvent){removeMessageBoxClickEvent()});oAnchorElement.off('mouseout');oAnchorElement.on('mouseout',function(oEvent){initMessageBoxClickEvent()});oAnchorElement.off('click');oAnchorElement.on('click',function(){var sPin=$('#msg_pin').val();msgOverlayHide();$('#kundenbereich').hide();var oAJAX,aAJAXData;var aAJAXData={process:_EXTENSION_URL_REGISTER_USER,checkPIN:'checkPIN',customer_number:sCustomerNumber,pin:sPin};_AJAX_REQUEST.init();_AJAX_REQUEST.setRequestData(aAJAXData);oAJAX=_AJAX_REQUEST.doRequest();oAJAX.done(function(oResult,textStatus,jqXHR){var bSuccess=handleMsg(oResult);if('ok'==bSuccess){if(typeof oResult.request_extension_url!='undefined'&&typeof oResult.request_extension_url_parameter!='undefined'&&typeof handleResponseForRegisterUser=='function'){handleResponseForRegisterUser(oResult)}} 70else{$('#kundenbereich').show()}})})} 71function msgBoxConfirm(sMsg,_sCF,label_yes,label_no){if('undefined'==typeof label_yes){label_yes='Ok'} 72if('undefined'==typeof label_no){label_no='Abbrechen'} 73sMessageBoxContent=trim(''+'<div class="confirm_wrapper">'+'<div>'+sMsg+'</div>'+'<div class="confirm_button _mTop30 tright">'+'<div class="btn_wrapper">'+'<a class="global_button confirm_ok fleft" title="'+label_yes+'">'+label_yes+'</a>'+'</div>'+'<div class="btn_wrapper">'+'<a class="global_button confirm_abort fleft _mLeft10" title="'+label_no+'">'+label_no+'</a>
73'+'</div>'+'<div class="clear_left"></div'+'</div>'+'</div>'+'');msgBox(sMessageBoxContent,'confirm',!1,!1);var oAnchorElementOk=$('#msgbox .confirm_wrapper:first').find('a.confirm_ok:first');oAnchorElementOk.off('click');oAnchorElementOk.on('click',function(){if('function'==typeof _sCF){_sCF(!0)} 74msgOverlayHide()});var oAnchorElementAbort=$('#msgbox .confirm_wrapper:first').find('a.confirm_abort:first');oAnchorElementAbort.off('click');oAnchorElementAbort.on('click',function(){if('function'==typeof _sCF){_sCF(!1)} 75msgOverlayHide()})} 76function msgBoxHTML(sMsg,_sCF,label_yes){if('undefined'==typeof label_yes){label_yes='Ok'} 77sMessageBoxContent=trim(''+'<div class="confirm_wrapper">'+'<div>'+sMsg+'</div>'+'<div class="confirm_button _mTop30 tright">'+'<div class="btn_wrapper">'+'<a class="global_button confirm_ok" title="Ok">'+label_yes+'</a>'+'</div>'+'</div>'+'</div>'+'');msgBox(sMessageBoxContent,'confirm',!1,!1);var oAnchorElementOk=$('#msgbox .confirm_wrapper:first').find('a.confirm_ok:first');oAnchorElementOk.off('click');oAnchorElementOk.on('click',function(){if('function'==typeof _sCF){_sCF(!1)} 78msgOverlayHide()})}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.