function gEBI(a){return document.getElementById(a)}function createCookie(a,b,d){b=escape(b);if(d){var c=new Date;c.setTime(c.getTime()+d*24*60*60*1E3);d="; expires="+c.toGMTString()}else d="";document.cookie=a+"="+b+d+"; path=/"}function throwCookie(a){a=a+"=";for(var b=document.cookie.split(";"),d=0;d<b.length;d++){for(var c=b[d];c.charAt(0)==" ";)c=c.substring(1,c.length);if(c.indexOf(a)==0)return c.substring(a.length,c.length)}return null}function delCookie(a){createCookie(a,"",-1)}
function isset(a){return typeof window[a]!="undefined"}function targetBlank(){for(var a=document.getElementsByTagName("a"),b=0;b<a.length;b++)if(a[b].className=="new-window"||a[b].className=="new-windowMark")a[b].onclick=function(){window.open(this.href);return false}}_bUa=navigator.userAgent.toLowerCase();_bOp=_bUa.indexOf("opera")!=-1?true:false;
_bIe4=(_bIe=_bUa.indexOf("msie")!=-1&&!_bOp?true:false)&&(_bUa.indexOf("msie 2.")!=-1||_bUa.indexOf("msie 3.")!=-1||_bUa.indexOf("msie 4.")!=-1)&&!_bOp?true:false;isIe=function(){return _bIe};isOldIe=function(){return _bIe4};var olArray=[];function AddOnload(a){if(isIe&&isOldIe){window.onload=ReadOnload;olArray[olArray.length]=a}else if(window.onload){if(window.onload!=ReadOnload){olArray[0]=window.onload;window.onload=ReadOnload}olArray[olArray.length]=a}else window.onload=a}
function ReadOnload(){for(var a=0;a<olArray.length;a++)olArray[a]()}function fix(a){a=a.toString();a=a.replace(/\,/gi,".");a=Math.round(a*100);a=a.toString();var b=a.slice(0,1);if(b=="-")a=a.slice(1,a.length);else b="";if(a.length<3)for(;a.length<3;)a="0"+a;a=b+a.slice(0,a.length-2)+"."+a.slice(a.length-2,a.length);if(a.search(/^-?[0-9]{1,}[.]{1}[0-9]{1,}$/i)==-1)a="0.00";return a}
function changePriceFormat(a){a=fix(a);a=a.split(".");for(var b=a[0],d=[],c=0,e=b.length-1;e>=0;e--){d[c]=c>0&&c%3==0?b.substr(e,1)+".":b.substr(e,1);c++}d.reverse();sPriceFull=d.join("");return sPrice=a[1]==0?sPriceFull+",-":sPriceFull+"."+a[1]}function generatePrice(a,b){a=fix(a);b=b.toString();if(b.match(/\%/)){b=fix(b.replace(/\%/,""));return b<0?changePriceFormat(a-a*(-b/100)):changePriceFormat(+a+a*(b/100))}else{b=fix(b)*1;return changePriceFormat(+a+b)}}
function countCarrierPrice(a){aCourier=a.value!=""?a.value.split(";"):Array(0,0,"0.00");fDeliveryCost=fix(aCourier[2])*1;gEBI("carrierCost").innerHTML=changePriceFormat(fDeliveryCost);gEBI("orderSummary").innerHTML=changePriceFormat(+fOrderSummary+fDeliveryCost)}var aUserDataNames=new Array("sFirstName","sLastName","sCompanyName","sStreet","sZipCode","sCity","sPhone","sEmail","sNip");function saveUserData(a,b){createCookie(a,b,2)}
function checkSavedUserData(){for(var a=aUserDataNames.length,b=null,d=gEBI("order"),c=0;c<a;c++)if((b=throwCookie(aUserDataNames[c]))&&b!="")if(gEBI(aUserDataNames[c]))gEBI(aUserDataNames[c]).value=unescape(b);else if(d[aUserDataNames[c]])d[aUserDataNames[c]].value=unescape(b)}function delSavedUserData(){for(var a=aUserDataNames.length,b=0;b<a;b++)delCookie(aUserDataNames[b])}
function txtSize(a){for(var b=Array("0.917em","","1.333em"),d=Array("pageDescription","h5","productDescription"),c=Array("1.083em","1em","1.08em"),e=0;e<d.length;e++){b[a]||(a=1);if(gEBI(d[e]))gEBI(d[e]).style.fontSize=a!=1?b[a]:c[e];else if(gEBI("content").getElementsByTagName(d[e])){aH5=gEBI("content").getElementsByTagName(d[e]);for(var f=0;f<aH5.length;f++)aH5[f].style.fontSize=a!=1?b[a]:c[e]}}};