var win=null;document.addEvent('domready',function(){if($('jsUlByslider-top')){new HeinzeIconBar('jsUlByslider-top',{descriptionClass:'allIconDescription'});} if($('jsUlByslider-bottom')){new HeinzeIconBar('jsUlByslider-bottom',{descriptionClass:'allIconDescription'});} if($$('.jsAArticleFunctionsSendArticle')){$$('.jsAArticleFunctionsSendArticle').addEvent('click',function(e){e.stop();win=new Windoo({id:'windoo-sendArticle',type:'dom',resizable:false,draggable:false,height:(Browser.Engine.trident)?370:398,width:(Browser.Engine.trident)?300:320,modal:true,theme:Windoo.Themes.aero,shadow:false,title:'Diesen Artikel als E-Mail versenden',buttons:{menu:false,close:true,minimize:false,roll:false,maximize:false}}).setPosition(this.getCoordinates().left,(this.getCoordinates().bottom+4)).show();var idList=this.get('id').split('-');if(idList.length>1){var obID=idList[1];new Request.HTML({url:'/recommend/gethtml/articleId/'+obID+'#sendArticle_'+obID,onComplete:function(){win.setHTML(this.response.text);addFormSubmitButtonEvent('jsAButtonRecommendSend');addFormInputEvents('jsInputRecommend_name_f','jsLabelRecommend_name_f');addFormInputEvents('jsInputRecommend_name_l','jsLabelRecommend_name_l');addFormInputEvents('jsInputRecommend_email','jsLabelRecommend_email');addFormInputEvents('jsInputReceptor_name_f','jsLabelReceptor_name_f');addFormInputEvents('jsInputReceptor_name_l','jsLabelReceptor_name_l');addFormInputEvents('jsInputReceptor_email','jsLabelReceptor_email');addFormInputEvents('jsInputRecommend_message','jsLabelRecommend_message');}}).get();}});} if($('jsFormGetInformation')){addFormSubmitButtonEvent('jsASubmitFormGetInformation');if($('jsAConsentDeclaration')){var fxToggle=new Fx.Slide($('jsDivConsentDeclarationArea'),{duration:500,transition:Fx.Transitions.linear});fxToggle.hide();$('jsDivConsentDeclarationArea').setStyle('display','block');$('jsAConsentDeclaration').addEvent('click',function(e){new Event(e).stop();new Request.HTML({url:'/einwilligungserklaerung/2',update:$('jsDivConsentDeclaration'),onComplete:function(){fxToggle.toggle();}}).get();});} if($('jsAConsentDeclarationHide')){$('jsAConsentDeclarationHide').addEvent('click',function(e){fxToggle.toggle();});}} if($$('.jsAArticleFunctionsBookmark')){$$('.jsAArticleFunctionsBookmark').addEvent('click',function(e){e.stop();var win=new Windoo({id:'windoo-bookmark',type:'dom',resizable:false,draggable:false,height:(Browser.Engine.trident)?236:266,modal:true,theme:Windoo.Themes.aero,shadow:false,title:'Diesen Artikel bookmarken',buttons:{menu:false,close:true,minimize:false,roll:false,maximize:false}}).setPosition(this.getCoordinates().left,(this.getCoordinates().bottom+4)).show();var idList=this.get('id').split('-');if(idList.length>1){var obID=idList[1];new Request.HTML({url:'/articlefunctions/bookmark/articleId/'+obID+'#bookmarkArticle_'+obID,onComplete:function(){win.setHTML(this.response.text);}}).get();}});} makeFeedback();if($$('.jsUlArticleFunctionsRate')){$$('.jsUlArticleFunctionsRate').each(function(starrate){var stars=starrate.getElements('a');if(stars){stars.each(function(star){star.addEvent('click',function(e){var starID=star.get('id');var obID=starrate.get('id').replace(/jsUlArticleFunctions-/g,"");var rating=starID.replace(/jsAStarRating-/g,"");new Request.JSON({url:'/articlefunctions/ratearticle/',onComplete:function(response){var ratingTop=$('jsDivArticleFunctionsTop-'+obID);var ratingBottom=$('jsDivArticleFunctionsBottom-'+obID);for(ilauf=1;ilauf<=5;ilauf++){ratingTop.getElement('ul').removeClass('cssRated'+ilauf);ratingBottom.getElement('ul').removeClass('cssRated'+ilauf);} ratingTop.getElement('ul').addClass('cssRated'+Math.round(response.articleAverageRating));ratingBottom.getElement('ul').addClass('cssRated'+Math.round(response.articleAverageRating));ratingTop.getElement('.cssStarRatingResult').set('text',(Math.round(response.articleAverageRating*10)/10)+" ("+response.articleRates+")");ratingBottom.getElement('#jsArticleFunctionsRateLabelToVote').addClass('cssDisplayNone');ratingBottom.getElement('#jsArticleFunctionsRateLabelVoted').removeClass('cssDisplayNone');}}).get({'obID':obID,'rating':rating});});});}});} if($$('.jsArticleFunctionsMemory')){$$('.jsArticleFunctionsMemory').each(function(button){button.addEvent('click',function(e){var e=new Event(e).stop();var idList=this.get('id').split('-');if(idList.length>1){var obID=idList[1];new Request.HTML({update:$('jsDivMemoryBoxControlCenter'),onSuccess:function(){updateMemoryBox();heinzeTabsWritePageDot=false;heinzeTabs['jsDivControlCenterTabs'].select(heinzeTabs['jsDivControlCenterTabs'].getIndexByID('jsDivControlCenterTabsMemoryBox'));setPageDot(pagedotJSON=JSON.encode([{key:'memoryBox',value:'addArticle',obID:obID}]));var buttonText=button.getElement('.added');if(buttonText){button.set('text',buttonText.get('text'));}}.bind(this),url:'/articlememory/addarticle',data:'obID='+obID}).post();}});});}});function makeFeedback(){if($$('.jsCommentFunction')){$$('.jsCommentFunction').each(function(comment){var obID=comment.get('id').replace(/jsCommentFunction-/g,"");obID=obID.replace(/--/g,"-");if($('jsCommentInput-'+obID)){comment.removeEvents('click');comment.addEvent('click',function(e){$('jsCommentInput-'+obID).toggleClass('cssDisplayNone');if(!$('jsCommentInput-'+obID).hasClass('cssDisplayNone')){$('jsTextareaCommentBox-'+obID).focus();}});}});} if($$('.jsArticleFunctionsComment')){$$('.jsArticleFunctionsComment').each(function(comment){var obID=comment.get('id').replace(/jsDivArticleFunctionsComment-/g,"");var idList=obID.split('-');var articleID=obID;var commentID=0;if(idList.length>=1){articleID=idList[0];} if(idList.length==2){commentID=idList[1];} if(($('jsButtonSendComment-'+obID))&&($('jsTextareaCommentBox-'+obID))){$('jsButtonSendComment-'+obID).addEvent('click',function(e){if(($('jsTextareaCommentBox-'+obID).value!="")&&($('jsInputFullName-'+obID).value!="")){new Request.HTML({method:'post',evalScripts:false,url:'/articlefunctions/postcomment',onComplete:function(){setPageDot(pagedotJSON=JSON.encode([{key:'article',value:'addComment',obID:articleID}]));makeFeedback();},data:'objectid='+articleID+'&commentID='+commentID+'&name='+encodeURIComponent($('jsInputFullName-'+obID).value)+'&comment='+encodeURIComponent($('jsTextareaCommentBox-'+obID).value),update:$('cssFunctionsCommentsContent')}).post();}else{if($('jsTextareaCommentFeedback-'+obID)){$('jsTextareaCommentFeedback-'+obID).removeClass('cssDisplayNone');} if($('jsTextareaCommentBox-'+obID).value!=""){$('jsLabelCommentBox-'+obID).removeClass('error');}else{$('jsLabelCommentBox-'+obID).addClass('error');} if($('jsInputFullName-'+obID).value!=""){$('jsLabelFullName-'+obID).removeClass('error');}else{$('jsLabelFullName-'+obID).addClass('error');}}});}});}}window.addEvent('domready',function(){if($('jsMBoxMarketplaceReferrer')){$('jsMBoxMarketplaceReferrer').addEvent('click',function(){if($('allMarcetPlaceArticle')){var image=$('allMarcetPlaceArticle').getElement('.jsZoomImage');if(image){image.fireEvent('click',image);}}});}});