
var rozmiar_start=1;var unit_start=1;var delivery_start=0;var number_start=1;var amount_start=1;var pricenetto_start=1;var txt_niemastanu='Produkt niedostępny';var txt_status_24='w ciągu 24h';var txt_status_natychmiast='dzisiaj';var txt_days=' dni'
var txt_za=' za ';var txt_taniej='Taniej o ';var txt_oszczedzasz='oszczędzasz ';var txt_wybrany_rozmiar='Rozmiar:  ';var txt_wysylka='';var txt_wysylka_za='w ciągu ';var txt_dostepny='Dostawa  ';var txt_dostepny_za='Dostawa za ';var txt_pkt='pkt';var txt_tylkotel='Skontaktuj się ze sprzedawcą';var txt_niedostepny='Produkt niedostępny';var txt_status_amount_full='większa ilość';var txt_status_amount_null='brak w magazynie';var txt_forpointsonly='Produkt możesz kupić za punkty';var txt_forpoints_txt='Zaznacz jak chcesz kupić za punkty';var txt_disable_desc='<a href=\"contact.php\">Skontaktuj się z nami</a>';var Roller_speed=2;var Roller_timespeed=20;function tester()
{var itemz='';for(n in selectSizes)
{itemz+=n+' - '+selectSizes[n]+'<br />';}
var mycode='<div style=\"background:#fff;position:fixed;top:0;right:0;padding:10px;border:1px solid;\">'+itemz+'</div>';var tester_id=document.getElementById("'tester");tester_id.innerHTML=mycode;}
var Alertek={alert_cover:'',getScrollXY:function(){var scrOfX=0,scrOfY=0;if(typeof(window.pageYOffset)=='number'){scrOfY=window.pageYOffset;scrOfX=window.pageXOffset;}else if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){scrOfY=document.body.scrollTop;scrOfX=document.body.scrollLeft;}else if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){scrOfY=document.documentElement.scrollTop;scrOfX=document.documentElement.scrollLeft;}
return scrOfY;},pageHeight:function(){var heighter=window.innerHeight!=null?window.innerHeight:document.documentElement&&document.documentElement.clientHeight?document.documentElement.clientHeight:document.body!=null?document.body.clientHeight:null;return heighter=heighter+Alertek.getScrollXY();},show_alert:function(txt){Alertek.alert_cover=document.getElementById('alert_cover');Alertek.alert_cover.innerHTML=txt;Alertek.alert_cover.style.display='block';Alertek.alert_cover.style.top=Alertek.pageHeight()/2+'px';Alertek.alert_cover.style.left=ns6?((Popup.pageSizes()[2]/2)-(Alertek.alert_cover.clientWidth/2))+"px":((Popup.pageSizes()[2]/2)-(Alertek.alert_cover.clientWidth/2))+"px";if(navigator.appVersion.indexOf("MSIE")!=-1){temp=navigator.appVersion.split("MSIE");ver_brow=parseFloat(temp[1]);if(ver_brow<7.0){Alertek.alert_cover.style.left=(document.body.clientWidth/2)-(Alertek.alert_cover.clientWidth/2)+'px';}
if(ver_brow==7.0)
{Alertek.alert_cover.style.top=(document.body.clientHeight/2)-(Alertek.alert_cover.clientHeight)+'px';Alertek.alert_cover.style.left=(document.body.clientWidth/2)-(Alertek.alert_cover.clientWidth/2)+'px';}}
setTimeout('Alertek.hide_alert()',3000);},hide_alert:function(){Alertek.alert_cover=document.getElementById('alert_cover');Alertek.alert_cover.style.display='none';}}
var Projector={displayed:'',price_cont:'',phoneprice_cont:'',sizes_cont:'',sizes_cont_onesize:'',price_cont_yousave:'',proj_btn:'',proj_img_cover_sub:'',proj_status_gfx:'',proj_status_desc:'',forpoints_check:'',status_amount:'',msg_alert:'',temp:'',start_zero:function(){if(zm1=='1')
{if(zm2=='onesize')
{Projector.start('onesize','onesize');}
else
{Projector.start(zm2);Projector.menus('sizes_menu_list',0,zm3);}}
else
{if(rozmiar_start==0&&zm1!='1')
{Projector.start();}
else
{Projector.start(zm2);Projector.menus('sizes_menu_list',0,zm3);}}},start:function(rozm,onesize){var itnum=0;for(n in selectSizes)
{itnum++;}
if(itnum==0)
{document.getElementById('projector_ALL_component').style.display='none';Alertek.show_alert('XML ERROR '+itnum);return false;}
Projector.sizes_cont_onesize=document.getElementById('projector_sizes_cont_onesize');Projector.sizes_cont=document.getElementById('projector_sizes_cont');Projector.proj_status_cont=document.getElementById('projector_status_cont');Projector.proj_status_gfx=document.getElementById('projector_status_gfx');Projector.proj_status_gfx_cont=document.getElementById('projector_status_gfx_cont');Projector.proj_status_desc=document.getElementById('projector_status_description');Projector.proj_status_desc_title=document.getElementById('projector_status_description_title');Projector.proj_status_desc2=document.getElementById('projector_status_description2');Projector.price_cont=document.getElementById('projector_price_cont');Projector.price_maxprice=document.getElementById('projector_status_maxprice');Projector.price_cont_yousave=document.getElementById('projector_price_cont_yousave');Projector.phoneprice_cont=document.getElementById('projector_phoneprice_cont');Projector.forpoints_cont=document.getElementById('projector_forpoints');Projector.forpoints_check=document.getElementById('forpoints_check');Projector.pricepoints_sub=document.getElementById('projector_pricepoints_cont');Projector.pricepoints_value=document.getElementById('projector_pricepoints_cont_value');Projector.delivery_sub=document.getElementById('projector_delivery_cont');Projector.delivery_value=document.getElementById('projector_delivery_cont_value');Projector.deliveryfree=document.getElementById('projector_deliveryfree_cont');Projector.number_sub=document.getElementById('projector_number_cont');Projector.number_value=document.getElementById('projector_number_value');Projector.amount_sub=document.getElementById('projector_amount_cont');Projector.amount_value=document.getElementById('projector_amount_cont_value');Projector.pricenetto_sub=document.getElementById('projector_pricenetto_cont');Projector.pricenetto_value=document.getElementById('projector_pricenetto_cont_value');document.getElementById('form_projector').size.value=rozm;if(projector_first_price[4]!=''&&projector_first_price[5]!='')
{Projector.price_cont_yousave.innerHTML=txt_taniej+projector_first_price[5]+'%, '+txt_oszczedzasz+projector_first_price[4]+projector_currency;}
if(projector_first_price[2]!='')
{Projector.price_maxprice.innerHTML=projector_first_price[2]+projector_currency;}
if(projector_first_price[0]==projector_first_price[1]&&projector_first_price[0]!=0)
{if(pricenetto_start=='0'&&projector_pricenetto!='')
{Projector.pricenetto_sub.style.display="block";Projector.pricenetto_value.innerHTML=projector_pricenetto+projector_currency;}
else
{Projector.pricenetto_sub.style.display="none";}
Projector.phoneprice_cont.style.display='none';Projector.price_cont.innerHTML=projector_first_price[0]+projector_currency;}
else
{if(projector_first_price[0]!=projector_first_price[1]&&projector_first_price[0]!=0)
{Projector.price_cont.innerHTML=projector_first_price[0]+'-'+projector_first_price[1]+projector_currency;}
if(projector_first_price[0]==0)
{Projector.price_cont.style.display='none';Projector.phoneprice_cont.style.display='block';}}
if(projector_unit!=''&&unit_start=='0')
{Projector.price_cont.innerHTML+=" / "+projector_unit;}
if(rozm)Projector.status_change(rozm,onesize);},status_change:function(rozm,onesize){var status_price=selectSizes[rozm][0];var status_price_netto=selectSizes[rozm][1];var status_price_yousavepercent=selectSizes[rozm][2];var status_price_yousave=selectSizes[rozm][3];var status_price_maxprice=selectSizes[rozm][4];var status_status=selectSizes[rozm][5];var status_devilery_days=selectSizes[rozm][6];var status_desc=selectSizes[rozm][7];var status_desc_tel=selectSizes[rozm][8];var status_gfx_src=selectSizes[rozm][9];var status_name=selectSizes[rozm][10];var status_phoneprice=selectSizes[rozm][11];var status_forpoints=selectSizes[rozm][12];var status_points=selectSizes[rozm][13];var status_delivery=selectSizes[rozm][14];Projector.status_amount=selectSizes[rozm][15];var status_gfx_tel=selectSizes[rozm][16];if(status_gfx_tel!=''||status_desc_tel!='')
{if(status_gfx_tel!='')
{Projector.phoneprice_cont.innerHTML='<img id=\"projector_gfx_phoneprice\" src=\"blank.gif\" alt=\"'+status_desc_tel+'\"/>';document.getElementById('projector_gfx_phoneprice').src=status_gfx_tel;}
else if(status_desc_tel!='')
{Projector.phoneprice_cont.innerHTML=status_desc_tel;}}
if(status_forpoints=='true'&&status_status!='disabled')
{Projector.forpoints_cont.style.display="block";}
else
{Projector.forpoints_cont.style.display="none";}
if(status_points!='')
{Projector.pricepoints_sub.style.display="block";Projector.pricepoints_value.innerHTML=status_points+txt_pkt;}
else
{Projector.pricepoints_sub.style.display="none";}
if(Projector.status_amount!=''&&amount_start=='0')
{Projector.amount_sub.style.display="block";if(Projector.status_amount=='0')
{Projector.amount_value.innerHTML=txt_status_amount_null;}
if(Projector.status_amount=='-1')
{Projector.amount_value.innerHTML=txt_status_amount_full;}
if(parseInt(Projector.status_amount)>0)
{Projector.amount_value.innerHTML=Projector.status_amount;}}
else
{Projector.amount_sub.style.display="none";}
if(status_delivery!=''&&delivery_start=='0')
{if(parseInt(status_delivery)>0)
{Projector.deliveryfree.style.display="none";Projector.delivery_sub.style.display="block";Projector.delivery_value.innerHTML=status_delivery+projector_currency;}
else
{Projector.delivery_sub.style.display="none";Projector.deliveryfree.style.display="block";}}
else
{Projector.pricepoints_sub.style.display="none";}
if(number_start=='0'&&status_status!='disable')
{Projector.number_sub.style.display="block";Projector.number_value.value=1;}
else
{Projector.number_sub.style.display="none";}
if(onesize=='onesize')
{if(rozm!='onesize')
{Projector.sizes_cont_onesize.style.display='block';Projector.sizes_cont_onesize.firstChild.innerHTML=txt_wybrany_rozmiar+status_name;}
Projector.sizes_cont.style.display='none';}
else
{Projector.sizes_cont.style.display='block';}
Projector.proj_status_cont.style.display='block';if(status_price_maxprice!='')
{Projector.price_maxprice.innerHTML=status_price_maxprice+projector_currency;}
if(status_phoneprice=='true')
{Projector.price_cont.style.display='none';Projector.phoneprice_cont.style.display='block';}
else
{Projector.price_cont.style.display='block';Projector.phoneprice_cont.style.display='none';Projector.price_cont.innerHTML=status_price+projector_currency;}
if(pricenetto_start=='0'&&status_price_netto!=''&&status_phoneprice!='true')
{Projector.pricenetto_sub.style.display="block";Projector.pricenetto_value.innerHTML=status_price_netto+projector_currency;}
else
{Projector.pricenetto_sub.style.display="none";}
if(projector_unit!=''&&unit_start=='0')
{Projector.price_cont.innerHTML+=" / "+projector_unit;}
if(status_price_yousavepercent!=''&&status_price_yousave!='')
{Projector.price_cont_yousave.innerHTML=txt_taniej+status_price_yousavepercent+'%, '+txt_oszczedzasz+status_price_yousave+projector_currency;}
if(status_gfx_src!='')
{Projector.proj_status_gfx_cont.style.display="block";Projector.proj_status_gfx.innerHTML='<img src=\"blank.gif\" />';status_imageObj=new Image();status_imageObj.src=status_gfx_src;Projector.proj_status_gfx.firstChild.src=status_gfx_src;}
else
{Projector.proj_status_gfx_cont.style.display="none";}
Projector.proj_status_desc.innerHTML='';Projector.proj_status_desc_title.style.display="block";if(status_status=='enable'||status_status=='order')
{if(status_desc!='')
{Projector.proj_status_desc.innerHTML=status_desc;}}
if(status_status=='disable')
{if(status_desc!='')
{Projector.proj_status_desc.innerHTML=status_desc;if(status_devilery_days!='')
{if(status_devilery_days=='0')
{Projector.proj_status_desc.innerHTML+=txt_status_natychmiast;}
if(status_devilery_days=='1')
{Projector.proj_status_desc.innerHTML+=txt_za+txt_status_24;}
if(status_devilery_days>'1')
{Projector.proj_status_desc.innerHTML+=txt_za+status_devilery_days+txt_days;}}}
else
{Projector.proj_status_desc.innerHTML+=txt_disable_desc;}
Projector.proj_status_desc_title.style.display="none";}
if(status_status=='enable'||status_status=='order'&&status_devilery_days!='')
{Projector.proj_status_desc2.innerHTML=Projector.fun_delivery_days(status_devilery_days,status_status);}
Projector.button_act(status_status,status_phoneprice,status_forpoints);},fun_delivery_days:function(days,status){var rezult;if(status=='disable'&&days!=''&&parseInt(days)>1)
{rezult=txt_dostepny_za;}
else if(status=='disable'&&days!=''&&parseInt(days)<=1)
{rezult=txt_dostepny;}
else
{rezult='';}
if(status=='enable'||status=='order')
{if(days!=''&&parseInt(days)>1)
{rezult=txt_wysylka_za;}
if(days!=''&&parseInt(days)<=1)
{rezult=txt_wysylka;}}
if(days=='0')
{rezult+=txt_status_natychmiast;}
if(days=='1')
{rezult+=txt_status_24;}
if(days>'1')
{rezult+=days+txt_days;}
return rezult;},imagerotate:function(id){if(Projector.displayed==''){document.getElementById('img_1').style.display='none';}
else{document.getElementById(Projector.displayed).style.display='none';}
document.getElementById(id).style.display='';Projector.displayed=id;},button_act:function(status,phone,points){Projector.forpoints_cont.removeAttribute("onclick");if(status=='disable'||phone=='true')
{Projector.button_deact(txt_niedostepny);if(phone!=''&&phone=='true')
{Projector.button_deact(txt_tylkotel);}
if(points!='')
{if(points=='true'&&phone=='true')
{Projector.forpoints_check.disabled='disabled';Projector.forpoints_check.checked=true;msg_alert=txt_forpointsonly;Projector.forpoints_cont.onclick=Projector.onclicker_3;Projector.proj_btn=document.getElementById('projector_button_basket');Projector.proj_btn.style.cursor='pointer';Projector.proj_btn.onclick=Projector.onclicker_1;}
else
{Projector.button_deact(txt_tylkotel);}}}
else
{Projector.forpoints_check.disabled='';Projector.forpoints_check.checked=false;msg_alert=txt_forpoints_txt;Projector.forpoints_cont.removeAttribute("onclick");Projector.proj_btn=document.getElementById('projector_button_basket');Projector.proj_btn.style.cursor='pointer';Projector.proj_btn.onclick=Projector.onclicker_1;}
var zo="document.getElementById('iemode').value=2;document.getElementById('form_projector').submit();";Projector.proj_btn_observe=document.getElementById('projector_button_observe');Projector.proj_btn_observe.style.cursor='pointer';Projector.proj_btn_observe.onclick=Projector.onclicker_2;},onclicker_false:function()
{return false;},onclicker_1:function()
{document.getElementById('iemode').value=1;document.getElementById('form_projector').submit();},onclicker_2:function()
{document.getElementById('iemode').value=2;document.getElementById('form_projector').submit();},onclicker_3:function()
{Alertek.show_alert(msg_alert);return false;},button_deact:function(msg){msg_alert=msg;Projector.proj_btn=document.getElementById('projector_button_basket');Projector.proj_btn.style.cursor='not-allowed';Projector.proj_btn.onclick=Projector.onclicker_3;},if_isanumber:function(test)
{if(test.match("^[1-9]{1}[0-9]{0,9}$")||test==''){return test;}else
{test=test.substring(0,test.length-1);return test;}},number_check:function()
{Projector.number_value.value=Projector.if_isanumber(Projector.number_value.value);if(Projector.number_value.value>=parseInt(Projector.status_amount)&&isFinite(Projector.status_amount)&&Projector.status_amount!='-1')
{Projector.number_value.value=parseInt(Projector.status_amount);}
else
{return false;}},number_up:function()
{if(isNaN(parseInt(Projector.number_value.value)))Projector.number_value.value=1;if(Projector.number_value.value>=parseInt(Projector.status_amount)&&isFinite(Projector.status_amount)&&Projector.status_amount!='-1')
{return false;}
else
{Projector.number_value.value=parseInt(Projector.number_value.value)+1;}},number_down:function()
{if(isNaN(parseInt(Projector.number_value.value)))Projector.number_value.value=1;if(Projector.number_value.value>1)
{Projector.number_value.value=parseInt(Projector.number_value.value)-1;}},onmouseover_img:function()
{this.style.display='none';},img_cover:function(id){},menus:function(menu,switc,name){if(switc==1)
{if(document.getElementById(menu))document.getElementById(menu).style.display='block';}
else
{if(document.getElementById(menu))document.getElementById(menu).style.display='none';if(name!=0)
{if(document.getElementById('results_size_lista'))document.getElementById('results_size_lista').innerHTML=name;if(document.getElementById('bok_results_size'))document.getElementById('bok_results_size').innerHTML=name;}}},forpoints:function(){if(Projector.forpoints_cont)
{if(Projector.forpoints_cont.className=='n53486_points')
{Projector.forpoints_cont.className='n53486_points_active'}
else
{Projector.forpoints_cont.className='n53486_points'}}}}
var ns6=document.getElementById&&!document.all;var ie=document.all;var html=document.getElementsByTagName("html");var Popup={url:'http://'+location.host,link:'',width:0,height:0,loaded:0,show:function(link,x,y){Popup.link=link;Popup.width=x;Popup.height=y;Popup.loaded=1;if(document.getElementById('big_photo')){document.getElementById('big_photo').style.display="none";document.getElementById('big_photo').src=Popup.link;}
if(basecount<2||!basecount){document.getElementById('popup_next_prev').style.visibility="hidden";}
var edit=document.getElementById('show_popup_photo_sub');edit.style.width=parseInt(x)+"px";edit.style.height=parseInt(y)+"px";if(!ns6){Popup.hideSelects(1);}
Popup.creatLayers();},reload:function(){if(Popup.loaded){Popup.resize(Popup.link,Popup.width,Popup.height);}},next_img:function(){Popup.link=document.getElementById('big_photo').src;if(Popup.link.indexOf(Popup.url)!='-1')Popup.link=Popup.link.substr(Popup.url.length+1,Popup.link.length);for(n=1;n<=basecount;n++)
{if(Popup_enclosures[n][0]==Popup.link){n++;if(n<=basecount){Popup.resize(Popup_enclosures[n][0],Popup_enclosures[n][1],Popup_enclosures[n][2]);Popup.link=Popup_enclosures[n][0];return false;}
else
{Popup.resize(Popup_enclosures[1][0],Popup_enclosures[1][1],Popup_enclosures[1][2]);Popup.link=Popup_enclosures[1][0];return false;}}}},prev_img:function(){Popup.link=document.getElementById('big_photo').src;if(Popup.link.indexOf(Popup.url)!='-1')Popup.link=Popup.link.substr(Popup.url.length+1,Popup.link.length);for(n=basecount;n<=basecount;n--)
{if(Popup_enclosures[n][0]==Popup.link){n--;if(n>=1){Popup.resize(Popup_enclosures[n][0],Popup_enclosures[n][1],Popup_enclosures[n][2]);Popup.link=Popup_enclosures[n][0];return false;}
else
{Popup.resize(Popup_enclosures[basecount][0],Popup_enclosures[basecount][1],Popup_enclosures[basecount][2]);Popup.link=Popup_enclosures[basecount][0];return false;}}}},resize:function(sciezka,width,height){document.getElementById('big_photo').style.display='none';var edit=document.getElementById('show_popup_photo_sub');var edit2=document.getElementById('show_popup_photo');document.getElementById('big_photo').src=sciezka;edit.style.width=parseInt(width)+"px";edit2.style.width=parseInt(width)+"px";edit.style.height=parseInt(height)+"px";edit2.style.left=ns6?(Popup.pageSizes()[2]-(edit2.clientWidth+10))/2+html[0].scrollLeft+"px":(Popup.pageSizes()[2]-(edit2.clientWidth+10))/2+"px";},hide:function(){var edit=document.getElementById('show_popup_photo');var edit_close=document.getElementById('show_popup_photo_close');var cover=document.getElementById('cover');edit.style.display="none";edit_close.style.display="none";cover.style.display="none";Popup.loaded=0;if(!ns6){Popup.hideSelects(0);}},cover:function(wartosc){var cover=document.getElementById('cover');ns6?cover.style.opacity='.'+wartosc:cover.style.filter="alpha(Opacity="+wartosc+")";if(window.opera){cover.style.opacity='.'+wartosc;}},creatLayers:function(){var edit=document.getElementById('show_popup_photo');var edit_close=document.getElementById('show_popup_photo_close');edit.style.position='absolute';edit.style.display="block";edit_close.style.display="block";edit.style.width=(Popup.width)+"px";edit.style.left=ns6?(Popup.pageSizes()[2]-(Popup.width+10))/2+html[0].scrollLeft+"px":(Popup.pageSizes()[2]-(Popup.width+10))/2+"px";var ver_brow=0;if(navigator.appVersion.indexOf("MSIE")!=-1){temp=navigator.appVersion.split("MSIE");ver_brow=parseFloat(temp[1]);if(ver_brow<7.0)
{edit.style.top=((((Popup.pageSizes()[3]-(Popup.height+10))/2)-100+document.body.scrollTop)<0)?"50px":(((Popup.pageSizes()[3]-(Popup.height+10))/2)-100+document.body.scrollTop+50)+"px";}
else
{edit.style.top=((((Popup.pageSizes()[3]-(Popup.height+10))/2)-100+html[0].scrollTop)<0)?"50px":(((Popup.pageSizes()[3]-(Popup.height+10))/2)-100+html[0].scrollTop+50)+"px";}}
else
{edit.style.top=((((Popup.pageSizes()[3]-(Popup.height+10))/2)-100+html[0].scrollTop)<0)?"50px":(((Popup.pageSizes()[3]-(Popup.height+10))/2)-100+html[0].scrollTop+50)+"px";}
edit.style.zIndex=1000;edit.style.Background='#FFFFFF';var cover=document.getElementById('cover');cover.style.display="block";cover.style.position="absolute";cover.style.zIndex=900;ns6?cover.style.opacity=.5:cover.style.filter="alpha(Opacity=50)";if(window.opera){cover.style.opacity=.5;}
cover.style.left="0px";cover.style.top="0px";offsetX=0;if(!ns6&&!window.opera){offsetX=20;}
cover.style.width=ns6?(Popup.pageSizes()[0]-16)+"px":Popup.pageSizes()[0]-offsetX+"px";cover.style.height=Popup.pageSizes()[1]+"px"},pageSizes:function(){var xScroll,yScroll;if(window.innerHeight&&window.scrollMaxY){xScroll=document.body.scrollWidth;yScroll=window.innerHeight+window.scrollMaxY;}else if(document.body.scrollHeight>document.body.offsetHeight){xScroll=document.body.scrollWidth;yScroll=document.body.scrollHeight;}else{xScroll=document.body.offsetWidth;yScroll=document.body.offsetHeight;}
var windowWidth,windowHeight;if(self.innerHeight){windowWidth=self.innerWidth;windowHeight=self.innerHeight;}else if(document.documentElement&&document.documentElement.clientHeight){windowWidth=document.documentElement.clientWidth;windowHeight=document.documentElement.clientHeight;}else if(document.body){windowWidth=document.body.clientWidth;windowHeight=document.body.clientHeight;}
if(yScroll<windowHeight){pageHeight=windowHeight;}else{pageHeight=yScroll;}
if(xScroll<windowWidth){pageWidth=windowWidth;}else{pageWidth=xScroll;}
arrayPageSize=new Array(pageWidth,pageHeight,windowWidth,windowHeight)
return arrayPageSize;},hideSelects:function(flag){var selects=document.getElementsByTagName('SELECT');if(flag==1){for(i=0;i<selects.length;i++){selects[i].style.display='none';}}else{for(i=0;i<selects.length;i++){selects[i].style.display='';}}}}
window.onresize=function(){if(Popup.loaded==1){Popup.reload();}}
var Roller={getALL:function(id,id2)
{Roller.width_pasek=0;Roller.mainID=document.getElementById(id);Roller.mainwidth=Roller.mainID.clientWidth;Roller.lilist=document.getElementById(id2);var elements=Roller.lilist.getElementsByTagName('li');for(n=0;n<elements.length;n++)
{Roller.width_pasek+=elements[n].clientWidth;}},Left:function()
{clearInterval(Roller.SI);if(Roller.mainID.scrollLeft>=0)
{Roller.mainID.scrollLeft-=Roller_speed;}
Roller.SI=setInterval("Roller.Left()",Roller_timespeed);},Right:function()
{clearInterval(Roller.SI);if(Roller.mainID.scrollLeft<=Roller.width_pasek-Roller.mainwidth)
{Roller.mainID.scrollLeft+=Roller_speed;}
Roller.SI=setInterval("Roller.Right()",Roller_timespeed);},StopInterval:function()
{clearInterval(Roller.SI);},lilist:0,mainwidth:0,mainID:0,width_pasek:0,SI:0}
var zagielnotconfirmed="Zanim złożysz zamówienie, zapoznaj się z procedurą udzielenia kredytu ratalnego E-kredyt Żagiel.";function viewGroupEdit(group_id,item_id)
{element=document.getElementById('div_group_edit');element.style.display='block';document.getElementById('group_'+group_id).style.display='block';document.getElementById('item_'+item_id).style.display='block';}
var product_id=0;var size_id=0;var price=0;function baskQuantity()
{sel_sz=document.getElementById('select_sizes_'+product_id);div_nr_n=document.getElementById('div_num_'+product_id+'_'+size_id);div_nr_b=document.getElementById('div_num_'+product_id+'_'+sel_sz.value);sel_nr_n=document.getElementById('select_num_'+product_id+'_'+size_id);sel_nr_b=document.getElementById('select_num_'+product_id+'_'+sel_sz.value);div_nr_n.style.display='none';div_nr_b.style.display='block';sel_nr_n.disabled=true;sel_nr_b.disabled=false;size_id=sel_sz.value;div_pr=document.getElementById('div_price');inp_pr=document.getElementById('price_'+product_id+'_'+sel_sz.value);inp_cr=document.getElementById('cur_sign');if(inp_pr.value!=''){div_pr.innerHTML=inp_pr.value+inp_cr.value;}else{div_pr.innerHTML=inp_pr.value;}}
function hideGroupEdit()
{element=document.getElementById('div_group_edit');element.style.display='none';}
function basket_isNumeric(id,precision){var elem=document.getElementById(id);if(precision>0){if(elem.value.match("^[0-9]{1,9}[\.,]{0,1}[0-9]{0,"+precision+"}$")||elem.value==''){elem.value=elem.value.replace(',','.');return true;}else{elem.value=elem.value.substring(0,elem.value.length-1);return false;}}
if(precision==0){if(elem.value.match("^[1-9]{1}[0-9]{0,9}$")||elem.value==''){return true;}else{elem.value=elem.value.substring(0,elem.value.length-1);return false;}}}
function countAnnuityZagiel(account,amount)
{window.open('http://www.zagiel.com.pl/kalkulator/index_smart.php?action=getklientdet_si_rata&shopNo='+account+'&goodsValue='+amount,'count_zagiel','width=630,height=500,directories=no,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no');}
function validate_Zagiel()
{var zagielconfirm=document.getElementById('zagiel_confirm');if(zagielconfirm.checked){return true;}else{alert(zagielnotconfirmed)
return false;}}
function insletter(letter,idk){var inp=document.getElementById(idk);inp.value+=letter;inp.focus();}
function insletterB(letter,idk){var inp=document.getElementById(idk);tv=inp.value;tv=tv.substr(0,tv.length-1);letter=letter.toUpperCase();inp.value=tv+letter;inp.focus();}
function menu_categories_toggle(id){if(document.getElementById(id).style.display=='block'){document.getElementById(id).style.display='none';}else{document.getElementById(id).style.display='block';}}
var Hlider={Navi:function(num,id,id2,clas,nullek)
{Hlider.Hlider_jump=num;Hlider.Hlider_mainID=id;Hlider.Hlider_naviID=id2;Hlider.Hlider_naviclass=clas;Hlider.mainID=document.getElementById(Hlider.Hlider_mainID);Hlider.mainwidth=Hlider.mainID.clientWidth;Hlider.lilist=document.getElementById(Hlider.Hlider_mainID).firstChild;Hlider.mainwidth=Hlider.mainID.clientWidth;var elements=Hlider.lilist.getElementsByTagName('li');Hlider.elements_count=elements.length;Hlider.navi_count=Math.ceil(Hlider.elements_count/Hlider.Hlider_jump);var naviID=document.getElementById(Hlider.Hlider_naviID);if(nullek!='NULL')
{Hlider.width_pasek=0;naviID.innerHTML='';for(i=1;i<=Hlider.navi_count;i++)
{var newDiv=document.createElement('div');newDiv.className=Hlider.Hlider_naviclass;if(i==1)newDiv.className=Hlider.Hlider_naviclass+"_on";newDiv.id=Hlider.Hlider_mainID+"|"+Hlider.Hlider_naviclass;newDiv.onclick=Hlider.Start;newDiv.innerHTML=i;naviID.appendChild(newDiv);}
Hlider.mainID.scrollLeft=0;var elements=Hlider.lilist.getElementsByTagName('li');Hlider.elements_count=elements.length;for(n=0;n<Hlider.elements_count;n++)
{Hlider.width_pasek+=elements[n].clientWidth;Hlider.element_width=elements[n].clientWidth;}
if(Hlider.element_width==0)
{setTimeout("Hlider.Navi('"+num+"','"+id+"','"+id2+"','"+clas+"')",500);return false;}}},Clear:function(num)
{var naviID=document.getElementById(Hlider.Hlider_naviID);var elements=naviID.getElementsByTagName('div');for(i=0;i<elements.length;i++)
{if(elements[i].innerHTML==num)
{elements[i].className=Hlider.Hlider_naviclass+"_on";}
else
{elements[i].className=Hlider.Hlider_naviclass;}}},Start:function(num)
{var num=parseInt(this.innerHTML);var table_id=this.id.split("|");Hlider.Hlider_naviID=this.parentNode.id;Hlider.Hlider_mainID=table_id[0];Hlider.Hlider_naviclass=table_id[1];Hlider.mainID=document.getElementById(Hlider.Hlider_mainID);Hlider.Move(num);},Move:function(num)
{Hlider.Clear(num);clearInterval(Hlider.Time);Hlider.scroll_width=0;for(n=1;n<=num;n++)
{Hlider.scroll_width+=(Hlider.element_width*Hlider.Hlider_jump);}
Hlider.scroll_width=Hlider.scroll_width_tmp=Hlider.scroll_width-(Hlider.element_width*Hlider.Hlider_jump);Hlider.Time=setInterval("Hlider.Anim()",40);},Anim:function()
{Hlider.scroll_width=Math.abs(Hlider.mainID.scrollLeft-Hlider.scroll_width_tmp);if(Hlider.mainID.scrollLeft<Hlider.scroll_width_tmp)
{Hlider.Scroll=Math.round(Hlider.mainID.scrollLeft)+(Hlider.scroll_width/Hlider.Hlider_speed);}
else
{Hlider.Scroll=Math.round(Hlider.mainID.scrollLeft)-(Hlider.scroll_width/Hlider.Hlider_speed);}
Hlider.scroll_width=Math.round(Hlider.scroll_width/Hlider.Hlider_speed);if(Math.round(Hlider.Scroll)==Hlider.scroll_width_tmp)
{clearInterval(Hlider.Time);}
Hlider.mainID.scrollLeft=Hlider.Scroll;},Left:function(num,id,id2,clas,nullek)
{Hlider.Navi(num,id,id2,clas,nullek);clearInterval(Hlider.Time);Hlider.scroll_width=0;var number=Math.round((Hlider.mainID.scrollLeft/Hlider.element_width)/Hlider.Hlider_jump);if(number==0)
{number=Hlider.navi_count;}
Hlider.Move(number);},Right:function(num,id,id2,clas,nullek)
{Hlider.Navi(num,id,id2,clas,nullek);clearInterval(Hlider.Time);Hlider.scroll_width=0;var number=Math.round((Hlider.mainID.scrollLeft/Hlider.element_width)/Hlider.Hlider_jump);number++;number++;if(number>Hlider.navi_count)
{number=1;}
Hlider.Move(number);},Hlider_mainID:0,Hlider_naviID:0,Hlider_naviclass:0,Hlider_speed:3,Hlider_jump:0,lilist:0,mainwidth:0,mainID:'',width_pasek:0,elements_count:0,navi_count:0,element_width:0,scroll_width:0,scroll_width_tmp:0,Time:0,Scroll:0,SI:0}
var baner_speed=8000;function baner_rotate(caser)
{if(caser==0)
{Hlider.Right(1,'hlider_cont','hlider_navi','navi','NULL');time=setTimeout('baner_rotate(0)',baner_speed);}
if(caser==1)
{clearTimeout(time);Hlider.Left(1,'hlider_cont','hlider_navi','navi','NULL');}
if(caser==2)
{clearTimeout(time);Hlider.Left(1,'hlider_cont','hlider_navi','navi','NULL');}}
var IAI_Ajax={cO:function()
{var r;try{r=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{r=new ActiveXObject("Microsoft.XMLHTTP");}catch(oc){r=null;}}
if(!r&&typeof XMLHttpRequest!="undefined"){r=new XMLHttpRequest();}
return r;},Request:function(url,pd,fun)
{var x;x=IAI_Ajax.cO();x.open("POST",url,true);x.setRequestHeader("Content-Type","application/x-www-form-urlencoded");x.setRequestHeader("Accept","text/javascript, text/html, application/xml, text/xml, */*");x.setRequestHeader("X-IAI-Version","1.0");x.onreadystatechange=function()
{if(x.readyState==4){if(x.status>=200&&x.status<300){if(fun){if(fun.onSuccess){if(fun.arg){eval(fun.onSuccess+'(\''+x.responseText+'\', \''+fun.arg+'\');');}else{eval(fun.onSuccess+'(\''+x.responseText+'\');');}}}}else{}}}
x.send(pd);delete x;}}
function client_addresses_list_confirmdelete(){return confirm('Are you sure you want to delete the selected delivery address?');}
function orderpayment(id){document.getElementById('idle_payment').style.display='none';allDivs=document.getElementsByTagName("div");for(i=0;i<allDivs.length;i++){if((/^newpayment_form_/).test(allDivs[i].id)==true){allDivs[i].style.display='none';}}
if(document.getElementById('newpayment_form_'+id)){document.getElementById('newpayment_form_'+id).style.display='block';}}
var top_searchtxt='szukaj';function top_searching_blur(x){if(x.value==''){x.value=top_searchtxt;}}
function top_searching_focus(x){if(x.value!=''){x.value='';}}
var client_new_txt1='Wysyłka na adres zamawiającego';var client_new_txt1b='Wysyłka na adres z faktury';var client_new_txt2='Adres zamawiającego';var client_new_txt2b='Dane do faktury';var client_new_txt3='Dane kontaktowe';var client_new_txt3b='Dane kontaktowe';var client_new_texts;var ClientNew_status=true;var ClientNew_firma=false;var ClientNew_adres=true;var ClientNewMandatoryMail=false;var ClientNewMandatoryPhone=false;var ClientSender=new Array();var RemoveAddresLink;var ClientNew={switchDiVDeliveryAddres:function()
{document.getElementById("selectDeliveryAddress").style.display="none";document.getElementById("selectDeliveryAddress2").style.display="block";},switchDeliveryAddres:function(id,obj)
{var IdAddress=id;if(IdAddress){document.getElementById('delivery_id').value=IdAddress;document.getElementById("selectDeliveryAddress").innerHTML=obj.firstChild.innerHTML;document.getElementById("selectDeliveryAddress2").style.display="none";document.getElementById("selectDeliveryAddress").style.display="block";document.getElementById('additional_firstname').value=document.getElementById('cda_'+IdAddress+'_firstname').innerHTML;document.getElementById('additional_lastname').value=document.getElementById('cda_'+IdAddress+'_lastname').innerHTML;document.getElementById('additional_city').value=document.getElementById('cda_'+IdAddress+'_city').innerHTML;document.getElementById('additional_additional').value=document.getElementById('cda_'+IdAddress+'_additional').innerHTML;document.getElementById('additional_street').value=document.getElementById('cda_'+IdAddress+'_street').innerHTML;document.getElementById('additional_zipcode').value=document.getElementById('cda_'+IdAddress+'_zipcode').innerHTML;document.getElementById('additional_phone').value=document.getElementById('cda_'+IdAddress+'_phone').innerHTML;if(document.getElementById('additional_region')&&document.getElementById('additional_region').options){for(i=0;i<document.getElementById('additional_region').options.length;i++){if(document.getElementById('additional_region').options[i].value==document.getElementById('cda_'+IdAddress+'_region_id').innerHTML){document.getElementById('additional_region').selectedIndex=i;break;}}}
if(document.getElementById('cda_'+IdAddress+'_removable').innerHTML=='yes'){document.getElementById('delete_delivery_address').style.display='';RemoveAddresLink=document.getElementById('cda_'+IdAddress+'_removelink').innerHTML;}else{document.getElementById('delete_delivery_address').style.display='none';RemoveAddresLink='';}}else{document.getElementById('delete_delivery_address').style.display='none';RemoveAddresLink='';document.getElementById('additional_firstname').value='';document.getElementById('additional_lastname').value='';document.getElementById('additional_city').value='';document.getElementById('additional_additional').value='';document.getElementById('additional_street').value='';document.getElementById('additional_zipcode').value='';document.getElementById('additional_phone').value='';}
if(document.getElementById('cda_'+IdAddress+'_editable').innerHTML=='no'){document.getElementById('additional_firstname').disabled='disabled';document.getElementById('additional_lastname').disabled='disabled';document.getElementById('additional_city').disabled='disabled';document.getElementById('additional_additional').disabled='disabled';document.getElementById('additional_street').disabled='disabled';document.getElementById('additional_zipcode').disabled='disabled';document.getElementById('additional_phone').disabled='disabled';document.getElementById('additional_region').disabled='disabled';}else{document.getElementById('additional_firstname').disabled='';document.getElementById('additional_lastname').disabled='';document.getElementById('additional_city').disabled='';document.getElementById('additional_additional').disabled='';document.getElementById('additional_street').disabled='';document.getElementById('additional_zipcode').disabled='';document.getElementById('additional_phone').disabled='';document.getElementById('additional_region').disabled='';}},removeDeliveryAddress:function()
{if(RemoveAddresLink){if(confirm("Czy na pewno chcesz usunąć ten adres dostawy?")){IAI_Ajax.Request('ajax/client-new.php?removeAddres=true','address='+document.getElementById('delivery_id').value,{onSuccess:'ClientNew.deleteAddress'});}}},newDeliveryAddress:function()
{document.getElementById('delivery_id').value='';document.getElementById('selectDeliveryAddress').style.display='none';document.getElementById('selectDeliveryAddress2').style.display='none';document.getElementById('additional_address_list_txt').style.display='none';document.getElementById('delete_delivery_address').style.display='none';document.getElementById('newDeliveryAddress').style.display='none';document.getElementById('saveDeliveryAddress').style.display='block';RemoveAddresLink='';document.getElementById('additional_firstname').value='';document.getElementById('additional_lastname').value='';document.getElementById('additional_city').value='';document.getElementById('additional_additional').value='';document.getElementById('additional_street').value='';document.getElementById('additional_zipcode').value='';document.getElementById('additional_phone').value='';document.getElementById('additional_firstname').disabled='';document.getElementById('additional_lastname').disabled='';document.getElementById('additional_city').disabled='';document.getElementById('additional_additional').disabled='';document.getElementById('additional_street').disabled='';document.getElementById('additional_zipcode').disabled='';document.getElementById('additional_phone').disabled='';document.getElementById('additional_region').disabled='';},deleteAddress:function(x)
{try{var response=eval('('+x+')');}catch(e){return false;}
xr=response;document.getElementById('delivery_list_id_'+response.remove).style.display="none";ClientNew.switchDeliveryAddres(response.selected,document.getElementById('delivery_list_id_'+response.selected));},copyDeliveryAddres:function()
{if(document.getElementById('deliver_to_billingaddr').checked){document.getElementById('delivery_additional').value=ClientNew_firma?document.getElementById('client_firm').value:'';document.getElementById('delivery_firstname').value=document.getElementById('client_firstname').value;document.getElementById('delivery_lastname').value=document.getElementById('client_lastname').value;document.getElementById('delivery_zipcode').value=document.getElementById('client_zipcode').value;document.getElementById('delivery_street').value=document.getElementById('client_street').value;document.getElementById('delivery_city').value=document.getElementById('client_city').value;document.getElementById('delivery_phone').value=document.getElementById('client_phone').value;document.getElementById('box_4').className='n56203_box_idle';document.getElementById('delivery_additional').disabled='disabled';document.getElementById('delivery_firstname').disabled='disabled';document.getElementById('delivery_lastname').disabled='disabled';document.getElementById('delivery_zipcode').disabled='disabled';document.getElementById('delivery_street').disabled='disabled';document.getElementById('delivery_city').disabled='disabled';if(document.getElementById('delivery_region')){document.getElementById('delivery_region').value=document.getElementById('client_region').value;document.getElementById('delivery_region').disabled='disabled';}}else{document.getElementById('box_4').className='n56203_box';document.getElementById('delivery_additional').disabled='';document.getElementById('delivery_firstname').disabled='';document.getElementById('delivery_lastname').disabled='';document.getElementById('delivery_zipcode').disabled='';document.getElementById('delivery_street').disabled='';document.getElementById('delivery_city').disabled='';document.getElementById('delivery_phone').disabled='';document.getElementById('delivery_additional_img_off').style.display=document.getElementById('client_firm_img_off').style.display;document.getElementById('delivery_additional_img_on').style.display=document.getElementById('client_firm_img_on').style.display;document.getElementById('delivery_firstname_img_off').style.display=document.getElementById('client_firstname_img_off').style.display;document.getElementById('delivery_firstname_img_on').style.display=document.getElementById('client_firstname_img_on').style.display;document.getElementById('delivery_lastname_img_off').style.display=document.getElementById('client_lastname_img_off').style.display;document.getElementById('delivery_lastname_img_on').style.display=document.getElementById('client_lastname_img_on').style.display;document.getElementById('delivery_zipcode_img_off').style.display=document.getElementById('client_zipcode_img_off').style.display;document.getElementById('delivery_zipcode_img_on').style.display=document.getElementById('client_zipcode_img_on').style.display;document.getElementById('delivery_street_img_off').style.display=document.getElementById('client_street_img_off').style.display;document.getElementById('delivery_street_img_on').style.display=document.getElementById('client_street_img_on').style.display;document.getElementById('delivery_city_img_off').style.display=document.getElementById('client_city_img_off').style.display;document.getElementById('delivery_city_img_on').style.display=document.getElementById('client_city_img_on').style.display;document.getElementById('delivery_phone_img_off').style.display=document.getElementById('client_phone_img_off').style.display;document.getElementById('delivery_phone_img_on').style.display=document.getElementById('client_phone_img_on').style.display;if(document.getElementById('delivery_region')){document.getElementById('delivery_region').disabled='';}}},use_vat:function(){if(document.getElementById('firm_data2').checked){var idr=document.getElementById('client_region').value;if(countryVatArray[idr]=='n'){document.getElementById('vat_ue').style.display='';}else{document.getElementById('vat_ue').style.display='none';}}else{document.getElementById('vat_ue').style.display='none';}},check_inp:function(idd,name,delay){if(document.getElementById(idd)){idd=document.getElementById(idd);}
ClientNew.use_vat();var value=idd.value;if(ClientSender[name]>5){ClientSender[name]=1;if(name=='client_zipcode'){IAI_Ajax.Request('ajax/client-new.php?validAjax=true','client_zipcode='+value+'&client_region='+document.getElementById('client_region').value,{onSuccess:'ClientNew.info',arg:idd.id});}else if(name=='delivery_zipcode'){IAI_Ajax.Request('ajax/client-new.php?validAjax=true','delivery_zipcode='+value+'&delivery_region='+document.getElementById('delivery_region').value,{onSuccess:'ClientNew.info',arg:idd.id});}else if(name=='additional_zipcode'){IAI_Ajax.Request('ajax/client-new.php?validAjax=true','additional_zipcode='+value+'&additional_region='+document.getElementById('additional_region').value,{onSuccess:'ClientNew.info',arg:idd.id});}else if(name=='client_region'){ClientNew.check_inp(document.getElementById('client_zipcode'),'client_zipcode');}else if(name=='delivery_region'){ClientNew.check_inp(document.getElementById('delivery_zipcode'),'delivery_zipcode');}else if(name=='additional_region'){ClientNew.check_inp(document.getElementById('additional_zipcode'),'additional_zipcode');}else if(name=='client_password'){IAI_Ajax.Request('ajax/client-new.php?validAjax=true','client_password='+value+'&client_login='+document.getElementById('client_login').value,{onSuccess:'ClientNew.info',arg:idd.id});}else if(name=='repeat_password'){IAI_Ajax.Request('ajax/client-new.php?validAjax=true','repeat_password='+value+'&client_password='+document.getElementById('client_password').value,{onSuccess:'ClientNew.info',arg:idd.id});}else{if(value){IAI_Ajax.Request('ajax/client-new.php?validAjax=true',name+'='+value,{onSuccess:'ClientNew.info',arg:idd.id});}else{ClientNew.error(idd.id,0);document.getElementById(idd.id+'_img_off').style.display="none";document.getElementById(idd.id+'_img_on').style.display="none";}}}else{if(delay){if(ClientSender[name]>1){ClientSender[name]++;delay++;}else{return false;}}else{if(ClientSender[name]>2){ClientSender[name]=2;return false;}else{ClientSender[name]=2;delay=1;}}
setTimeout('ClientNew.check_inp("'+idd.id+'", "'+name+'", "'+delay+'")',100);}
if(name=='client_login'){document.getElementById('client_login').value=document.getElementById('client_login').value.toLowerCase();}
if(document.getElementById('deliver_to_billingaddr')){if(document.getElementById('deliver_to_billingaddr').checked){ClientNew.copyDeliveryAddres();}}},info:function(x,obj){try{var response=eval('('+x+')');}catch(e){return false;}
xr=response;if(response.errno==0){new ClientNew.error(obj,0);}else{if(response.message.error_code){document.getElementById(obj+'_help').innerHTML='<div>'+clientNewErrorCode[response.message.error_code]+'</div>';}
new ClientNew.error(obj,1);}},button:function(num){if(num==0&&document.getElementById('terms_agree').checked){document.getElementById('submit_register').className='act';}else{document.getElementById('submit_register').className='idle';}},submitform:function(){ClientNew_status=true;if(!document.getElementById("client_firstname").value){ClientNew_status=false;}
if(!document.getElementById("client_lastname").value){ClientNew_status=false;}
if(!document.getElementById("client_city").value){ClientNew_status=false;}
if(!document.getElementById("client_zipcode").value){ClientNew_status=false;}
if(!document.getElementById("client_street").value){ClientNew_status=false;}
if(document.getElementById("firm_data2")){if(document.getElementById("firm_data2").checked&&(!document.getElementById("client_firm").value||!document.getElementById("client_nip").value)){ClientNew_status=false;}}
if(document.getElementById("client_login")){if(!document.getElementById("client_login").value){ClientNew_status=false;}}
if(document.getElementById("client_password")){if(!document.getElementById("client_password").value||!document.getElementById("repeat_password").value){ClientNew_status=false;}}
if(document.getElementById("deliver_to_billingaddr")){if(!document.getElementById("deliver_to_billingaddr").checked){if((!document.getElementById("delivery_firstname").value||!document.getElementById("delivery_lastname").value)&&!document.getElementById("delivery_additional").value){ClientNew_status=false;}
if(!document.getElementById("delivery_zipcode").value){ClientNew_status=false;}
if(!document.getElementById("delivery_street").value){ClientNew_status=false;}
if(!document.getElementById("delivery_city").value){ClientNew_status=false;}}}
if(ClientNewMandatoryPhone){if(!document.getElementById('client_phone').value){ClientNew_status=false;}
if(document.getElementById('additional_phone')){if((!document.getElementById('additional_phone').value)&&!document.getElementById('additional_phone').disabled){ClientNew_status=false;}}else if(document.getElementById('delivery_phone')){if((!document.getElementById('delivery_phone').value)&&!document.getElementById('delivery_phone').disabled){ClientNew_status=false;}}}
if(ClientNewMandatoryMail){if(!document.getElementById('client_email').value){ClientNew_status=false;}}
if(document.getElementById('terms_agree')){if((!document.getElementById('terms_agree').checked)&&document.getElementById('terms_agree').type!='hidden'){ClientNew_status=false;}}
if(ClientNew_status==true){if(document.getElementById("button_alert")){document.getElementById("button_alert").style.display="none";}
return true;}else{if(document.getElementById("button_alert")){document.getElementById("button_alert").style.display="block";setTimeout('ClientNew.AlertOff()',5000);}
return false;}
if(document.getElementById('vat_ue').style.display!='none'&&!document.getElementById('vat_company').checked){document.getElementById("button_alert").style.display="block";setTimeout('ClientNew.AlertOff()',5000);return false;}},ramka:function(){if(!document.getElementById('terms_agree').checked){document.getElementById('terms_agree_box').className='ramka_ON';}else{document.getElementById('terms_agree_box').className='ramka_OFF';}},AlertOff:function(){document.getElementById("button_alert").style.display="none";},copy_adres:function(type){var CopyData=false;if(document.getElementById("firm_data")){CopyData=document.getElementById("firm_data").checked;}
if(CopyData&&type==1){document.getElementById('client_firstname').value=document.getElementById('client_firstname_copy').value;document.getElementById('client_firstname_img_off').style.display=document.getElementById('client_firstname_copy_img_off').style.display;document.getElementById('client_firstname_img_on').style.display=document.getElementById('client_firstname_copy_img_on').style.display;document.getElementById('client_lastname').value=document.getElementById('client_lastname_copy').value;document.getElementById('client_lastname_img_off').style.display=document.getElementById('client_lastname_copy_img_off').style.display;document.getElementById('client_lastname_img_on').style.display=document.getElementById('client_lastname_copy_img_on').style.display;}else if(type==2){document.getElementById('client_firstname_copy').value=document.getElementById('client_firstname').value;document.getElementById('client_firstname_copy_img_off').style.display=document.getElementById('client_firstname_img_off').style.display;document.getElementById('client_firstname_copy_img_on').style.display=document.getElementById('client_firstname_img_on').style.display;document.getElementById('client_lastname_copy').value=document.getElementById('client_lastname').value;document.getElementById('client_lastname_copy_img_off').style.display=document.getElementById('client_lastname_img_off').style.display;document.getElementById('client_lastname_copy_img_on').style.display=document.getElementById('client_lastname_img_on').style.display;}},error:function(idd,err){if(err==1){document.getElementById(idd+'_img_off').style.display="block";document.getElementById(idd+'_img_on').style.display="none";if(document.getElementById(idd+'_help')){document.getElementById(idd+'_help').style.display="block";ClientNew.hide_info_help(idd,10);}
return false;}else{document.getElementById(idd+'_img_off').style.display="none";document.getElementById(idd+'_img_on').style.display="block";if(document.getElementById(idd+'_help')){document.getElementById(idd+'_help').style.display="none";ClientNew.hide_info_help(idd,10);}
return false;}},hide_info_help:function(idd,licznik){if(licznik>1){setTimeout("ClientNew.hide_info_help('"+idd+"', '"+(licznik-1)+"');",1000);}else if(document.getElementById(idd+'_help')){document.getElementById(idd+'_help').style.display="none";}}}
var xr;function agree(){if(document.getElementById('terms_agree').checked&&ClientNew_status==true){document.getElementById('submit_register').className='act';}else{document.getElementById('submit_register').className='idle';}}
function clientnew_firm(){ClientNew.use_vat();if(document.getElementById('firm_data').checked){ClientNew_firma=false;document.getElementById('client_firm_div').style.display='none';document.getElementById('box_3_header').innerHTML=client_new_txt2;document.getElementById('box_1_header').innerHTML=client_new_txt3;if(document.getElementById('send_to')){document.getElementById('send_to').innerHTML=client_new_txt1;}
document.getElementById('client_firstname_copy_txt').className='';document.getElementById('client_firstname_copy').className='';document.getElementById('client_lastname_copy_txt').className='';document.getElementById('client_lastname_copy').className='';}else{ClientNew_firma=true;document.getElementById('client_firm_div').style.display='block';document.getElementById('box_3_header').innerHTML=client_new_txt2b;document.getElementById('box_1_header').innerHTML=client_new_txt3b;if(document.getElementById('send_to')){document.getElementById('send_to').innerHTML=client_new_txt1b;}
document.getElementById('client_firstname_copy_txt').className='hidden';document.getElementById('client_firstname_copy').className='hidden';document.getElementById('client_lastname_copy_txt').className='hidden';document.getElementById('client_lastname_copy').className='hidden';}}
var client_new_txt1='Wysyłka na adres zamawiającego';var client_new_txt1b='Wysyłka na adres z faktury';var client_new_txt2='Adres zamawiającego';var client_new_txt2b='Dane do faktury';var client_new_txt3='Dane kontaktowe';var client_new_txt3b='Dane kontaktowe';var ClientNew_status=true;var ClientNew_firma=false;var ClientNew_adres=true;var ClientNewMandatoryMail=false;var ClientNewMandatoryPhone=false;var ClientSender=new Array();var ClientNewWholesale={use_vat:function(){var idr=document.getElementById('client_region').value;if(countryVatArray[idr]=='n'){document.getElementById('vat_ue').style.display='';}else{document.getElementById('vat_ue').style.display='none';}},check_inp:function(idd,name,delay){if(document.getElementById(idd)){idd=document.getElementById(idd);}
ClientNewWholesale.use_vat();var value=idd.value;if(ClientSender[name]>5){ClientSender[name]=1;if(name=='client_zipcode'){IAI_Ajax.Request('ajax/client-new.php?validAjax=true','client_zipcode='+value+'&client_region='+document.getElementById('client_region').value,{onSuccess:'ClientNewWholesale.info',arg:idd.id});}else if(name=='delivery_zipcode'){IAI_Ajax.Request('ajax/client-new.php?validAjax=true','delivery_zipcode='+value+'&delivery_region='+document.getElementById('delivery_region').value,{onSuccess:'ClientNewWholesale.info',arg:idd.id});}else if(name=='client_region'){ClientNewWholesale.check_inp(document.getElementById('client_zipcode'),'client_zipcode');}else if(name=='delivery_region'){ClientNewWholesale.check_inp(document.getElementById('delivery_zipcode'),'delivery_zipcode');}else if(name=='client_password'){IAI_Ajax.Request('ajax/client-new.php?validAjax=true','client_password='+value+'&client_login='+document.getElementById('client_login').value,{onSuccess:'ClientNewWholesale.info',arg:idd.id});}else if(name=='repeat_password'){IAI_Ajax.Request('ajax/client-new.php?validAjax=true','repeat_password='+value+'&client_password='+document.getElementById('client_password').value,{onSuccess:'ClientNewWholesale.info',arg:idd.id});}else{if(value){IAI_Ajax.Request('ajax/client-new.php?validAjax=true',name+'='+value,{onSuccess:'ClientNewWholesale.info',arg:idd.id});}else{ClientNewWholesale.error(idd.id,0);document.getElementById(idd.id+'_img_off').style.display="none";document.getElementById(idd.id+'_img_on').style.display="none";}}}else{if(delay){if(ClientSender[name]>1){ClientSender[name]++;delay++;}else{return false;}}else{if(ClientSender[name]>2){ClientSender[name]=2;return false;}else{ClientSender[name]=2;delay=1;}}
setTimeout('ClientNewWholesale.check_inp("'+idd.id+'", "'+name+'", "'+delay+'")',100);}
if(name=='client_login'){document.getElementById('client_login').value=document.getElementById('client_login').value.toLowerCase();}
if(document.getElementById('deliver_to_billingaddr')){if(document.getElementById('deliver_to_billingaddr').checked){ClientNewWholesale.deliveryaddr();}}},info:function(x,obj){try{var response=eval('('+x+')');}catch(e){return false;}
xr=response;if(response.errno==0){new ClientNewWholesale.error(obj,0);}else{if(response.message.error_code){ClNew.g(obj+'_help').innerHTML='<div>'+clientNewErrorCode[response.message.error_code]+'</div>';}
new ClientNewWholesale.error(obj,1);}},button:function(num){if(num==0&&document.getElementById('terms_agree').checked){if(document.getElementById('submit_register')){document.getElementById('submit_register').className='act';}
if(document.getElementById('submit_noregister')){document.getElementById('submit_noregister').className='act';}}else{if(document.getElementById('submit_register')){document.getElementById('submit_register').className='idle';}
if(document.getElementById('submit_noregister')){document.getElementById('submit_noregister').className='idle';}}},submitform:function(){ClientNew_status=true;if(!document.getElementById("client_firstname").value){ClientNew_status=false;}
if(!document.getElementById("client_lastname").value){ClientNew_status=false;}
if(!document.getElementById("client_email").value){ClientNew_status=false;}
if(!document.getElementById("client_city").value){ClientNew_status=false;}
if(!document.getElementById("client_zipcode").value){ClientNew_status=false;}
if(!document.getElementById("client_street").value){ClientNew_status=false;}
if(document.getElementById("firm_data2")){if(document.getElementById("firm_data2").checked&&!document.getElementById("client_firm").value&&!document.getElementById("client_nip").value){ClientNew_status=false;}}
if(document.getElementById("client_login")){if(!document.getElementById("client_login").value){ClientNew_status=false;}}
if(document.getElementById("client_password")){if(!document.getElementById("client_password").value||!document.getElementById("repeat_password").value){ClientNew_status=false;}}
if(document.getElementById("deliver_to_billingaddr")){if(!document.getElementById("deliver_to_billingaddr").checked){if((!document.getElementById("delivery_firstname").value||!document.getElementById("delivery_lastname").value)&&!document.getElementById("delivery_additional").value){ClientNew_status=false;}
if(!document.getElementById("delivery_zipcode").value){ClientNew_status=false;}
if(!document.getElementById("delivery_street").value){ClientNew_status=false;}
if(!document.getElementById("delivery_city").value){ClientNew_status=false;}}}
if(ClientNewMandatoryPhone){if(!document.getElementById('client_phone').value){ClientNew_status=false;}
if(document.getElementById('additional_phone')){if((!document.getElementById('additional_phone').value)&&!document.getElementById('additional_phone').disabled){ClientNew_status=false;}}else if(document.getElementById('delivery_phone')){if((!document.getElementById('delivery_phone').value)&&!document.getElementById('delivery_phone').disabled){ClientNew_status=false;}}}
if(ClientNewMandatoryMail){if(!document.getElementById('client_email').value){ClientNew_status=false;}}
if(document.getElementById('terms_agree')){if((!document.getElementById('terms_agree').checked)&&document.getElementById('terms_agree').type!='hidden'){ClientNew_status=false;}}
if(ClientNew_status==true){if(document.getElementById("button_alert")){document.getElementById("button_alert").style.display="none";}
return true;}else{if(document.getElementById("button_alert")){document.getElementById("button_alert").style.display="block";setTimeout('ClientNewWholesale.AlertOff()',5000);}
return false;}
if(document.getElementById('vat_ue').style.display!='none'&&!document.getElementById('vat_company').checked){document.getElementById("button_alert").style.display="block";setTimeout('ClientNew.AlertOff()',5000);return false;}},ramka:function(){if(!document.getElementById('terms_agree').checked){document.getElementById('terms_agree_box').className='ramka_ON';}else{document.getElementById('terms_agree_box').className='ramka_OFF';}},AlertOff:function(){document.getElementById("button_alert").style.display="none";},deliveryaddr:function(){if(document.getElementById('deliver_to_billingaddr').checked){document.getElementById('delivery_additional').value=document.getElementById('client_firm').value;document.getElementById('delivery_firstname').value=document.getElementById('client_firstname').value;document.getElementById('delivery_lastname').value=document.getElementById('client_lastname').value;document.getElementById('delivery_zipcode').value=document.getElementById('client_zipcode').value;document.getElementById('delivery_street').value=document.getElementById('client_street').value;document.getElementById('delivery_city').value=document.getElementById('client_city').value;if(document.getElementById('delivery_region')&&document.getElementById('client_region')){document.getElementById('delivery_region').value=document.getElementById('client_region').value;}
document.getElementById('delivery_phone').value=document.getElementById('client_phone').value;document.getElementById('box_4').className='n56315_box_idle';document.getElementById('delivery_additional').disabled='disabled';document.getElementById('delivery_firstname').disabled='disabled';document.getElementById('delivery_lastname').disabled='disabled';document.getElementById('delivery_zipcode').disabled='disabled';document.getElementById('delivery_street').disabled='disabled';document.getElementById('delivery_city').disabled='disabled';document.getElementById('delivery_region').disabled='disabled';document.getElementById('delivery_phone').disabled='disabled';}else{document.getElementById('box_4').className='n56315_box';document.getElementById('delivery_additional').disabled='';document.getElementById('delivery_firstname').disabled='';document.getElementById('delivery_lastname').disabled='';document.getElementById('delivery_zipcode').disabled='';document.getElementById('delivery_street').disabled='';document.getElementById('delivery_city').disabled='';document.getElementById('delivery_phone').disabled='';if(document.getElementById('delivery_region')){document.getElementById('delivery_region').disabled='';}}},error:function(idd,err){if(err==1){document.getElementById(idd+'_img_off').style.display="block";document.getElementById(idd+'_img_on').style.display="none";if(document.getElementById(idd+'_help')){document.getElementById(idd+'_help').style.display="block";ClientNewWholesale.hide_info_help(idd,10);}}else{document.getElementById(idd+'_img_off').style.display="none";document.getElementById(idd+'_img_on').style.display="block";if(document.getElementById(idd+'_help')){document.getElementById(idd+'_help').style.display="none";}}
return false;},hide_info_help:function(idd,i){if(i>1){setTimeout("ClientNewWholesale. hide_info_help('"+idd+"', '"+(i-1)+"');","1000");}else{document.getElementById(idd+'_help').style.display="none";}}}
var xr;function order1_shop_payformdiv(show)
{if(show){document.getElementById('payform_div').style.display='block';}else{document.getElementById('payform_div').style.display='none';document.getElementById('payform_id').selectedIndex=0;allDivs=document.getElementsByTagName("div");for(i=0;i<allDivs.length;i++){if((/^newpayment_form_/).test(allDivs[i].id)==true){allDivs[i].style.display='none';}}}}
function order1_changepayform()
{selVal=document.getElementById('payform_id').value;allDivs=document.getElementsByTagName("div");for(i=0;i<allDivs.length;i++){if((/^newpayment_form_/).test(allDivs[i].id)==true){allDivs[i].style.display='none';}}
if(document.getElementById('newpayment_form_'+selVal)){document.getElementById('newpayment_form_'+selVal).style.display='block';}}
var ClientSave={validateLogin:function(obj)
{obj.value=obj.value.toLowerCase();}}
var BasketchangeJS={add2basket:function(){var a2b=document.getElementById('adding_to_basket');a2b.innerHTML='';var eArray=new Array();var eQ,eS,eP;var flaga_submit=false;var elems=document.getElementsByTagName('input');for(i=0;i<elems.length;i++)
{if(elems[i].name.match('quantity')=='quantity')
{if(!isNaN(parseFloat(elems[i].value))){var elements=elems[i].parentNode.getElementsByTagName('input');for(n=0;n<elements.length;n++)
{if(elements[n].name.match('quantity')=='quantity')
{eQ=elements[n].value;}
if(elements[n].name.match('size')=='size')
{eS=elements[n].value;}
if(elements[n].name.match('product')=='product')
{eP=elements[n].value;}}
eArray[i]=new Array(eQ,eS,eP);flaga_submit=true;}}}
for(i=0;i<elems.length;i++)
{if(eArray[i]!=null)
{BasketchangeJS.addElement(eArray[i][0],eArray[i][1],eArray[i][2]);}}
if(flaga_submit==true)
{document.getElementById('adding_to_basket').submit();}
else
{return false;}},addElement:function(wartosc,size,product){var ni=document.getElementById('adding_to_basket');var newinput=document.createElement('input');var newinput2=document.createElement('input');var newinput3=document.createElement('input');newinput.setAttribute('type','product');newinput2.setAttribute('type','quantity');newinput3.setAttribute('type','size');newinput.setAttribute('name','product[]');newinput2.setAttribute('name','quantity[]');newinput3.setAttribute('name','size[]');newinput.setAttribute('type','hidden');newinput2.setAttribute('type','hidden');newinput3.setAttribute('type','hidden');newinput.value=product;newinput2.value=wartosc;newinput3.value=size;ni.appendChild(newinput);ni.appendChild(newinput2);ni.appendChild(newinput3);}}
function menu_categories_toggle(id){if(document.getElementById(id).style.display=='block'){document.getElementById(id).style.display='none'}else{document.getElementById(id).style.display='block'}}
function noError(){return true;}
window.onerror=noError;var newsletter_txt='podaj swój adres e-mail';function newsletter2_blur(x){if(x.value==''){x.value=newsletter_txt;}}
function newsletter2_focus(x){if(x.value!=''){x.value='';}}
function countAnnuityZagiel(account,amount)
{window.open('http://www.zagiel.com.pl/kalkulator/index_smart.php?action=getklientdet_si_rata&shopNo='+account+'&goodsValue='+amount,'count_zagiel','width=630,height=500,directories=no,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no');}
function validate_Zagiel()
{var zagielconfirm=document.getElementById('zagiel_confirm');if(zagielconfirm.checked){return true;}else{alert(zagielnotconfirmed);return false;}}
function countAnnuityEraty(account,version,amount)
{window.open('https://www.eraty.pl/symulator/oblicz.php?numerSklepu='+account+'&wariantSklepu='+version+'&typProduktu=0&wartoscTowarow='+amount,'count_zagiel','width=630,height=500,directories=no,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no');}
function validate_eraty()
{var zagielconfirm=document.getElementById('zagiel_confirm');if(!zagielconfirm){return false;}
if(zagielconfirm.checked){return true;}else{alert(zagielnotconfirmed)
return false;}}
var HOVER_classname_start='tab';var HOVER_classname_stat=0;var HOVER_opinions=false;var HOVER_choosenone='6';var Hover_Array_Disable=new Array();var Hover_Array=new Array();var Hover_Array2=new Array();Hover_Array2[8]=new Array('component_projector_sizes','0');Hover_Array2[5]=new Array('component_projector_opinions','0','2');Hover_Array2[4]=new Array('component_projector_associated_zones','0','1');Hover_Array2[1]=new Array('component_projector_longdescription','1');Hover_Array2[7]=new Array('component_projector_suggestproduct','0');Hover_Array2[6]=new Array('component_projector_askforproduct','0');Hover_Array2[3]=new Array('component_projector_warranty','0');Hover_Array2[2]=new Array('component_projector_dictionary','0');Hover_Array2[9]=new Array('component_projector_enclosures','0');var Hover_Array_ZONES=new Array();Hover_Array_ZONES[1]=new Array('component_projector_associated_zone1');Hover_Array_ZONES[2]=new Array('component_projector_associated_zone2');Hover_Array_ZONES[3]=new Array('component_projector_associated_zone3');Hover_Array_ZONES[4]=new Array('component_projector_associated_zone4');var Hover_Array_OPINIONS=new Array();Hover_Array_OPINIONS[1]=new Array('component_projector_opinions');Hover_Array_OPINIONS[2]=new Array('component_projector_addopinions');function HOVER_sort()
{for(i=1;i<Hover_Array2.length;i++){Hover_Array[i]=Hover_Array2[i];}}
function HOVER(start)
{HOVER_sort();var Hover_Elements=new Array();for(n in Hover_Array)
{if(start!=1)
{if(document.getElementById('btn_'+Hover_Array[n][0]))
{Hover_Elements[n]=document.getElementById('btn_'+Hover_Array[n][0]).innerHTML;document.getElementById('Hover_blanks').removeChild(document.getElementById('btn_'+Hover_Array[n][0]));var ni=document.getElementById('Hover_NewMENU');var newDiv=document.createElement('div');newDiv.id='btn_'+Hover_Array[n][0];if(HOVER_classname_stat==1)
{newDiv.className=Hover_Array[n][0];}
else
{newDiv.className=HOVER_classname_start;}
newDiv.style.display='none';newDiv.onclick=function(){HOVER_change(this.id)};newDiv.innerHTML=Hover_Elements[n];ni.appendChild(newDiv);}}}
HOVER_disable();if(start!=1)HOVER_addhover();if(start!=1)HOVER_opinions_show();HOVER_visible();}
function HOVER_addhover()
{for(n in Hover_Array)
{if(Hover_Array_Disable[n]=='true')
{document.getElementById('btn_'+Hover_Array[n][0]).onmouseover=HOVER_BUTTOn_onmouseover;document.getElementById('btn_'+Hover_Array[n][0]).onmouseout=HOVER_BUTTOn_onmouseout;}}}
function HOVER_BUTTOn_onmouseover()
{if(this.className.indexOf('_on')==-1)
{HOVER_className=this.className;this.className=HOVER_className+'_hover';}}
function HOVER_BUTTOn_onmouseout()
{if(this.className.indexOf('_on')==-1)
{this.className=HOVER_className;}}
function HOVER_visible()
{for(n in Hover_Array)
{if(Hover_Array_Disable[n]=='true')
{document.getElementById('btn_'+Hover_Array[n][0]).style.display="block";if(Hover_Array[n][1]=='1')
{if(HOVER_classname_stat==1)
{document.getElementById('btn_'+Hover_Array[n][0]).className=Hover_Array[n][0]+'_on';}
else
{document.getElementById('btn_'+Hover_Array[n][0]).className=HOVER_classname_start+'_on';}}}}}
function HOVER_opinions_show()
{for(n in Hover_Array)
{if(parseInt(HOVER_opinions_counter)>0&&HOVER_opinions==true)
{Hover_Array[n][1]='0';if(Hover_Array[n][0]=='component_projector_opinions')
{Hover_Array[n][1]='1';HOVER_disable();}}}}
function HOVER_disable()
{for(n in Hover_Array_ZONES)
{if(document.getElementById(Hover_Array_ZONES[n][0]))document.getElementById(Hover_Array_ZONES[n][0]).style.display="none";}
for(n in Hover_Array_OPINIONS)
{if(document.getElementById(Hover_Array_OPINIONS[n][0]))document.getElementById(Hover_Array_OPINIONS[n][0]).style.display="none";}
for(n=1;n<Hover_Array.length;n++)
{Hover_Array_Disable[n]='false';if(HOVER_classname_stat==1)
{if(document.getElementById('btn_'+Hover_Array[n][0]))document.getElementById('btn_'+Hover_Array[n][0]).className=Hover_Array[n][0];}
else
{if(document.getElementById('btn_'+Hover_Array[n][0]))document.getElementById('btn_'+Hover_Array[n][0]).className=HOVER_classname_start;}
if(document.getElementById(Hover_Array[n][0])&&Hover_Array[n][2]!='1'&&Hover_Array[n][2]!='2')
{Hover_Array_Disable[n]='true';if(Hover_Array[n][1]=='1')
{if(document.getElementById(Hover_Array[n][0]))document.getElementById(Hover_Array[n][0]).style.display="block";}
else
{if(document.getElementById(Hover_Array[n][0]))document.getElementById(Hover_Array[n][0]).style.display="none";}}
if(Hover_Array[n][2]=='1')
{for(k=1;k<Hover_Array_ZONES.length;k++)
{if(document.getElementById(Hover_Array_ZONES[k][0]))
{Hover_Array_Disable[n]='true';}}
if(Hover_Array[n][1]=='1')
{for(k=1;k<Hover_Array_ZONES.length;k++)
{if(document.getElementById(Hover_Array_ZONES[k][0]))document.getElementById(Hover_Array_ZONES[k][0]).style.display="block";}}}
if(Hover_Array[n][2]=='2')
{for(k=1;k<Hover_Array_OPINIONS.length;k++)
{if(document.getElementById(Hover_Array_OPINIONS[k][0]))Hover_Array_Disable[n]='true';}
if(Hover_Array[n][1]=='1')
{for(k=1;k<Hover_Array_OPINIONS.length;k++)
{if(document.getElementById(Hover_Array_OPINIONS[k][0]))document.getElementById(Hover_Array_OPINIONS[k][0]).style.display="block";}}}
if(Hover_Array_Disable[n]=='false'&&Hover_Array[n][1]=='1')
{Hover_Array[n][1]='0';Hover_Array[HOVER_choosenone][1]='1';HOVER_disable();}}}
function HOVER_clear_prior()
{for(n in Hover_Array)
{Hover_Array[n][1]='0';}}
function HOVER_change(idek)
{HOVER_clear_prior();for(n in Hover_Array)
{if('btn_'+Hover_Array[n][0]==idek)
{Hover_Array[n][1]='1';}}
HOVER(1);}
var main_buttons=new Array("n55945_promocje","n55945_nowosci","n55945_bestsellery","n55945_polecamy");function mainchange(id)
{for(i=0;i<main_buttons.length;i++){if(document.getElementById(main_buttons[i])){document.getElementById(main_buttons[i]).className=main_buttons[i];}}
document.getElementById('n55945_'+id).className='n55945_'+id+'_a';for(i=0;i<main_buttons.length;i++){if(document.getElementById(main_buttons[i]+'_c')){document.getElementById(main_buttons[i]+'_c').style.display='none';}}
document.getElementById('n55945_'+id+'_c').style.display='block';}
function checkOnSubmit()
{if((/^[0-9a-zA-Z._-]+@[0-9a-zA-Z._-]+.[0-9a-zA-Z]+$/).test(document.getElementById("from").value)==false||document.getElementById("from").value.length==0){alert('Nie podano żadnego adresu e-mail.');return false;}
return true;}
function drop_down(id)
{document.getElementById(id).style.height='200px';}
function roll_back(id)
{document.getElementById(id).style.height='';}
function drop_down(id)
{document.getElementById(id).style.height='150px';}
function roll_back(id)
{document.getElementById(id).style.height='';}
var newstxt='twój e-mail';function newsletter_blur(x){if(x.value==''){x.value=newstxt;}}
function newsletter_focus(x){if(x.value==newstxt){x.value='';}}
function drop_down(id)
{document.getElementById(id).style.height='150px';}
function roll_back(id)
{document.getElementById(id).style.height='';}
var x;function showOpinion(id)
{element=document.getElementById(id);element.style.display='block';}
function hideOpinion(id)
{element=document.getElementById(id);element.style.display='none';}
function drop_down(id)
{document.getElementById(id).style.height='150px';}
function roll_back(id)
{document.getElementById(id).style.height='';}
function switcher2(ide,ide2){if(document.getElementById(ide).style.display=='block'){document.getElementById(ide).style.display='none';}else{document.getElementById(ide).style.display='block';}
if(document.getElementById(ide2).style.display=='block'){document.getElementById(ide2).style.display='none';}else{document.getElementById(ide2).style.display='block';}}
function opinions_replace(id)
{var inpt_opinions=document.getElementById('opinions_notes');var divs_opinions=document.getElementsByTagName('DIV');for(i=0;i<divs_opinions.length;i++){if(divs_opinions[i].id=='opinions_notes_rank')
{divs_opinions[i].className="projector_opinions_note";}}
id.className="projector_opinions_note_on";inpt_opinions.value=parseInt(id.innerHTML);}