function trim_nbsp(zeichenkette){return zeichenkette.replace(/\&\bnbsp\;/g,"").replace(/[\s\u00A0\u2028\u2029]+/g,"")}function startCalculate(menge,liefer,bestBuy){if(menge!=null){allAmountsPrices=menge}if(liefer!=null){allDispatchPrices=liefer}if(bestBuy!=null){isBestBuy=bestBuy}selVersand=$("lieferzeit")[$("lieferzeit").selectedIndex].value;show_prices("menge",allAmountsPrices);show_prices("lieferzeit",allDispatchPrices);checkBestBuy();if(isBestBuy==1){changeBestBuyImages("active")}else{changeBestBuyImages("inactive")}}function bestbuyActiveCheck(){}function checkIndMenge(){document.getElementById("auflageSt").value=standartmengeArray[0];document.getElementById("auflageSt").style.color="#aaaaaa";if(document.calcform.auflageInd.value==menge){document.calcform.auflageInd.value="";document.calcform.auflageInd.style.color="#000000";document.calcform.auflageInd.maxLength=auflage_max.length}}function setStMenge(){document.getElementById("auflageSt").style.color="#000000";document.calcform.auflageInd.maxLength=menge.length;document.calcform.auflageInd.value=menge;document.calcform.auflageInd.style.color="#aaaaaa"}function checkMenge(){if(document.calcform.auflage.value==menge){document.calcform.auflage.value="";document.calcform.auflage.style.color="#000000";document.calcform.auflage.maxLength="5"}}function evalKeyForCalculation(event){if(event&&event.which==13||event&&event.keyCode==13){prepare_calculation("calculateGo")}else{return true}}var brows="";var pro="Flyer";var pro_id="";var bgrd_over="";var size="";var size_contbut="";var selected_z=0;var mengeHead;attributesToCheck=new Array();attributesToCheck=bestBuyAttributes;if($("box_products")){attributesToCheck.push("format-2527")}produktwahl=new Array();if(Prototype.Browser.IE){brows="ie"}else{if(Prototype.Browser.Gecko){brows="ff"}else{if(Prototype.Browser.WebKit){brows="sf"}else{brows="ff"}}}if(brows=="sf"){bgrd_over="#3875d7"}else{bgrd_over="#316ac5"}Event.observe(window,"load",function(){var clickObserver;if(brows=="ie"){clickObserver=document.body}else{clickObserver=window}Event.observe(clickObserver,"click",function(event){var element=Event.element(event);if(!element.hasClassName("oberbox_but_right")&&!element.hasClassName("box_span")&&!element.hasClassName("box_content_but")&&!element.hasClassName("menue_head")&&!element.hasClassName("menue_title")&&!element.hasClassName("menue_icon")&&!element.hasClassName("oberbox_button")&&!element.hasClassName("menge_col1")&&!element.hasClassName("menge_col2")&&!element.hasClassName("menge_col3")&&!element.hasClassName("lieferzeit_col1")&&!element.hasClassName("lieferzeit_col2")&&!element.hasClassName("lieferzeit_col3")&&!element.hasClassName("sub_menue_head")){$$("div.box_auswahl").each(function(item){item.setStyle({display:"none"})});$$("a.oberbox_but_right").each(function(item){item.setStyle({backgroundPosition:"0 0"})});if(mengeHead!=null){$("inhalt_menge").innerHTML=mengeHead}if($("menge_image_bb")){$("menge_image_bb").setStyle({display:"inline"})}}});Event.observe(clickObserver,"keypress",function(event){var element=Event.element(event);if(event.keyCode==Event.KEY_ESC){$$("div.box_auswahl").each(function(item){item.setStyle({display:"none"})});$$("a.oberbox_but_right").each(function(item){item.setStyle({backgroundPosition:"0 0"})})}if(event.keyCode==Event.KEY_UP||event.keyCode==Event.KEY_LEFT){var fake_select=Event.findElement(event,"a");var real_id;var real_selected_index;if(fake_select&&fake_select.hasClassName("oberbox_button")){real_id=fake_select.id.replace(/ob_/,"");real_id=real_id.replace(/_\d+/,"");real_selected_index=$(real_id).selectedIndex;if(real_selected_index!=0){$(real_id).options[real_selected_index-1].selected="true"}if($(real_id).readAttribute("onchange")!=null){$(real_id).onchange()}}}if(event.keyCode==Event.KEY_DOWN||event.keyCode==Event.KEY_RIGHT){var fake_select=Event.findElement(event,"a");var real_id;var real_selected_index;if(fake_select&&fake_select.hasClassName("oberbox_button")){real_id=fake_select.id.replace(/ob_/,"");real_id=real_id.replace(/_\d+/,"");real_selected_index=$(real_id).selectedIndex;if(real_selected_index<($(real_id).length-1)){$(real_id).options[real_selected_index+1].selected="true"}if($(real_id).readAttribute("onchange")!=null){$(real_id).onchange()}}}})});var obox_left="obox_"+brows+"_left.gif";var obox_center="obox_"+brows+"_center.gif";var obox_right="obox_"+brows+"_right.gif";var box1="";var box2="";var box3="";var box4="";var box5="";var box6="";var inhalt="";function get_id(box){box_id=new Array();box_id=box.split("_");if(box_id.length>=3){box_id.pop();box_id.shift()}else{box_id.shift()}return box_id.join("_")}function get_sz(box){box_sz=new Array();box_sz=box.split("_");var elem=box_sz[(box_sz.length-1)];return elem}function new_select(box,gross){size=gross;size_contbut=size-3;var size_contbut_ie=size-2;var size_txtbut=size-25;var real_value;var isNew=0;var newPic;var marg;if(box=="menge"){marg="margin: 10px 0 0 113px;"}else{if(box=="lieferzeit"){marg="margin: 19px 0 0 0;"}else{marg=""}}newPic=productBoxUrl.replace(/buttons./,"new_product.gif");box1=box;box2="auswahl_"+box;box3="but_"+box+"_"+size;box4="box_"+box;box5="inhalt_"+box;box6="ob_"+box+"_"+size;var box_image=box+"_image";var i=0;while(i<$(box1).options.length){if(brows=="sf"&&box!="products"&&box!="product_select"&&box!="auflage_input"){attributesToCheck.each(function(bestBuyValue){if($(box1).options[i].value==bestBuyValue&&$(box1).options[i].selected==false){inhalt=$(box1).options[i].innerHTML;$(box1).options[i].selected=true}else{inhalt=$(box1).options[i].innerHTML}})}else{if($(box1).options[i].selected==true){inhalt=$(box1).options[i].innerHTML}}i++}inhalt_temp="";if($("products")){real_value=$("products")[$("products").selectedIndex].value;if($($("products")[$("products").selectedIndex]).readAttribute("new")=="true"){isNew=1}}else{if($("product_select")){real_value=$("product_select")[$("product_select").selectedIndex].value;if($($("product_select")[$("product_select").selectedIndex]).readAttribute("new")=="true"){isNew=1}}}if($(box1).id=="products"||$(box1).id=="product_select"){if(real_value){allBestBuyProducts.each(function(product){if(real_value.search(product)!=-1){inhalt_temp="<div class='oberbox_cont seltxt'><a id='"+box6+"' href='' rel='nofollow' onclick='box_open(this); return false;' class='oberbox_button' style='width: "+size_txtbut+"px;'><span class='box_span' id='"+box5+"'>"+inhalt+"</span><span id='"+box_image+"'><img style='position: absolute; top: 3px; _top: 0; right: 20px; _right: 1px;' src='"+selectBoxUrl+"bestbuy.gif'  border='0' /></span></a></div>"}})}if(isNew==1){inhalt_temp="<div class='oberbox_cont seltxt'><a id='"+box6+"' href='' rel='nofollow' onclick='box_open(this); return false;' class='oberbox_button' style='width: "+size_txtbut+"px;'><span class='box_span' id='"+box5+"'>"+inhalt+"</span><span id='"+box_image+"'><img style='position: absolute; top: 3px; _top: 0; right: 20px; _right: 1px;' src='"+newPic+"'  border='0' /></span></a></div>"}}attributesToCheck.each(function(item){if(($(box1).options[$(box1).options.selectedIndex].value==item)||($(box1).id=="producttype")){inhalt_temp="<div class='oberbox_cont seltxt'><a id='"+box6+"' href='' rel='nofollow' onclick='box_open(this); return false;' class='oberbox_button' style='width: "+size_txtbut+"px;'><span class='box_span' id='"+box5+"'>"+inhalt+"</span><span id='"+box+"_image'><img id='"+box+"_image_bb' style='position: absolute; top: 3px; _top:0; right: 20px; _right: 1px;' src='"+selectBoxUrl+"bestB.gif'  border='0' /></span></a></div>"}});if(box1=="lieferzeit"){inhalt_temp="<div class='oberbox_cont seltxt'><a id='"+box6+"' href='' rel='nofollow' onclick='return false;' class='oberbox_button' style='width: "+(size_txtbut-20)+"px;'><span class='box_span' id='"+box5+"'></span><span id='"+box+"_image'></a></div>"}if(box=="linien"||((attributesToCheck.join(" ")=="empty")&&($(box1).id!="products"&&$(box1).id!="product_select"))){inhalt_temp=""}if($(box1).id=="auflage_input"){if($($(box1)[$(box1).options.selectedIndex]).readAttribute("bestbuy")=="true"){inhalt_temp="<div class='oberbox_cont seltxt'><a id='"+box6+"' href='' rel='nofollow' onclick='box_open(this); return false;' class='oberbox_button' style='width: "+size_txtbut+"px;'><span class='box_span' id='"+box5+"'>"+inhalt+"</span><span id='auflage_input_image'><img id='auflage_input_image_bb' style='position: absolute; top: 3px; _top: 0; right: 20px; _right: 1px;' src='"+selectBoxUrl+"bestB.gif'  border='0' /></span></a></div>"}}if(inhalt_temp==""){inhalt_temp="<div class='oberbox_cont seltxt'><a id='"+box6+"' href='' rel='nofollow' onclick='box_open(this); return false;' class='oberbox_button' style='width: "+size_txtbut+"px;' ><span class='box_span' id='"+box5+"'>"+inhalt+"</span><span id='"+box+"_image'></span></a></div>"}if(box1!="lieferzeit"){document.write("<div id='"+box4+"' class='oberbox' style=' width: "+size+"px;float:right;background-image: url("+selectBoxUrl+obox_center+");'>");document.write("<div class='oberbox_left'><img src='"+selectBoxUrl+obox_left+"' class='img_left' width='4' height='20' border='0' vspace='0' hspace='1' /></div>");document.write(inhalt_temp);document.write("<div class='oberbox_right'><a id='"+box3+"' href='' rel='nofollow' onclick='box_open(this); return false;' class='oberbox_but_right'  style='background-image: url("+selectBoxUrl+obox_right+"); background-repeat:no-repeat;'></a></div>");document.write("</div>");document.write("<div class='Clear' style='margin-bottom:-11px;'></div>")}else{document.write("<div id='"+box4+"' class='oberbox_lieferzeit' style=' width: "+(size-1)+"px; float:left; height: 18px; margin-right: 2px; _margin-right: 3px;'>");document.write("<div class='oberbox_left_lieferzeit'></div>");document.write(inhalt_temp);document.write("<div class='oberbox_right' style='height: 18px;'><a id='"+box3+"' href='' rel='nofollow' class='oberbox_but_right' style='height: 18px;'></a></div>");document.write("</div>");document.write("<div class='Clear'></div>")}if(box=="products"){document.write("<div id='"+box2+"' class='box_auswahl' style='width: "+size_contbut+"px; _width: "+size_contbut_ie+"px; position:absolute; margin:9px 0 0 113px; _margin:9px 0 0 -120px; z-index:9999;"+marg+"'></div>")}else{if(box=="product_select"){document.write("<div id='"+box2+"' class='box_auswahl' style='width: "+size_contbut+"px; _width: "+size_contbut_ie+"px; position:absolute; margin:19px 0 0 -2px; _margin: 18px 0 0 -108px; z-index:9999;"+marg+"'></div>")}else{if(box=="menge"){document.write("<div id='"+box2+"' class='box_auswahl' style='width: "+size_contbut+"px; _width: "+size_contbut_ie+"px; position:absolute; z-index:9999; margin:10px 0 0 113px; _margin:9px 0 0 -120px; '></div>")}else{if(box=="lieferzeit"){document.write("<div id='"+box2+"' class='box_auswahl_lieferzeit' style='width: "+(size_contbut+2)+"px; _width: "+(size_contbut_ie*1-3)+"px; margin-right: 2px; _margin-right: 3px;'></div>")}else{document.write("<div id='"+box2+"' class='box_auswahl' style='width: "+size_contbut+"px; _width: "+size_contbut_ie+"px; position:absolute; z-index:9999;"+marg+"'></div>")}}}}}function box_open(obj){var size_box=get_sz(obj.id);box1=get_id(obj.id);if(document.URL.search("foc")!=-1&&document.URL.search("visitenkarten")!=-1&&box1=="lieferzeit"){return 0}var size_selbut=size_box-3;var size_selbut_ie=size_box-1;var productIsBestBuy=0;box1=get_id(obj.id);box2="auswahl_"+box1;box3="but_"+box1+"_"+size_box;box5="inhalt_"+box1;var bestBuyImg;var produkt="";if($("products")){produkt=$("products")[$("products").selectedIndex].value;allBestBuyProducts.each(function(product){if("pw_"+product==$("products")[$("products").selectedIndex].value){productIsBestBuy=1}})}else{if($("product_select")){produkt=$("product_select")[$("product_select").selectedIndex].value;allBestBuyProducts.each(function(product){if("pw_"+product==$("product_select")[$("product_select").selectedIndex].value){productIsBestBuy=1}})}}$$("div.box_auswahl").each(function(item){if(item.id!=box2){item.setStyle({display:"none"})}});if(mengeHead!=null&&box1!="menge"){$("inhalt_menge").innerHTML=mengeHead}$$("a.oberbox_but_right").each(function(item){item.setStyle({backgroundPosition:"0 0"})});var link="";var link1="";var box_content="";var i=0;var boxOpenBestBuyImage="";if(!$(box2).style.display||$(box2).style.display=="none"){if(box1=="products"||box1=="product_select"){$(box2).innerHTML="";productsmenu("bestseller");$("m_bestseller").onclick()}else{if(box1=="menge"){if($("menge_image_bb")){$("menge_image_bb").setStyle({display:"none"})}if(box1=="menge"&&mengeHead==null){mengeHead=$("inhalt_menge").innerHTML}var col2topWidth;if($("menge0_col2")){col2topWidth=($("menge0_col2").getStyle("width").replace(/px/,""))}if(produkt=="pw_kopierpapier"){$("inhalt_menge").innerHTML="<div id='col1' class='menge_col1' style='text-align: left;'>"+menge_preis+"<div style='float: right; margin-right: -16px;'>"+menge_pack+"</div></div><div id='col2netto' class='menge_col2' style='width: "+col2topWidth+"px; text-align: left;'>"+menge_netto+" </div><div style='float:left;'>|</div><div id='col2brutto' class='menge_col3' style='width: "+$("menge0_col3").getStyle("width")+"; text-align: left;'>"+menge_brutto+"</div>"}else{$("inhalt_menge").innerHTML="<div id='col1' class='menge_col1' style='text-align: left;'>"+menge_preis+"</div><div id='col2netto' class='menge_col2' style='width: "+col2topWidth+"px; text-align: left;'>"+menge_netto+" </div><div style='float:left;'>|</div><div id='col2brutto' class='menge_col3' style='width: "+$("menge0_col3").getStyle("width")+"; text-align: left;'>"+menge_brutto+"</div>"}if(mengenpreisbreite<$("col1").getWidth()){}else{$("col1").setStyle({width:mengenpreisbreite})}$(box2).setStyle({display:"block"});var diff=$("col1").getWidth()-mengenpreisbreite;if(mengenpreisbreite<$("col1").getWidth()){$$("div.menge_col2").each(function(item){item.setStyle({width:(item.getWidth()+diff)})})}else{diff=0}if($("letztemenge")&&$("menge0_col2")){if(produkt=="pw_kopierpapier"){$("col2netto").setStyle({marginLeft:($("menge0_col2").getWidth()-$("letztemenge").getWidth()+15)})}else{$("col2netto").setStyle({marginLeft:($("menge0_col2").getWidth()-$("letztemenge").getWidth()-diff)})}$("col2netto").setStyle({width:($("menge0_col2").getWidth()-($("menge0_col2").getWidth()-$("letztemenge").getWidth()))});if($$("div.letztemengebruttodiv")[0]&&$("letztemengebrutto")){$("col2brutto").setStyle({marginLeft:($$("div.letztemengebruttodiv")[0].getWidth()-$("letztemengebrutto").getWidth())})}}}else{if(box1=="lieferzeit"){$(box2).setStyle({display:"block"})}else{while(i<$(box1).options.length){link="sub"+i+"_"+box1+"_"+size_box;link1="link"+i+"_"+box1+"_"+size_box;var bcol="";if($(box1).options[i].selected==true){bcol="background-color: "+bgrd_over+"; color: #fff; text-decoration: none;"}box_content=box_content+"<div id='"+link+"' class='box_content' style='width: "+size_selbut+"px;' onmouseover='changebgd(this)' onmouseout='changebgd(this)' onclick='doit(this)'>";box_content_link="";boxOpenBestBuyImage="";attributesToCheck.each(function(item){bestBuyImg="bestB.gif";if(($(box1).options[i].value==item||$(box1).id=="producttype")){box_content_link="<div id='"+link1+"' class='box_content_but'>"+$(box1).options[i].innerHTML+"</div><span id='"+box1+"_image' onmouseover='tt_show(this);' onmouseout='tt_hide();'><img id=\"bb_img_menu\" style=\"position: absolute; top: 0px; _top: 0; right: 17px; _right: 18px;\" src=\""+selectBoxUrl+bestBuyImg+'" alt="bestbuy" border="0" /></span>';boxOpenBestBuyImage='<img id="bb_img_menu" style="position: absolute; top: 0px; _top: 0; right: 17px; _right: 18px;" src="'+selectBoxUrl+bestBuyImg+'" alt="bestbuy" border="0" />'}});if(box1=="seiten"){if($(box1).options[i].innerHTML.search(/\d/)!="-1"&&$(box1).options[i].innerHTML.search(/\d/)=="0"){if($(box1).options[i].innerHTML.search(/\d\d/)!="-1"){box_content_link="<div id='"+link1+"' class='box_content_but'>"+$(box1).options[i].innerHTML+"</div><span id='"+box1+"_image' onmouseover='tt_show(this);' onmouseout='tt_hide();'>"+boxOpenBestBuyImage+"</span>"}else{box_content_link="<div id='"+link1+"' class='box_content_but'>&nbsp;&nbsp;"+$(box1).options[i].innerHTML+"</div><span id='"+box1+"_image' onmouseover='tt_show(this);' onmouseout='tt_hide();'>"+boxOpenBestBuyImage+"</span>"}}else{if($(box1).options[i].innerHTML.search(/\d/)!="-1"&&$(box1).options[i].innerHTML.search(/\d/)!="0"){if($(box1).options[i].innerHTML.search(/\d\d/)=="-1"){box_content_link="<div id='"+link1+"' class='box_content_but'>"+$(box1).options[i].innerHTML.replace(/\s/,"&nbsp;&nbsp;")+"</div><span id='"+box1+"_image' onmouseover='tt_show(this);' onmouseout='tt_hide();'>"+boxOpenBestBuyImage+"</span>"}}else{box_content_link="<div id='"+link1+"' class='box_content_but'>"+$(box1).options[i].innerHTML+"</div><span id='"+box1+"_image'>"+boxOpenBestBuyImage+"</span>"}}if((produkt=="pw_postcard"||produkt=="pw_visitenkarten")&&box1=="seiten"&&kalk_language=="en"){if(box_content_link.search("&nbsp;")>0){box_content_link=box_content_link.split(box_content_link)[0]+box_content_link.split(box_content_link)[0]}}}if(box1=="format"){contentFormat=$(box1).options[i].innerHTML.split("x");if(contentFormat[0].length=="3"&&contentFormat[1].search("mm")=="4"){box_content_link="<div id='"+link1+"' class='box_content_but'>&nbsp;&nbsp;"+contentFormat[0]+"x&nbsp;&nbsp;"+contentFormat[1]+"</div><span id='"+box1+"_image' onmouseover='tt_show(this);' onmouseout='tt_hide();'>"+boxOpenBestBuyImage+"</span>"}else{if(contentFormat[0].length=="3"&&contentFormat[1].search("mm")=="5"){box_content_link="<div id='"+link1+"' class='box_content_but'>&nbsp;&nbsp;"+contentFormat[0]+"x"+contentFormat[1]+"</div><span id='"+box1+"_image' onmouseover='tt_show(this);' onmouseout='tt_hide();'>"+boxOpenBestBuyImage+"</span>"}else{if(contentFormat[0].length=="4"&&contentFormat[1].search("mm")=="4"){box_content_link="<div id='"+link1+"' class='box_content_but'>"+contentFormat[0]+"x&nbsp;&nbsp;"+contentFormat[1]+"</div><span id='"+box1+"_image' onmouseover='tt_show(this);' onmouseout='tt_hide();'>"+boxOpenBestBuyImage+"</span>"}else{box_content_link="<div id='"+link1+"' class='box_content_but'>"+$(box1).options[i].innerHTML+"</div><span id='"+box1+"_image' onmouseover='tt_show(this);' onmouseout='tt_hide();'>"+boxOpenBestBuyImage+"</span>"}}}}if((box1=="linien")||(attributesToCheck.join(" ")=="empty")){box_content_link="";boxOpenBestBuyImage=""}if(box1=="grammatur"){var papierSplit=$(box1).options[i].innerHTML.split(" ");var fill="";if(papierSplit[0].length<3){fill="&nbsp;&nbsp;"+$(box1).options[i].innerHTML}else{if(papierSplit[0].length>4&&papierSplit[1].length<3){ik=0;while(ik<papierSplit.length){fill+=papierSplit[ik];if(ik==0){fill+="&nbsp;&nbsp;&nbsp;"}else{fill+="&nbsp;"}ik++}}else{fill=$(box1).options[i].innerHTML}}box_content_link="<div id='"+link1+"' class='box_content_but'>"+fill+"</div><span id='"+box1+"_image' onmouseover='tt_show(this);' onmouseout='tt_hide();'>"+boxOpenBestBuyImage+"</span>"}if(productIsBestBuy==1&&box1=="auflage_input"){if($($(box1).options[i]).readAttribute("bestbuy")=="true"){box_content_link="<div id='"+link1+"' class='box_content_but'>"+$(box1).options[i].innerHTML+"</div><span id='"+box1+'_image\'><img id="auflage_input_image_bb" style="position: absolute; top: 0px; _top: 0; right: 17px; _right: 18px;" src="'+selectBoxUrl+bestBuyImg+'" alt="bestbuy" border="0" /></span>'}}if(box_content_link==""){box_content_link="<div id='"+link1+"' class='box_content_but'>"+$(box1).options[i].innerHTML+"</div><span id='"+box1+"_image'>"+boxOpenBestBuyImage+"</span>"}box_content=box_content+box_content_link;box_content=box_content+"</div>";i++}$(box2).innerHTML=box_content;if(size_box==330){if(brows=="ie"){$(box2).setStyle({margin:"9 0 0 -119"})}else{$(box2).setStyle({margin:"10 0 0 113"})}}if(size_box==163){if(brows=="ie"){$(box2).setStyle({margin:"18 0 0 -82"})}else{$(box2).setStyle({margin:"19 0 0 0"})}}if(size_box==302){if(brows=="ie"){$(box2).setStyle({margin:"18 0 0 63"})}else{$(box2).setStyle({margin:"19 0 0 0"})}}if(size_box==217){if(brows=="ie"){$(box2).setStyle({margin:"18 0 0 -108"})}else{$(box2).setStyle({margin:"18 0 0 -2"})}}}}}if(box2!="sm_bestseller"&&$(box2).getHeight()>300){$(box2).setStyle({height:"160",overflowY:"scroll",overflowX:"hidden"})}if($(box2).getHeight()==14||$(box2).getHeight()==16){children=new Array;children=$(box2).descendants();children.each(function(child){if(child.id!="bb_img_menu"&&child.id!=box1+"_image"){child.setStyle({height:"17px"});child.setStyle({lineHeight:"17px"})}else{if(child.id=="bb_img_menu"){child.setStyle({top:"2px"})}}})}else{children=new Array;children=$(box2).descendants();children.each(function(child){if(child.id!="bb_img_menu"&&child.id!=box1+"_image"&&child.id!=""){child.setStyle({height:"14px"});child.setStyle({lineHeight:"14px"})}else{if(child.id=="bb_img_menu"){child.setStyle({top:"0"})}}})}$(box3).setStyle({backgroundColor:"#FFB54C"});$(box2).setStyle({display:"block"})}else{if($(box2).style.display=="block"){if(mengeHead!=null){$("inhalt_menge").innerHTML=mengeHead}$(box3).setStyle({backgroundColor:"#0042A7"});$(box2).setStyle({display:"none"});if($("menge_image_bb")){$("menge_image_bb").setStyle({display:"inline"})}}}$$("div.box_content span").each(function(item){if(item.id.split("_")[2]=="image"){item.onmouseover=function(){tt_show(this)};item.onmouseout=function(){tt_hide()};item.id=item.id.split("_")[0]+"_"+item.id.split("_")[2]}});var i=0;$$("div.sub_menue_head img").each(function(item){item.onmouseover=function(){tt_show(this)};item.onmouseout=function(){tt_hide()};item.id=i+"_image";i++})}function doit(obj){if($("products")){$(ob_lieferzeit_330).setStyle({display:"none"});$(ob_menge_330).setStyle({display:"none"});$(but_menge_330).onclick=function(){return false};$(but_lieferzeit_330).onclick=function(){return false}}var size_box="";size_box=get_sz(obj.id);var size_selbut=size_box-3;var size_selbut_ie=size_box-1;var temp_image="";var productIsBestBuy;var obj1="link"+obj.id.substr(3);var func_onchange="";box1=get_id(obj.id);box2="auswahl_"+box1;box3="but_"+box1;box5="inhalt_"+box1;var box_image=box1+"_image";if($(box1).id=="auflage_input"){box_image="auflage_image"}if($("products")){allBestBuyProducts.each(function(product){if("pw_"+product==$("products")[$("products").selectedIndex].value){productIsBestBuy=1}})}else{if($("product_select")){allBestBuyProducts.each(function(product){if("pw_"+product==$("product_select")[$("product_select").selectedIndex].value){productIsBestBuy=1}})}}var i=0;while(i<$(box1).options.length){if(trim_nbsp($(box1).options[i].innerHTML)==trim_nbsp($(obj1).innerHTML)){$(box1).options[i].selected="selected";if($(box1).readAttribute("onchange")!=null){$(box1).onchange()}attributesToCheck.each(function(bestBuyValue){if($(box1).options[i].value==bestBuyValue){temp_image="<img style='position: absolute; top: 3px; _top: 0; right: 20px; _right: 1px;' src='"+selectBoxUrl+"bestbuy_inaktiv.gif'  border='0' />"}});if(productIsBestBuy==1&&$(box1).id=="auflage_input"){if($($(box1)[$(box1).selectedIndex]).readAttribute("bestbuy")=="true"){temp_image="<img style='position: absolute; top: 3px; _top: 0; right: 20px; _right: 1px;' src='"+selectBoxUrl+"bestB.gif'  border='0' />"}}if((choosedProduct()=="pw_flyer"||choosedProduct()=="pw_kurzbriefe"||choosedProduct()=="pw_visitenkarten"||choosedProduct()=="pw_briefpapier")&&box1=="seiten"){if(choosedProduct()=="pw_flyer"){var farbenValue="farbe-0025";var seitenValue="seiten-0037"}if(choosedProduct()=="pw_kurzbriefe"){var farbenValue="farben-0062";var seitenValue="seiten-0017"}if(choosedProduct()=="pw_visitenkarten"){var farbenValue="farben-0088";var seitenValue="seiten-0038"}if(choosedProduct()=="pw_briefpapier"){var farbenValue="farben-0062";var seitenValue="seiten-0017"}if($(box1).options[i].value!=seitenValue){var y=0;while(y<$("farbe").options.length){if($("farbe").options[y].value==farbenValue){$("farbe").options[y].selected="selected";$("farbe").onchange()}y++}}else{if($(box1).options[i].value=seitenValue){if(choosedProduct()=="pw_flyer"){farbenValue="farbe-0021"}if(choosedProduct()=="pw_kurzbriefe"){farbenValue="farben-0031"}if(choosedProduct()=="pw_visitenkarten"){farbenValue="farben-0059"}if(choosedProduct()=="pw_briefpapier"){farbenValue="farben-0031"}var y=0;while(y<$("farbe").options.length){if($("farbe").options[y].value==farbenValue){$("farbe").options[y].selected="selected";$("farbe").onchange()}y++}}}}if($(box5)){$(box5).innerHTML=$(box1).options[i].innerHTML}if($(box_image)){$(box_image).innerHTML=temp_image}}i++}$$("a.oberbox_but_right").each(function(item){item.setStyle({backgroundPosition:"0 0"})});$(box2).setStyle({display:"none"});$$("select").each(function(item){if(item.id!="products"&&item.id!="producttype"&&item.id!="contactLayerTitle"){$("inhalt_"+item.id).innerHTML=$(item.id)[$(item.id).selectedIndex].innerHTML}});checkBestBuy()}function changebgd(obj){var div_id="link"+obj.id.substr(3);$$("div.box_content").each(function(item){item.setStyle({backgroundColor:"#ffffff"})});$$("div.box_content_but").each(function(item){item.setStyle({color:"#000000"})});col=obj.style.backgroundColor;if(col=="rgb(255, 255, 255)"||col=="#ffffff"){obj.style.backgroundColor=bgrd_over;$(div_id).style.color="#ffffff"}else{obj.style.backgroundColor="#ffffff";$(div_id).style.color="#000000"}$$("div.highlighted").each(function(item){item.setStyle({backgroundColor:"#ffb54c"})})}function change_pro(){$("pro_txt").innerHTML=pro}function choosedProduct(){var product_value;var i=0;if($("products")){while(i<$("products").options.length){if($("products").options[i].selected){product_value=$("products").options[i].value}i++}}else{if($("product_select")){while(i<$("product_select").options.length){if($("product_select").options[i].selected){product_value=$("product_select").options[i].value}i++}}}return product_value}function productsmenu(obj){if($("but_products_330")){box2="auswahl_products";box3="but_products_330"}if($("but_product_select_217")){box2="auswahl_product_select";box3="but_product_select_217"}var produktanzeige=produktwahl[1];var box_content=$(box2).innerHTML;var menue_id="m_"+obj;var sm_id="sm_"+obj;var menue_icon="mi_"+obj;box_content=box_content+"<div id='"+menue_id+"' class='menue_head' style='display:none;background-image: url("+productBoxUrl+"bkgrd_"+produktwahl[0]+".gif);' onmouseover='bgrd(this, \"over\");' onmouseout='bgrd(this, \"out\");' onclick='productssubmenu(this)'>";box_content=box_content+"<div id='"+menue_icon+"' class='menue_icon' style='background-image: url("+selectBoxUrl+"menue_open_close.gif);'></div>";box_content=box_content+"</div>";box_content=box_content+"<div id='"+sm_id+"' class='menue_content'></div>";$(box2).innerHTML=box_content;$(box2).setStyle({display:"block"})}function productssubmenu(obj){box1=get_id(obj.id);box2="sm_"+box1;if($("but_products_330")){box3="but_products_330"}if($("but_product_select_217")){box3="but_product_select_217"}var box_content="";var sub_id="s_"+box1;var sub_cont="m_"+box1;var menue_icon="mi_"+box1;var real_value;var o;var showBestBuy;var productSelect;var isNew;var newPic;newPic=productBoxUrl.replace(/buttons./,"new_product.gif");$$("div.menue_head").each(function(item){item.setStyle({backgroundPosition:"0 0"})});$$("div.menue_icon").each(function(item){item.setStyle({backgroundPosition:"0 0"})});var produkte=new Array();produkte[0]="bestseller";produkte[1]="Topseller";var i=0;if($("products")){while(i<$("products").options.length){produkte[i+1]=$("products").options[i].innerHTML;i++}}if($("product_select")){while(i<$("product_select").options.length){produkte[i+1]=$("product_select").options[i].innerHTML;i++}}produktwahl=produkte;i=1;while(i<=produktwahl.length){showBestBuy=0;if(produktwahl[i]&&produktwahl[i]!=""){box_content=box_content+"<div id='s_"+box1+"_"+i+"' class='sub_menue_head'  onmouseover='bgrd_sub(this.id);' onmouseout='bgrd_sub(this.id)' onclick='choose_product(this)' style='position: relative'>";box_content=box_content+"<div id='subtxt_"+produktwahl[0]+"_"+i+"' class='menue_txt'>"+produktwahl[i]+"</div>";o=0;if($("products")){productSelect=$("products")}else{if($("product_select")){productSelect=$("product_select")}}while(o<productSelect.length){if(productSelect[o].innerHTML==produktwahl[i]){real_value=productSelect[o].value;isNew=$(productSelect[o]).readAttribute("new")}o++}if(real_value){allBestBuyProducts.each(function(product){if(real_value.search(product)!=-1){showBestBuy=1}})}if(showBestBuy==1){box_content=box_content+"<img style='position: absolute; top: 0; right: 18px; _right: 17px;' src='"+selectBoxUrl+"bestbuy.gif'  border='0' onmouseover='tt_show(this);' onmouseout='tt_hide();' />"}if(isNew=="true"){box_content=box_content+"<img style='position: absolute; top: 0; right: 18px; _right: 17px;' src='"+newPic+"' alt='neu' border='0' />"}box_content=box_content+"</div>"}i++}if($(box2).style.display=="none"||!$(box2).style.display){$$("div.menue_content").each(function(item){item.setStyle({display:"none"})});$(box2).innerHTML=box_content;$(box2).setStyle({display:"block"});$(menue_icon).setStyle({backgroundPosition:"0 -16px"});$(obj).setStyle({backgroundPosition:"0 -16px"});$(box2).setStyle({display:"block"})}else{if($(box2).style.display=="block"){$(menue_icon).setStyle({backgroundPosition:"0 0"});$(obj).setStyle({backgroundPosition:"0 0"});$(box2).setStyle({display:"none"})}}}function bgrd(obj,maus){box1=get_id(obj.id);box2="sm_"+box1;if(maus=="over"){$(obj.id).setStyle({backgroundPosition:"0 -16px"})}else{if(maus=="out"&&$(box2).style.display!="block"){$(obj.id).setStyle({backgroundPosition:"0 0"})}}}function bgrd_sub(obj){var div_id=String("s_"+obj.substr(2));var div1_id=String("subtxt_"+obj.substr(2));$$("div.sub_menue_head").each(function(item){item.setStyle({backgroundColor:"#ffffff",color:"#000000"})});$$("div.menue_txt").each(function(item){item.setStyle({color:"#000000"})});col=$(div_id).style.backgroundColor;if(col=="rgb(255, 255, 255)"||col=="#ffffff"||col==""){$(div1_id).style.color="#ffffff";$(div_id).setStyle({backgroundColor:bgrd_over,color:"#ffffff"})}else{if(col!="rgb(255, 255, 255)"||col!="#ffffff"){obj.style.backgroundColor="#ffffff";obj.style.color="#000000";$(div_id).setStyle({backgroundColor:"#ffffff",color:"#000000"})}}}function choose_product(obj){box1=get_id(obj.id);box2=get_sz(obj.id);var chosen="";var div_id="subtxt_"+box1+"_"+box2;var pricebox;var productSelect;var chosenvalue="";var productOrProdukt;var newPic;newPic=productBoxUrl.replace(/buttons./,"new_product.gif");if($("products")){$("inhalt_products").innerHTML=$(div_id).innerHTML}else{if($("product_select")){$("inhalt_product_select").innerHTML=$(div_id).innerHTML}}var i=1;while(i<=produktwahl.length){if(produktwahl[i]&&produktwahl[i]!=""){if(i==box2){chosen=produktwahl[i]}}i++}i=0;if($("products")){productSelect=$("products");$("auswahl_products").setStyle({display:"none"});productOrProdukt="products"}else{if($("product_select")){productSelect=$("product_select");$("auswahl_product_select").setStyle({display:"none"});productOrProdukt="product_select"}}while(i<=productSelect.options.length){if(productSelect.options[i]&&(productSelect.options[i].innerHTML==chosen)){chosenvalue=productSelect.options[i].value;productSelect.options[i].selected=true;productSelect.onchange()}i++}$(productOrProdukt+"_image").innerHTML="";if($("product_select")){if($($("product_select")[$("product_select").selectedIndex]).readAttribute("new")=="true"){$("product_select_image").innerHTML="<img style='position: absolute; top: 3px; _top: 0; right: 20px; _right: 1px;' src='"+newPic+"' alt='new' border='0' />"}}allBestBuyProducts.each(function(product){if(("pw_"+product)==chosenvalue){$(productOrProdukt+"_image").innerHTML="<img style='position: absolute; top: 3px; _top: 0; right: 20px; _right: 1px;' src='"+selectBoxUrl+"bestbuy.gif'  border='0' />"}})}var bestBuy;function changeBestBuyImages(stateToSet){bestBuy=stateToSet;$$("img").each(function(item){if(stateToSet=="inactive"&&item.src==(selectBoxUrl+"bestB.gif")&&item.id!="bb_img_menu"){if(item.ancestors()[2]&&item.ancestors()[2].id!="auswahl_products"){item.src=selectBoxUrl+"bestB_inactive.gif"}}else{if(stateToSet=="active"&&item.src==(selectBoxUrl+"bestB_inactive.gif")){item.src=selectBoxUrl+"bestB.gif"}}});if($("priceBox")&&stateToSet=="active"){if(!$("priceBoxBestBuy")){pricebox=$("priceBox");pricebox.innerHTML=pricebox.innerHTML+"<div id='priceBoxBestBuy' style='z-index: 9999; display: inline'><img src='"+selectBoxUrl+"bestbuy.gif'  border='0' style='position: absolute; top: 1px; _top: 1px; left: 368px;' /><img src='"+selectBoxUrl+"bestB.gif'  border='0' style='position: absolute; top:20px; _top: 20px; left: 368px;' /></div>"}if($("priceBoxBestBuy")){$("priceBoxBestBuy").setStyle({display:"inline"})}}if($("priceBox")&&stateToSet=="inactive"){if($("priceBoxBestBuy")){$("priceBoxBestBuy").setStyle({display:"none"})}}}function checkBestBuy(){var fakeSelectBox;var box_image;var i;var productIsBestBuy=0;var auswahlPreiseSplit=new Array;i=0;while(i<auswahlPreise.length){auswahlPreiseSplit=auswahlPreise[i].split("#");if($("lieferzeit")&&(auswahlPreiseSplit[0]==$("lieferzeit")[$("lieferzeit").selectedIndex].value)){var elementid=$("lieferzeit")[$("lieferzeit").selectedIndex].value+"_lieferzeit_330";var newString=$(elementid).innerHTML.replace(/\bonclick=("|')doDoit\(.*?\);?("|')/gi,"");inhalt=newString}i++}if($("inhalt_lieferzeit")){$("inhalt_lieferzeit").innerHTML=inhalt}if($("products")){allBestBuyProducts.each(function(product){if("pw_"+product==$("products")[$("products").selectedIndex].value){productIsBestBuy=1;$("products_image").innerHTML='<img style="position: absolute; top: 3px; _top: 0; right: 20px; _right: 1px;" src="'+selectBoxUrl+'bestbuy.gif"  border="0" />'}})}else{if($("product_select")){allBestBuyProducts.each(function(product){if("pw_"+product==$("product_select")[$("product_select").selectedIndex].value){productIsBestBuy=1;$("product_image").innerHTML='<img style="position: absolute; top: 3px; _top: 0; right: 20px; _right: 1px;" src="'+selectBoxUrl+'bestbuy.gif"  border="0" />'}})}}$$("select").each(function(item){if(item.id!="products"&&item.id!="product_select"&&item.id!="lieferzeit"&&item.id!="contactLayerTitle"){fakeSelectBox="inhalt_"+item.id;box_image=item.id+"_image";if(item.id=="auflage_input"){box_image="auflage_image"}$(fakeSelectBox).innerHTML=item[item.selectedIndex].innerHTML;$(box_image).innerHTML="";attributesToCheck.each(function(attribute){if(item[item.selectedIndex].value==attribute){if(item.id=="linien"){$(box_image).innerHTML=""}else{$(box_image).innerHTML='<img id="'+item.id+'_image_bb" style="position: absolute; top: 3px; _top: 0; right: 20px; _right: 1px;" src="'+selectBoxUrl+'bestB.gif"  border="0" onmouseover="tt_show(this);" onmouseout="tt_hide();" />'}}});if((item.id=="menge")){var elementid=item[item.selectedIndex].value+"_"+item.id+"_330"}i=0;while(i<item.length){if((item[i].value==0)&&(item[i].innerHTML!=fakeSelectBox.innerHTML)){$(fakeSelectBox).innerHTML=item[i].innerHTML}i++}if($("products_select")){$(box_image).innerHTML='<img style="position: absolute; top: 3px; _top: 0; right: 20px; _right: 1px;" src="'+selectBoxUrl+'bestB.gif"  border="0" />'}if(productIsBestBuy==1&&item.id=="auflage_input"){if($(item[item.selectedIndex]).readAttribute("bestbuy")=="true"){}}}})}var selVersand="";var mengePreise=new Array;var auswahlPreise=new Array;var mengenpreisbreite;var addedHeight=0;function show_prices(obj,prices){if(prices==null&obj=="menge"){var allPrices=allAmountsPrices}else{if(prices!=null&obj=="menge"){var allPrices=prices}else{if(prices==null&obj=="lieferzeit"){var allPrices=allDispatchPrices}else{if(prices!=null&obj=="lieferzeit"){var allPrices=prices}}}}$("ob_menge_330").setStyle({display:"block"});var box_content="";var size_box=size;var size_selbut=size_box-3;var size_selbut_ie=size_box-1;var elemente=new Array();var box1=obj;var box2="auswahl_"+obj;var box3="but_"+box1+"_"+size_box;var box5="inhalt_"+box1;var bestBuyImg;var v_col1=0;var v_col2=0;var v_col3=0;var m_col1=0;var m_col2=0;var m_col3=0;var produkt=$("products")[$("products").selectedIndex].value;var kopierweite=0;var kopierweite1=0;var kopierweite2=0;var kopierweite3=0;if(selVersand==""&obj=="lieferzeit"){selVersand=$("lieferzeit")[$("lieferzeit").selectedIndex].value}var allPricesChoosedSplit=new Array();var allPricesChoosed=new Array();var allPricesSplited=new Array();var allPricesSplit=new Array();allPricesSplit=allPrices.split("#");if(allPricesSplit[allPricesSplit.length-1]==""){allPricesSplit.pop()}var y;var i=0;while(i<$(obj).options.length){y=0;while(y<allPricesSplit.length){allPricesSplited=allPricesSplit[y].split("|");if(allPricesSplited[0]==$(obj).options[i].value){var insertField=($(obj).options[i].value.split("-")[0]=="menge")?$(obj).options[i].innerHTML:allPricesSplited[5];allPricesChoosed[i]=$(obj).options[i].value+"#"+insertField+"#"+allPricesSplited[1]+"#"+allPricesSplited[2]}y++}elemente[i]="<div class='"+box1+"_col1 box_row'>"+$(obj).options[i].innerHTML+"</div><div class='"+box1+"_col2 box_row'>"+$(obj).options[i].innerHTML+"</div><div class='"+box1+"_col3 box_row'>"+$(obj).options[i].innerHTML+"</div>";i++}i=0;while(i<allPricesChoosed.length){allPricesChoosedSplit=allPricesChoosed[i].split("#");if(v_col1<(allPricesChoosedSplit[2].length*6)+4){v_col1=(allPricesChoosedSplit[2].length*6)+4}if(v_col2<(allPricesChoosedSplit[3].length*6)){v_col2=(allPricesChoosedSplit[3].length*6)}if(v_col3<(allPricesChoosedSplit[1].length*5.6)){v_col3=(allPricesChoosedSplit[1].length*5.6)}if(m_col1<(allPricesChoosedSplit[1].length*5.6)+2){m_col1=(allPricesChoosedSplit[1].length*5.6)+2}if(m_col2<(allPricesChoosedSplit[2].length*6)+15){m_col2=(allPricesChoosedSplit[2].length*6)+15}if(m_col3<(allPricesChoosedSplit[3].length*6)){m_col3=(allPricesChoosedSplit[3].length*6)}i++}i=0;while(i<allPricesChoosed.length){allPricesChoosedSplit=allPricesChoosed[i].split("#");link="sub"+i+"_"+box1+"_"+size_box;link1=allPricesChoosedSplit[0]+"_"+box1+"_"+size_box;link2=box1+i+"_col1";link3=box1+i+"_col2";link4=box1+i+"_col3";var bcol="";if(i==0&&box1=="lieferzeit"&&selVersand==allPricesChoosedSplit[0]){box_content=box_content+"<div id='"+link+"' class='box_content' style='background-color: #ffb54c; height: 17px; width: "+(size_selbut+2)+"px;' onmouseover=\"changeBgrd('"+link+"', 'on')\" onmouseout=\"changeBgrd('"+link+"', 'off');\" onclick='doDoit(\""+box1+'", "'+allPricesChoosedSplit[0]+"\");'>"}else{if(i==0&&box1=="lieferzeit"&&selVersand!=allPricesChoosedSplit[0]){box_content=box_content+"<div id='"+link+"' class='box_content' style='height: 17px; width: "+(size_selbut+2)+"px;' onmouseover=\"changeBgrd('"+link+"', 'on')\" onmouseout=\"changeBgrd('"+link+"', 'off');\" onclick='doDoit(\""+box1+'", "'+allPricesChoosedSplit[0]+"\");'>"}else{if(i!=0&&box1=="lieferzeit"&&selVersand==allPricesChoosedSplit[0]){box_content=box_content+"<div id='"+link+"' class='box_content' style='background-color: #ffb54c; height: 17px; width: "+(size_selbut+2)+"px;' onmouseover=\"changeBgrd('"+link+"', 'on')\" onmouseout=\"changeBgrd('"+link+"', 'off');\" onclick='doDoit(\""+box1+'", "'+allPricesChoosedSplit[0]+"\");'>"}else{if(box1=="lieferzeit"){box_content=box_content+"<div id='"+link+"' class='box_content' style='height: 17px; width: "+(size_selbut+2)+"px;' onmouseover=\"changeBgrd('"+link+"', 'on')\" onmouseout=\"changeBgrd('"+link+"', 'off');\" onclick='doDoit(\""+box1+'", "'+allPricesChoosedSplit[0]+"\");'>"}else{box_content=box_content+"<div id='"+link+"' class='box_content' style='width: "+size_selbut+"px;' onmouseover=\"changeBgrd('"+link+"', 'on')\" onmouseout=\"changeBgrd('"+link+"', 'off');\" onclick='doDoit(\""+box1+'", "'+allPricesChoosedSplit[0]+"\");'>"}}}}var box_content_link="";attributesToCheck.each(function(item){bestBuyImg="bestB.gif";if(allPricesChoosedSplit[0]==item){if(box1=="menge"){mengenpreisbreite=m_col1;if(produkt=="pw_kopierpapier"){kopiermenge=allPricesChoosedSplit[1].split(" ");if(kopierweite1<kopiermenge[0].length){kopierweite1=kopiermenge[0].length}if(kopierweite2<kopiermenge[1].length){kopierweite2=kopiermenge[1].length}if(kopierweite3<kopiermenge[2].length+kopiermenge[3].length+1){kopierweite3=kopiermenge[2].length+kopiermenge[3].length+1}if(kopierweite<kopiermenge[0].length+kopiermenge[1].length+kopiermenge[2].length+kopiermenge[3].length+4){kopierweite=kopiermenge[0].length+kopiermenge[1].length+kopiermenge[2].length+kopiermenge[3].length+4}allPricesChoosedSplit[1]="<div class='kopier1'>"+kopiermenge[0]+"</div><div class='kopier2'>"+kopiermenge[1]+"</div><div class='kopier3'>"+kopiermenge[2]+" "+kopiermenge[3]+"</div>"}if((i+1)==allPricesChoosed.length){box_content_link="<div id='"+link1+"' class='box_content_but'><div id='"+link2+"' class='"+box1+"_col1 "+box1+"_col' onclick='doDoit(\""+box1+'", "'+allPricesChoosedSplit[0]+"\");' style='width: "+m_col1+"px;'>"+allPricesChoosedSplit[1]+"</div><div id='"+link3+"' class='"+box1+"_col2 "+box1+"_col' style='width: "+m_col2+"px;' onclick='doDoit(\""+box1+'", "'+allPricesChoosedSplit[0]+"\");'><span id='letztemenge'>"+allPricesChoosedSplit[2]+"&nbsp;|</span></div><div id='"+link4+"' class='"+box1+"_col3 "+box1+"_col letztemengebruttodiv' style='width: "+m_col3+"px;' onclick='doDoit(\""+box1+'", "'+allPricesChoosedSplit[0]+"\");'><span id='letztemengebrutto'>"+allPricesChoosedSplit[3]+"</span></div></div><span id='"+box1+'_image\'><img id="bb_img_menu" style="position: absolute; top: 0px; right: 17px;" src="'+selectBoxUrl+bestBuyImg+'" alt="bestbuy" border="0" /></span>'}else{box_content_link="<div id='"+link1+"' class='box_content_but'><div id='"+link2+"' class='"+box1+"_col1 "+box1+"_col' onclick='doDoit(\""+box1+'", "'+allPricesChoosedSplit[0]+"\");' style='width: "+m_col1+"px;'>"+allPricesChoosedSplit[1]+"</div><div id='"+link3+"' class='"+box1+"_col2 "+box1+"_col' style='width: "+m_col2+"px;' onclick='doDoit(\""+box1+'", "'+allPricesChoosedSplit[0]+"\");'>"+allPricesChoosedSplit[2]+"&nbsp;|</div><div id='"+link4+"' class='"+box1+"_col3 "+box1+"_col' style='width: "+m_col3+"px;' onclick='doDoit(\""+box1+'", "'+allPricesChoosedSplit[0]+"\");'>"+allPricesChoosedSplit[3]+"</div></div><span id='"+box1+'_image\'><img id="bb_img_menu" style="position: absolute; top: 0px; right: 17px;" src="'+selectBoxUrl+bestBuyImg+'" alt="bestbuy" border="0" /></span>'}}if(selVersand==allPricesChoosedSplit[0]&&box1=="lieferzeit"){box_content_link="<div id='"+link1+"' class='box_content_but_lieferzeit highlighted'><div class='selectedfakeradiobutton' style='background-image: url("+selectBoxUrl+"/radiobutton.png)'></div><div id='"+link2+"' class='"+box1+"_col1 "+box1+"_col' style='height: 16px; margin-top: 1px;width: "+v_col1+"px;' onclick='doDoit(\""+box1+'", "'+allPricesChoosedSplit[0]+"\");'>"+allPricesChoosedSplit[2]+" |</div><div id='"+link3+"' class='"+box1+"_col2 "+box1+"_col' style='height: 16px; margin-top: 1px;width: "+v_col2+"px;' onclick='doDoit(\""+box1+'", "'+allPricesChoosedSplit[0]+"\");'>"+allPricesChoosedSplit[3]+"</div><div id='"+link4+"' class='"+box1+"_col3 "+box1+"_col "+box1+"_col' style='height: 16px; margin-top: 1px;width: "+v_col3+"px;' onclick='doDoit(\""+box1+'", "'+allPricesChoosedSplit[0]+"\");'>"+allPricesChoosedSplit[1]+"</div></div><span id='"+box1+"_image'></span>"}else{if(box1=="lieferzeit"){box_content_link="<div id='"+link1+"' class='box_content_but_lieferzeit'><div class='fakeradiobutton' style='background-image: url("+selectBoxUrl+"/radiobutton.png)'></div><div id='"+link2+"' class='"+box1+"_col1 "+box1+"_col' style='height: 16px; margin-top: 1px;width: "+v_col1+"px;' onclick='doDoit(\""+box1+'", "'+allPricesChoosedSplit[0]+"\");'>"+allPricesChoosedSplit[2]+" |</div><div id='"+link3+"' class='"+box1+"_col2 "+box1+"_col' style='height: 16px; margin-top: 1px;width: "+v_col2+"px;' onclick='doDoit(\""+box1+'", "'+allPricesChoosedSplit[0]+"\");'>"+allPricesChoosedSplit[3]+"</div><div id='"+link4+"' class='"+box1+"_col3 "+box1+"_col "+box1+"_col' style='height: 16px; margin-top: 1px;width: "+v_col3+"px;' onclick='doDoit(\""+box1+'", "'+allPricesChoosedSplit[0]+"\");'>"+allPricesChoosedSplit[1]+"</div></div><span id='"+box1+"_image'></span>"}}}});if(box_content_link==""){if(box1=="menge"){mengenpreisbreite=m_col1;if(produkt=="pw_kopierpapier"){kopiermenge=allPricesChoosedSplit[1].split(" ");if(kopierweite1<kopiermenge[0].length){kopierweite1=kopiermenge[0].length}if(kopierweite2<kopiermenge[1].length){kopierweite2=kopiermenge[1].length}if(kopierweite3<kopiermenge[2].length+kopiermenge[3].length+1){kopierweite3=kopiermenge[2].length+kopiermenge[3].length+1}if(kopierweite<kopiermenge[0].length+kopiermenge[1].length+kopiermenge[2].length+kopiermenge[3].length+4){kopierweite=kopiermenge[0].length+kopiermenge[1].length+kopiermenge[2].length+kopiermenge[3].length+4}allPricesChoosedSplit[1]="<div class='kopier1'>"+kopiermenge[0]+"</div><div class='kopier2'>"+kopiermenge[1]+"</div><div class='kopier3'>"+kopiermenge[2]+" "+kopiermenge[3]+"</div>"}if((i+1)==allPricesChoosed.length){box_content_link="<div id='"+link1+"' class='box_content_but'><div id='"+link2+"' class='"+box1+"_col1 "+box1+"_col' onclick='doDoit(\""+box1+'", "'+allPricesChoosedSplit[0]+"\");' style='width: "+m_col1+"px;'>"+allPricesChoosedSplit[1]+"</div><div id='"+link3+"' class='"+box1+"_col2 "+box1+"_col' style='width: "+m_col2+"px;' onclick='doDoit(\""+box1+'", "'+allPricesChoosedSplit[0]+"\");'><span id='letztemenge'>"+allPricesChoosedSplit[2]+"&nbsp;|</span></div><div id='"+link4+"' class='"+box1+"_col3 "+box1+"_col letztemengebruttodiv' style='width: "+m_col3+"px;' onclick='doDoit(\""+box1+'", "'+allPricesChoosedSplit[0]+"\");'><span id='letztemengebrutto'>"+allPricesChoosedSplit[3]+"</span></div></div>"}else{box_content_link="<div id='"+link1+"' class='box_content_but'><div id='"+link2+"' class='"+box1+"_col1 "+box1+"_col' onclick='doDoit(\""+box1+'", "'+allPricesChoosedSplit[0]+"\");' style='width: "+m_col1+"px;'>"+allPricesChoosedSplit[1]+"</div><div id='"+link3+"' class='"+box1+"_col2 "+box1+"_col' style='width: "+m_col2+"px;' onclick='doDoit(\""+box1+'", "'+allPricesChoosedSplit[0]+"\");'>"+allPricesChoosedSplit[2]+"&nbsp;|</div><div id='"+link4+"' class='"+box1+"_col3 "+box1+"_col' style='width: "+m_col3+"px;' onclick='doDoit(\""+box1+'", "'+allPricesChoosedSplit[0]+"\");'>"+allPricesChoosedSplit[3]+"</div></div>"}}if(selVersand==allPricesChoosedSplit[0]&&box1=="lieferzeit"){box_content_link="<div id='"+link1+"' class='box_content_but_lieferzeit highlighted'><div class='selectedfakeradiobutton' style='background-image: url("+selectBoxUrl+"/radiobutton.png)'></div><div id='"+link2+"' class='"+box1+"_col1 "+box1+"_col' style='height: 16px; margin-top: 1px; width: "+v_col1+"px;' onclick='doDoit(\""+box1+'", "'+allPricesChoosedSplit[0]+"\");'>"+allPricesChoosedSplit[2]+" |</div><div id='"+link3+"' class='"+box1+"_col2 "+box1+"_col' style='height: 16px; margin-top: 1px;width: "+v_col2+"px;' onclick='doDoit(\""+box1+'", "'+allPricesChoosedSplit[0]+"\")'>"+allPricesChoosedSplit[3]+"</div><div id='"+link4+"' class='"+box1+"_col3 "+box1+"_col' style='height: 16px; margin-top: 1px; width: "+v_col3+"px;' onclick='doDoit(\""+box1+'", "'+allPricesChoosedSplit[0]+"\");'>"+allPricesChoosedSplit[1]+"</div></div><span id='"+box1+"_image'></span>"}else{if(box1=="lieferzeit"){box_content_link="<div id='"+link1+"' class='box_content_but_lieferzeit'><div class='fakeradiobutton' style='background-image: url("+selectBoxUrl+"/radiobutton.png)'></div><div id='"+link2+"' class='"+box1+"_col1 "+box1+"_col' style='height: 16px; margin-top: 1px; width: "+v_col1+"px;' onclick='doDoit(\""+box1+'", "'+allPricesChoosedSplit[0]+"\");'>"+allPricesChoosedSplit[2]+" |</div><div id='"+link3+"' class='"+box1+"_col2 "+box1+"_col' style='height: 16px; margin-top: 1px;width: "+v_col2+"px;' onclick='doDoit(\""+box1+'", "'+allPricesChoosedSplit[0]+"\")'>"+allPricesChoosedSplit[3]+"</div><div id='"+link4+"' class='"+box1+"_col3 "+box1+"_col' style='height: 16px; margin-top: 1px; width: "+v_col3+"px;' onclick='doDoit(\""+box1+'", "'+allPricesChoosedSplit[0]+"\");'>"+allPricesChoosedSplit[1]+"</div></div><span id='"+box1+"_image'></span>"}}}box_content=box_content+box_content_link;box_content=box_content+"</div>";i++}if(box1=="lieferzeit"){auswahlPreise=allPricesChoosed}if(box1=="menge"){mengePreise=allPricesChoosed}$(box2).innerHTML=box_content;if(box1=="lieferzeit"){$("box_lieferzeit").setStyle({display:"none"});$(box2).setStyle({display:"block"});if(IE){var lieferzeitHeight=$("auswahl_lieferzeit").getHeight()-22}else{var lieferzeitHeight=$("auswahl_lieferzeit").getHeight()-20}if(lieferzeitHeight<0){lieferzeitHeight=lieferzeitHeight+1}if(lieferzeitHeight!=addedHeight){$("factsheetframe").setStyle({height:($("factsheetframe").getHeight()-addedHeight+lieferzeitHeight)});addedHeight=lieferzeitHeight}}if($(box2).getHeight()>500){$(box2).setStyle({height:"270",overflowY:"scroll",overflowX:"hidden"});$(box3).setStyle({backgroundPosition:"0 -20"})}else{if(box1!="lieferzeit"&&$(box2).style.display=="block"){$(box3).setStyle({backgroundPosition:"0 0"});$(box2).setStyle({display:"none"})}}if(box1=="menge"&&produkt=="pw_kopierpapier"){kopierweite1=kopierweite1*6;kopierweite2=kopierweite2*5.6;kopierweite3=kopierweite3*5.6;kopierweite=kopierweite*5.7+10;$$("div.menge_col1").each(function(item){item.setStyle({width:kopierweite})});$$("div.kopier1").each(function(item){item.setStyle({width:kopierweite1})});$$("div.kopier2").each(function(item){item.setStyle({width:kopierweite2})});$$("div.kopier3").each(function(item){item.setStyle({width:kopierweite3})})}if(choosedProduct()=="p_druckbogen"){$("inhalt_dispersionslack").innerHTML=$("dispersionslack")[$("dispersionslack").selectedIndex].innerHTML;$("inhalt_versandart").innerHTML=$("versandart")[$("versandart").selectedIndex].innerHTML}$("but_menge_330").onclick=function(){box_open(this);return false}}function doDoit(obj,objVal){if(obj=="lieferzeit"){var clickedPrice=objVal+"_"+obj+"_330";if(objVal==selVersand){return 0}descendants=new Array();descendants=$("auswahl_lieferzeit").descendants();descendants.each(function(child){if(child.hasClassName("highlighted")){child.removeClassName("highlighted");child.setStyle({backgroundColor:"#ffffff"})}if(child.hasClassName("selectedfakeradiobutton")){child.removeClassName("selectedfakeradiobutton");child.addClassName("fakeradiobutton")}});$(clickedPrice).addClassName("highlighted");$(clickedPrice).setStyle({backgroundColor:"#ffb54c"});descendants=$(clickedPrice).descendants();descendants.each(function(child){if(child.hasClassName("fakeradiobutton")){child.removeClassName("fakeradiobutton");child.addClassName("selectedfakeradiobutton")}})}box1=obj;var temp_image="";var box2="auswahl_"+obj;var box_image=box1+"_image";if(box1!="lieferzeit"){$("auswahl_"+box1).setStyle({display:"none"})}$("ob_menge_330").setStyle({display:"none"});if($("producttype")&&$("producttype").value=="producttype-4431"){attributesToCheck=bestBuyAttributesFreeDesign;if($("box_products")){attributesToCheck.push("format-2527")}}var i=0;while(i<$(box1).options.length){if($(box1).options[i].value==objVal){selVersand=objVal;$(box1).options[i].selected="selected";if($(box1).readAttribute("onchange")!=null){$(box1).onchange()}if($(box1).readAttribute("onclick")!=null){$(box1).onclick()}attributesToCheck.each(function(bestBuyValue){if($(box1).options[i].value==bestBuyValue){temp_image="<img style='position: absolute; top: 3px; right: 20px;' src='"+selectBoxUrl+"bestbuy_inactive.gif'  border='0' />"}});if(obj=="lieferzeit"){$(box5).innerHTML=""}else{$(box5).innerHTML=$(box1).options[i].innerHTML}if(obj!="lieferzeit"){$(box_image).innerHTML=temp_image}}i++}mengeHead=$("inhalt_menge").innerHTML}function openPreisbox(){$("auswahl_lieferzeit").setStyle({display:"block"})}function changeBgrd(objID,onoff){var parentelement=$(objID).childElements()[0].id;var z=0;if(onoff=="on"){if(objID.split("_")[1]=="menge"){$(objID).setStyle({backgroundColor:bgrd_over});while(z<$(parentelement).childElements().length){$(parentelement).childElements()[z].setStyle({color:"#ffffff"});z++}}else{$(objID).setStyle({backgroundColor:"#ffb54c"})}}else{if(onoff=="off"){if($(parentelement).childElements()[0].className!="selectedfakeradiobutton"){$(objID).setStyle({backgroundColor:"#ffffff"});while(z<$(parentelement).childElements().length){$(parentelement).childElements()[z].setStyle({color:"#000000"});z++}}}}}var tt_link_pattern="tt_link_";var tt_pattern="tt_";function _get_tt(tt_ref){TOOLTIP=null;if(tt_ref&&tt_ref.id){link_id=tt_ref.id;tt_id=link_id.replace(tt_link_pattern,tt_pattern);if(document.getElementById(tt_id)){tt=document.getElementById(tt_id);return tt}else{alert("No tooltip found!");return null}}}var TOOLTIP;function tt_hide(tt_ref){if(TOOLTIP){TOOLTIP.style.visibility="hidden"}}function tt_show(tt_ref){if(tt_ref.id.split("_")[1]=="image"){if(tt_ref.ancestors()[4].id=="erweiterte_anfrage"||tt_ref.ancestors()[3].id=="erweiterte_anfrage"){var maus_pos=$(tt_ref.id).ancestors()[0].cumulativeOffset();var maus_x=maus_pos[0]+215+"px";var maus_y=maus_pos[1]-4+"px"}else{if(tt_ref.ancestors()[0].id.split("_")[1]=="image"){var maus_pos=$(tt_ref.id).ancestors()[3].cumulativeOffset();var maus_x=maus_pos[0]+330+"px";var maus_y=maus_pos[1]-1+"px"}else{var maus_pos=$(tt_ref.id).ancestors()[0].cumulativeOffset();var maus_x=maus_pos[0]+326+"px";var maus_y=maus_pos[1]-4+"px"}}TOOLTIP=$("tt_image");TOOLTIP.setStyle({left:maus_x,top:maus_y});TOOLTIP.style.visibility="visible"}else{var maus_pos=$(tt_ref.id).cumulativeOffset();var maus_x=350+"px";if(brows=="ie"){var maus_y=0+"px"}else{var maus_y=maus_pos[1]+"px"}TOOLTIP=_get_tt(tt_ref);if(TOOLTIP){$(TOOLTIP.id).setStyle({marginLeft:maus_x,top:maus_y});TOOLTIP.style.visibility="visible"}}}function updateTooltip(e){if(TOOLTIP!=null&&TOOLTIP.style.visibility=="visible"){TOOLTIP.setStyle({left:Mouse.x,top:Mouse.y})}}function tt_show_sticky(tt_ref){var maus_pos=$(tt_ref.id).cumulativeOffset();var maus_x=350+"px";if(brows=="ie"){var maus_y=0+"px"}else{var maus_y=maus_pos[1]+"px"}TOOLTIP=_get_tt(tt_ref);if(TOOLTIP){$(TOOLTIP.id).setStyle({marginLeft:maus_x,top:maus_y});TOOLTIP.style.visibility="visible"}if(TOOLTIP&&TOOLTIP.style.visibility!="visible"){TOOLTIP.style.visibility="visible"}}function tt_hide_sticky(id){$(id).parentNode.style.visibility="hidden";TOOLTIP.style.top=null;TOOLTIP=null}function insertBbTooltipsStart(){$$("div.oberbox_cont a span").each(function(item){if(item.id.split("_")[2]=="image"){item.onmouseover=function(){tt_show(this)};item.onmouseout=function(){tt_hide()};item.id=item.id.split("_")[0]+"_"+item.id.split("_")[2]}})};