
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';}}
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.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="24h";txt_days=" dni roboczych"
txt_day=" dzień roboczy"
function optionRemove(id)
{id.name='wybrany';if(id.firstChild.id=='option_disabled')
{id.remove(0);}}
function show_chosen_size(txt){document.getElementById('size_display_span').innerHTML=txt;document.getElementById('show_size_cms').style.display='none';}
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_proj'>"+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{if(days==0){el2.innerHTML=txt_czas_wysylki_zero;}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){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();else if(document.getElementById('sizes_selector').name=='wybierz')Alertek.show_alert('Najpierw wybierz rozmiar');}
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 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 displayed='';function ImageRotate(id)
{if(displayed==''){document.getElementById('img_1').style.display='none';}else{document.getElementById(displayed).style.display='none';}
document.getElementById(id).style.display='';displayed=id;}
function pokarz(id){document.getElementById(id).style.display='block';}
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 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 searchtxt='wpisz szukaną frazę';function searching_blur(x){if(x.value==''){x.value=searchtxt;}}
function searching_focus(x){if(x.value!=''){x.value='';}}
var ClientSave={validateLogin:function(obj)
{obj.value=obj.value.toLowerCase();}}
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 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 order1_shop_payformdiv(show)
{if(show){if(document.getElementById('payform_div')){document.getElementById('payform_div').style.display='block';}}else{if(document.getElementById('payform_div')){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_shop_payformdiv_advance(time,calendar,prepaid,advance)
{if(advance==1){if(document.getElementById('payform_div_label_advance')){document.getElementById('payform_div_label_advance').style.display='block';}
if(document.getElementById('payform_div_label_order')){document.getElementById('payform_div_label_order').style.display='none';}}else{if(document.getElementById('payform_div_label_advance')){document.getElementById('payform_div_label_advance').style.display='none';}
if(document.getElementById('payform_div_label_order')){document.getElementById('payform_div_label_order').style.display='block';}}
if((prepaid||advance==1)&&(document.getElementsByName('payform_id').length>1)){document.getElementById('payform_div').style.display='block';}else{if(document.getElementById('payform_div')){document.getElementById('payform_div').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';}}}
OrderCalendar.changeDeliveryTime(time,calendar);}
function order1_show_comment(coment)
{if(coment){document.getElementById('order1_coment_background').style.display='block';document.getElementById('order1_coment_text').innerHTML=coment;}else{document.getElementById('order1_coment_background').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';}}
function cEl(t,p,h){p.appendChild(t=document.createElement(t));if(h){t.innerHTML=h;}
return t;}
var startDay;var tmpStartDay;var selectMonth2=1;var selectYear2=1;function write_words()
{}
var OrderCalendar={start:{},changeDeliveryTime:function(time,type){startD1=OrderCalendar.start.D1+time;startM1=OrderCalendar.start.M1;startY1=OrderCalendar.start.Y1;OrderCalendar.type=type;do{var days=getCountDayOfMonth(startY1,startM1);if(startD1>days){startD1-=days;startM1+=1;if(startM1>12){startM1=1;startY1+=1;}}}while(startD1>days);var date=new Date();date.setDate(startD1);date.setMonth(startM1-1);var tmp1=date.setYear(startY1);var tmpWeek=date.getDay();date.setDate(selectDay);date.setMonth(selectMonth-1);var tmp2=date.setYear(selectYear);if(tmp2<tmp1){selectMonth=startM1;selectDay=startD1;selectYear=startY1;selectWeek=tmpWeek;}
if(type=='n'||type==''){document.getElementById("order1_calendar").style.display='none';document.getElementById("calendar_select_date").value='';}else{distroyCalendar();setTimeout("printCalendar();",0);document.getElementById("order1_calendar").style.display='block';if(type=='t'){document.getElementById('hours_range_div').style.display='block';}else{document.getElementById('hours_range_div').style.display='none';}}},selectRange:function(obj){document.getElementById("calendar_select_hour").value=obj.value;}}
function distroyCalendar()
{while(document.getElementById('calendar_m2').firstChild.childNodes.length>1){document.getElementById('calendar_m2').firstChild.removeChild(document.getElementById('calendar_m2').firstChild.lastChild);}
while(document.getElementById('calendar_m1').firstChild.childNodes.length>1){document.getElementById('calendar_m1').firstChild.removeChild(document.getElementById('calendar_m1').firstChild.lastChild);}}
function printMonth(year,month,firstDay,m)
{var licznik=1;var dzient=1;var wiersz=0;var i=1;var date=new Date();date.setDate(1);date.setMonth(month-1);date.setYear(year);firstDay=date.getDay();if(firstDay==0){firstDay=7;}
var liczbaDni=getCountDayOfMonth(year,month);while(licznik){dzient=dzient+1
if(dzient>7){dzient=1;}
if(licznik%7==1){w=cEl('tr',document.getElementById('calendar_'+m).firstChild);wiersz=wiersz+1;}
td=cEl('td',w);if(licznik<firstDay&&wiersz==1){td.className='null';}else{td.id="calendar_"+year+"_"+month+"_"+i;td.innerHTML='<span>'+i+'</span>';if((month==startM1&&startY1==year&&i<startD1)||Holidays[i+"_"+month+"_"+year]==1){document.getElementById("calendar_"+year+"_"+month+"_"+i).className="n55494_deactive";}else{document.getElementById("calendar_"+year+"_"+month+"_"+i).onclick=function(x){var id=this.id.split('_');selectDate('cos',id[3],id[2],id[1],licznik%7);};}
i=i+1;}
if(i>liczbaDni){break;}
licznik=licznik+1;}}
function printCalendar()
{var wiersz=0;var i=1;var dzient=1;document.getElementById('name_month_1').innerHTML=monthArr[parseInt(selectMonth)];document.getElementById('name_month_2').innerHTML=monthArr[(parseInt(selectMonth)+1)%12];printMonth(parseInt(selectYear),parseInt(selectMonth),'',"m1");var m_tmp=parseInt(selectMonth)+1;var y_tmp=parseInt(selectYear);if(m_tmp==13){m_tmp=1;y_tmp=y_tmp+1;}
printMonth(y_tmp,m_tmp,'',"m2");activeCalendar();}
function changeMonth(action)
{document.getElementById("loader").style.display="block";if(action=="minus"){if(selectYear2==startY1&&startM1==selectMonth2){activeCalendar();return;}else{distroyCalendar();printMonth(selectYear2,selectMonth2,startDay,"m2");selectMonth2=selectMonth2-1;if(selectMonth2==0){selectMonth2=12;selectYear2=selectYear2-1;}
startDay=startDay-(getCountDayOfMonth(selectYear2,selectMonth2)%7);if(startDay<=0){startDay=startDay+7;}
printMonth(selectYear2,selectMonth2,startDay,"m1");}}else{if((selectYear2>startY1&&(startM1-6)<(selectMonth2))||(selectYear2==startY1&&(startM1+6)<selectMonth2)){activeCalendar();return;}
distroyCalendar();startDay=startDay+(getCountDayOfMonth(selectYear2,selectMonth2)%7);if(startDay>7){startDay=startDay-7;}
selectMonth2=selectMonth2+1;if(selectMonth2==13){selectMonth2=1;selectYear2=selectYear2+1;}
printMonth(selectYear2,selectMonth2,startDay,"m1");var m_tmp=selectMonth2+1;var y_tmp=selectYear2;if(m_tmp==13){m_tmp=1;y_tmp=y_tmp+1;}
var startDay2=startDay+(getCountDayOfMonth(selectYear2,selectMonth2)%7);if(startDay2>7){startDay2=startDay2-7;}
printMonth(y_tmp,m_tmp,startDay2,"m2");}
document.getElementById('name_month_1').innerHTML=monthArr[selectMonth2];var tmpM=selectMonth2+1;if(tmpM==13){tmpM=1;}
document.getElementById('name_month_2').innerHTML=monthArr[tmpM];activeCalendar();}
function activeCalendar()
{if(document.getElementById("calendar_"+selectYear+"_"+selectMonth+"_"+selectDay)){document.getElementById("calendar_"+selectYear+"_"+selectMonth+"_"+selectDay).className="n55494_active";}
document.getElementById("name_day").innerHTML=daysArr[selectWeek]+", "+selectDay+" "+monthArr2[selectMonth]+" "+selectYear;document.getElementById("loader").style.display="none";if(document.getElementById("calendar_select_date")){document.getElementById("calendar_select_date").value=selectYear+"-"+selectMonth+"-"+selectDay;}
if(OrderCalendar.type=='t'){if(OrderCalendar.start.D1==selectDay&&OrderCalendar.start.M1==selectMonth){document.getElementById("hours_range1").disabled=SelectTime>=11?true:false;document.getElementById("hours_range2").disabled=SelectTime>=13?true:false;document.getElementById("hours_range3").disabled=SelectTime>=15?true:false;document.getElementById("hours_range4").disabled=SelectTime>=17?true:false;document.getElementById("hours_range5").disabled=SelectTime>=19?true:false;}else{document.getElementById("hours_range1").disabled=false;document.getElementById("hours_range2").disabled=false;document.getElementById("hours_range3").disabled=false;document.getElementById("hours_range4").disabled=false;document.getElementById("hours_range5").disabled=false;}}}
function selectDate(cos,day,month,year,week){document.getElementById("loader").style.display="block";if(document.getElementById("calendar_"+selectYear+"_"+selectMonth+"_"+selectDay)){document.getElementById("calendar_"+selectYear+"_"+selectMonth+"_"+selectDay).className='';}
selectDay=day;selectMonth=month;selectWeek=week;selectYear=year;activeCalendar();}
function getCountDayOfMonth(year,month)
{switch(month){case 1:return 31;break;case 2:if(year%4==0){return 29;}else{return 28;}break;case 3:return 31;break;case 4:return 30;break;case 5:return 31;break;case 6:return 30;break;case 7:return 31;break;case 8:return 31;break;case 9:return 30;break;case 10:return 31;break;case 11:return 30;break;case 12:return 31;break;}}
var components=new Array("component_projector_associated","component_projector_incategory","component_projector_ordered","component_projector_askforproduct","component_projector_opinions","component_projector_addopinions","component_projector_suggestproduct","component_projector_longdescription","component_projector_dictionary","component_projector_sizes","component_projector_associated_series","component_projector_warranty");function hider(button,id_comp)
{for(i=0;i<components.length;i++){if(document.getElementById('btn_'+components[i])){document.getElementById('btn_'+components[i]).className='off_btn';}}
button.className='on_btn';for(i=0;i<components.length;i++){if(document.getElementById(components[i])){document.getElementById(components[i]).style.display='none';}}
document.getElementById(id_comp).style.display='block';}
function show_hover(id){if(document.getElementById(id))document.getElementById(id).style.display='block';}
function showButtons()
{var i=0;for(i=0;i<components.length;i++){if(document.getElementById(components[i])){if(document.getElementById('btn_'+components[i])){document.getElementById('btn_'+components[i]).style.display='block';}
if(document.getElementById(components[i]).offsetWidth!='0'&&components[i]!='component_projector_addopinions'){document.getElementById('btn_'+components[i]).className='on_btn';}}}
setTimeout("showButtons()",1000);}
showButtons();function hideprev(id){id.style.display='none';}
function showprev(id,pos){img_id=document.getElementById('preview');img_id.innerHTML=document.getElementById(id).innerHTML;coors=findPos(pos);img_id.style.top=coors[1]+'px';img_id.style.left=coors[0]+'px';document.getElementById('preview').style.display="block";}
function findPos(obj){var curleft=curtop=0;if(obj.offsetParent){curleft=obj.offsetLeft
curtop=obj.offsetTop
while(obj=obj.offsetParent){curleft+=obj.offsetLeft
curtop+=obj.offsetTop}}
return[curleft,curtop];}
var offsetfrommouse=[10,15];var timer;var idek;function truebody(){return(!window.opera&&document.compatMode&&document.compatMode!="BackCompat")?document.documentElement:document.body}
function hidetrail(){document.getElementById(idek).style.display="none";document.onmousemove="";document.getElementById(idek).style.left="-2000px";clearTimeout(timer);}
function showtrail(id){idek=id;th=document.getElementById(idek+'_img').src;th=th.replace(/small/,"small")
document.getElementById(idek+'_img').src=th;show();}
function show(){var docwidth=document.all?truebody().scrollLeft+truebody().clientWidth:pageXOffset+window.innerWidth-offsetfrommouse[0]
var docheight=document.all?Math.min(truebody().scrollHeight,truebody().clientHeight):Math.min(window.innerHeight)
document.onmousemove=followmouse;document.getElementById(idek).style.display="block";}
function followmouse(e){var xcoord=offsetfrommouse[0]
var ycoord=offsetfrommouse[1]
var docwidth=document.all?truebody().scrollLeft+truebody().clientWidth:pageXOffset+window.innerWidth-15
var docheight=document.all?Math.min(truebody().scrollHeight,truebody().clientHeight):Math.min(window.innerHeight)
if(typeof e!="undefined"){if(docwidth-e.pageX<2*offsetfrommouse[0]){xcoord=e.pageX-xcoord;}else{xcoord+=e.pageX;}
if(docheight-e.pageY<2*offsetfrommouse[1]){ycoord+=e.pageY-Math.max(0,(2*offsetfrommouse[1]+e.pageY-docheight-truebody().scrollTop));}else{ycoord+=e.pageY;}}else if(typeof window.event!="undefined"){if(docwidth-event.clientX<2*offsetfrommouse[0]){xcoord=event.clientX+truebody().scrollLeft-xcoord;}else{xcoord+=truebody().scrollLeft+event.clientX}
if(docheight-event.clientY<(2*offsetfrommouse[1])){ycoord+=event.clientY+truebody().scrollTop-Math.max(0,(2*offsetfrommouse[1]+event.clientY-docheight));}else{ycoord+=truebody().scrollTop+event.clientY;}}
document.getElementById(idek).style.left=xcoord+"px"
document.getElementById(idek).style.top=ycoord+"px"}
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 x;function showOpinion(id)
{element=document.getElementById(id);element.style.display='block';}
function hideOpinion(id)
{element=document.getElementById(id);element.style.display='none';}
var newstxt='twój adres email';function mainnews_blur(x){if(x.value==''){x.value=newstxt;}}
function mainnews_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='';}
function checkOnSubmit(text1,text2,text3)
{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(text1);return false;}
if(document.getElementById("subject").value.length==0){alert(text2);return false;}
if(document.getElementById("body").value.length==0){alert(text3);return false;}
return true;}
function newsletter_blur(x){if(x.value==''){x.value=newstxt;}}
function newsletter_focus(x){if(x.value==newstxt){x.value='';}}
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';}}