
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 newsletter_blur(x){if(x.value==''){x.value=newstxt;}}
function newsletter_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;}}
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;}}
if(typeof(newstxt)=="undefined"){var alert_txt='Nie podano żadnego adresu e-mail.';}
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(alert_txt);return false;}
return true;}
if(typeof(newstxt)=="undefined"){}
function newsletter_blur(x){if(x.value==''){x.value=contact_newstxt;}}
function newsletter_focus(x){if(x.value==contact_newstxt){x.value='';}}
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';}}
txt_dostepny="Produkt dostępny.";txt_niedostepny="Produkt niedostępny.";txt_zamowienie="Produkt na zamówienie.";txt_czas_wysylki="Wysyłamy w ciągu  ";txt_czas_dostawy="Dostawa za  ";txt_points="Możesz kupić za punkty.<br />Ilość punktów potrzebnych: ";txt_points_only="Produkt promocyjny, wyłącznie za punkty.";var txt_warning_choosen="Wybrałeś właściwy produkt?";txt_actual_version="Zobacz szczegółowy opis ";txt_telprice="Zapytaj o cenę";txt_czas_wysylki_zero="Wysyłamy w ciągu 24h.";txt_days="dni roboczych."
txt_day="dzień roboczy."
function xdisplay(idVersion,idSize)
{var id=idVersion+'_'+idSize;var toBasket;var forPointsOnly;var price;var points;var availabilityStatus;var telPrice;var days;var priceFloat;var promo_price='';if(msg=document.getElementById('id_display_msg')){msg.style.display="none";}
if(version_link=document.getElementById('id_version_link')){version_link.style.display="none";}
if((idVersion>0)&&(idSize!='')){telPrice=arVersionSizes[id][2];forPointsOnly=0;price=arVersionSizes[id][0];priceFloat=parseFloat(price);points=arVersionSizes[id][1];days=arVersionSizes[id][6];forpoints=0;if(arVersionSizes[id][3]=='true'){forpoints=1;}
availabilityStatus=arVersionSizes[id][5];if(forpoints&&telPrice){if(priceFloat=='0'){forPointsOnly=1;}else{forPointsOnly=0;}}
if(forpoints&&(priceFloat=='0')){forPointsOnly=1;}
if(MaxPrice){promo_price="<span class\=\"results_maxprice\">"+MaxPrice+currency+"</span>";}
document.getElementById('id_display_delivery').innerHTML='';document.getElementById('id_display_availability').innerHTML='';el2=document.getElementById('id_display_delivery')
if((el=document.getElementById('id_display_availability'))&&((availabilityStatus=='enable')||(availabilityStatus=='order'))){if(availabilityStatus=='enable'&&days){el.innerHTML=txt_dostepny;if(days>1){el2.innerHTML=txt_czas_wysylki+days+txt_days;}else{if(days==0){el2.innerHTML=txt_czas_wysylki_zero;}else{el2.innerHTML=txt_czas_wysylki+days+txt_day;}}}
if(availabilityStatus=='order'&&days){el.innerHTML=txt_zamowienie;if(days>1){el2.innerHTML=txt_czas_wysylki+days+txt_days;}else{el2.innerHTML=txt_czas_wysylki+days+txt_day;}}
toBasket=1;}
else
{toBasket=0;if(el=document.getElementById('id_display_availability')){el.innerHTML=txt_niedostepny;if(availabilityStatus=='disable'&&days){el.innerHTML=txt_dostepny;if(days>1){el2.innerHTML=txt_czas_dostawy+days+txt_days;}else{el2.innerHTML=txt_czas_dostawy+days+txt_day;}}}}}
else{toBasket=0;}
if(el=document.getElementById('product_input')){el.value=idVersion;}
if(el=document.getElementById('size_input')){el.value=idSize;}
var el;var tmp;if((idSize=='')||(idVersion==0)){if(el=document.getElementById('id_display_watch')){el.style.opacity='.4';el.style.filter="alpha(opacity=40)";el.style.cursor="not-allowed";}}else{if(el=document.getElementById('id_display_watch')){el.style.opacity='1';el.style.filter="alpha(opacity=100)";el.style.cursor="pointer";}}
if(el=document.getElementById('id_display_delivery')){if((idSize=='')||(idVersion==0)){el1=document.getElementById('id_display_availability')
el.innerHTML=txt_warning_delivery;el1.innerHTML=txt_warning_availability;msg.style.display="block";msg.innerHTML=txt_msg_avail_deliv;forpoints=0;}else
{msg.style.display="block";msg.innerHTML=txt_warning_choosen;}}
e11=document.getElementById('id_display_size_container');if(el=document.getElementById('id_display_size')){if(idSize!=''&&SizesCount>1){e11.style.display="block";tmp=arNameS[idSize];}else{e11.style.display="none";}
el.innerHTML=tmp;}
e11=document.getElementById('id_display_price_container');e11.style.display="none";if(el=document.getElementById('id_display_price')){if((idSize!='')&&(idVersion>0)){e11.style.display="block";if(telPrice&&parseFloat(price)==0){el.innerHTML=txt_telprice;}else{el.innerHTML=promo_price+price+currency;}}else{e11.style.display="none";toBasket=0;}}
e11=document.getElementById('id_display_version_container');if(el=document.getElementById('id_display_version')){if(idVersion>1&&VersionsCount>0){tmp=arNameV[idVersion];e11.style.display="block";}else{e11.style.display="none";}
el.innerHTML=tmp;}
if(el=document.getElementById('id_display_points_container')){if(forpoints&&(availabilityStatus!='disable')){el.style.display="block";el1=document.getElementById('id_display_pointscheck');el2=document.getElementById('id_display_pointstxt');el3=document.getElementById('id_display_pointsvalue');if(forPointsOnly==1){el1.style.display="none";el3.style.display="none";el2.innerHTML=txt_points_only;}else{el1.style.display="block";el3.style.display="block";el2.innerHTML=txt_points;el3.innerHTML=points;el1.innerHTML='<input type="checkbox" name="forpoints" value="1"/>';}}else{el.style.display="none";}}
if(el=document.getElementById('id_display_basket')){if(telPrice&&(forPointsOnly==0)){toBasket=0;}
if(toBasket=='1'){el.style.display='block';el.style.opacity='1';el.style.filter="alpha(opacity=100)";el.style.cursor="pointer";submit_flag=true;}else{el.style.display='block';el.style.opacity='.4';el.style.filter="alpha(opacity=40)";el.style.cursor="not-allowed";submit_flag=false;}}}
function xselectSize(id)
{for(n in allsizes){checkElement('s',allsizes[n],'enable');}
checkElement('s',id,'checked');found=0;selectedS=id;for(n in allversions){checkElement('v',allversions[n],'disable');for(k in sizes[id]){if(sizes[id][k]==allversions[n]){if(selectedV==allversions[n]){checkElement('v',allversions[n],'checked');found=1;}else{checkElement('v',allversions[n],'enable');}}}}
if(!found){selectedV='';}else{var arEnable=new Object();i=0;for(n in versions[selectedV]){arEnable[versions[selectedV][n]]=1;}
for(n in allsizes){if(arEnable[allsizes[n]]!=1){checkElement('s',allsizes[n],'disable');}}}
xdisplay(selectedV,selectedS);}
function xselectVersion(id)
{for(n in allversions){checkElement('v',allversions[n],'enable');}
checkElement('v',id,'checked');found=0;selectedV=id;for(n in allsizes){checkElement('s',allsizes[n],'disable');for(k in versions[id]){if(versions[id][k]==allsizes[n]){if(selectedS==allsizes[n]){checkElement('s',allsizes[n],'checked');found=1;}else{checkElement('s',allsizes[n],'enable');}}}}
if(!found){selectedS='';}else{var arEnable=new Object();i=0;for(n in sizes[selectedS]){arEnable[sizes[selectedS][n]]=1;}
for(n in allversions){if(arEnable[allversions[n]]!=1){checkElement('v',allversions[n],'disable');}}}
xdisplay(selectedV,selectedS);}
function checkElement(type,id,mode)
{if(type=='s'){elementId='xsize_';}else{elementId='xversion_';}
elementId+=id;element=document.getElementById(elementId);if(element){if(mode=='enable'){element.className="block_enable";}else if(mode=='checked'){element.className="block_checked";}else{element.className="block_disable";}}}
var submit_flag;function dosubmit(){if(submit_flag)document.getElementById('form').submit();}
var ns6=document.getElementById&&!document.all;var ie=document.all;var html=document.getElementsByTagName("html");var Popup={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(!ns6){Popup.hideSelects(1);}
Popup.creatLayers();},reload:function(){if(Popup.loaded){Popup.show(Popup.link,Popup.width,Popup.height);}},hide:function(){var edit=document.getElementById('show_popup_photo');var cover=document.getElementById('cover');edit.style.display="none";cover.style.display="none";Popup.loaded=0;if(!ns6){Popup.hideSelects(0);}},creatLayers:function(){var edit=document.getElementById('show_popup_photo');edit.style.position='absolute';edit.style.display="block";edit.style.width=(Popup.width+10)+"px";edit.style.height=(Popup.height+40)+"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)?"100px":(((Popup.pageSizes()[3]-(Popup.height+10))/2)-100+document.body.scrollTop+100)+"px";}
else
{edit.style.top=((((Popup.pageSizes()[3]-(Popup.height+10))/2)-100+html[0].scrollTop)<0)?"100px":(((Popup.pageSizes()[3]-(Popup.height+10))/2)-100+html[0].scrollTop+100)+"px";}}
else
{edit.style.top=((((Popup.pageSizes()[3]-(Popup.height+10))/2)-100+html[0].scrollTop)<0)?"100px":(((Popup.pageSizes()[3]-(Popup.height+10))/2)-100+html[0].scrollTop+100)+"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 components=new Array("component_projector_opinions","component_projector_addopinions","component_projector_photos","component_projector_ordered","component_projector_associated","component_projector_incategory","component_projector_suggestproduct","component_projector_askforproduct","component_projector_warranty");function showButtons()
{var i=0;var activeButtons=components.length;for(i=0;i<components.length;i++){if(document.getElementById(components[i])){document.getElementById('projector_components_hidding').style.display='block';if(document.getElementById('hide_'+components[i])){document.getElementById('hide_'+components[i]).style.display='block';}}}
setTimeout("showButtons()",2000);}
function components_hidding(component)
{if(document.getElementById(component)){for(i=0;i<components.length;i++){if(document.getElementById(components[i])){document.getElementById(components[i]).style.display='none';}}
document.getElementById(component).style.display='block';}}
showButtons();function components_hidding_2(component)
{document.getElementById(component).style.display='block';}
function activate(id){document.getElementById('hide_component_projector_askforproduct').className='hide_component';document.getElementById('hide_component_projector_suggestproduct').className='hide_component';document.getElementById('hide_component_projector_incategory').className='hide_component';document.getElementById('hide_component_projector_associated').className='hide_component';document.getElementById('hide_component_projector_ordered').className='hide_component';document.getElementById('hide_component_projector_opinions').className='hide_component';document.getElementById('hide_component_projector_warranty').className='hide_component';document.getElementById('hide_td_askforproduct').className='hide_td';document.getElementById('hide_td_suggestproduct').className='hide_td';document.getElementById('hide_td_incategory').className='hide_td';document.getElementById('hide_td_associated').className='hide_td';document.getElementById('hide_td_ordered').className='hide_td';document.getElementById('hide_td_opinions').className='hide_td';document.getElementById('hide_td_warranty').className='hide_td';document.getElementById('hide_td_'+id).className='hide_td_active';document.getElementById('hide_component_projector_'+id).className='hide_component_active';}
function askforproduct()
{if(document.getElementById("askforproduct_email")){if((/^[0-9a-zA-Z.\-_]+\@[0-9a-zA-Z.\-_]+\.[0-9a-zA-Z]+$/).test(document.getElementById("askforproduct_email").value)==false||document.getElementById("email").value.length==0){alert('Nie wpisałeś poprawnie adresu e-mail na który mielibyśmy wysłać Ci odpowiedź.');return false;}else{return true;}}}
function hideaskforproduct()
{if(document.getElementById('projector_askforproduct_table').style.display=='none'){document.getElementById('projector_askforproduct_table').style.display='block';}else{document.getElementById('projector_askforproduct_table').style.display='none';}}
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 table_height(){var x=document.getElementsByTagName('table');var heightt=document.getElementById('tede').clientHeight;for(var i=0;i<x.length;i++)
{if(x[i].className=='n53693_mainb'||x[i].className=='n53693_main')
x[i].style.height=heightt+'px';}}
function clientnew_delivery_addr(){if(document.getElementById('deliver_to_billingaddr').checked){document.getElementById('delivery_address_form').style.display='none';}else{document.getElementById('delivery_address_form').style.display='block';}}
function clientnew_firm(){if(document.getElementById('firm_data').checked){document.getElementById('firm_data_inputs').style.display='block';}else{document.getElementById('firm_data_inputs').style.display='none';}}
function client_addresses_list_confirmdelete(){return confirm('Czy na pewno usunąć wybrany adres dostawy?');}
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';}}
