
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;}}
var product_id=0;var size_id=0;var price=0;var viewSubmits=false;var active='';var message=true;function chSizeQuantity(element)
{if(element=='none'){if(document.getElementById('select_products'))sel_pr=document.getElementById('select_products').value;}else{sel_pr=element;}
div_sz_n=document.getElementById('div_sizes_'+product_id);div_sz_b=document.getElementById('div_sizes_'+sel_pr);sel_sz_n=document.getElementById('select_sizes_'+product_id);sel_sz_b=document.getElementById('select_sizes_'+sel_pr);div_sz_n.style.display='none';div_sz_b.style.display='block';sel_sz_n.disabled=true;sel_sz_b.disabled=false;sel_sz=document.getElementById('select_sizes_'+sel_pr);div_nr_n=document.getElementById('div_num_'+product_id+'_'+size_id);div_nr_b=document.getElementById('div_num_'+sel_pr+'_'+sel_sz.value);sel_nr_n=document.getElementById('select_num_'+product_id+'_'+size_id);sel_nr_b=document.getElementById('select_num_'+sel_pr+'_'+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;div_pr=document.getElementById('div_price');inp_pr=document.getElementById('price_'+sel_pr+'_'+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;}
size_id=sel_sz.value;product_id=sel_pr;}
function chQuantity()
{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 viewProductEdit()
{element=document.getElementById('div_product_edit');element.style.display='block';}
function hideProductEdit()
{element=document.getElementById('div_product_edit');element.style.display='none';}
var szerokosc_compare=980;function pageHeight(){return window.innerHeight!=null?window.innerHeight:document.documentElement&&document.documentElement.clientHeight?document.documentElement.clientHeight:document.body!=null?document.body.clientHeight:null;}
function compare_cover(num)
{if(num=='0')
{cover_log=document.getElementById('compare_pointer');div_log=document.getElementById('compare_table_block_ALL');cover_log.style.display='block';cover_log.style.width='100%';cover_log.style.position='absolute';cover_log.style.zIndex='9998';cover_log.style.top='0';cover_log.style.left='0';html=document.getElementsByTagName('html')[0];if(navigator.appVersion.indexOf("MSIE")!=-1){temp=navigator.appVersion.split("MSIE");ver_brow=parseFloat(temp[1]);if(ver_brow<7.0){cover_log.style.width=document.body.clientWidth+'px';div_log.style.width=document.body.clientWidth-60+'px';}}
cover_log.style.height=Math.max(html.scrollHeight,html.offsetHeight,(self.innerHeight||document.documentElement.clientHeight||document.body.clientHeight))+'px';}
if(num=='1')
{cover_log=document.getElementById('compare_pointer');cover_log.style.display='none';div_log=document.getElementById('compare_table_block_ALL');}}
function compare_hide_boxes()
{var pointer,div_block;div_block=document.getElementById("compare_table_block");pointer=document.getElementById("compare_pointer");if(pointer.parentNode.nextSibling&&pointer.parentNode.previousSibling&&(document.body.firstChild.clientWidth!=0))
{pointer.parentNode.nextSibling.style.display="none";pointer.parentNode.previousSibling.style.display="none";div_block.style.width=szerokosc_compare+'px';div_width=szerokosc_compare+'px';var images=document.images;for(var ii=0;ii<images.length;ii++)
{if(images[ii].complete==false){setTimeout("compare_hide_boxes()",100);return false;}}
if(navigator.appVersion.indexOf("MSIE")!=-1){temp=navigator.appVersion.split("MSIE");ver_brow=parseFloat(temp[1]);if(ver_brow<=7.0){if(div_block.scrollWidth>div_block.clientWidth)
{div_block.style.height=div_block.clientHeight+35+"px";}}}}
else
{setTimeout("compare_hide_boxes()",100);}}
function compare_change(id)
{if(document.getElementById(id).style.display=='none')
{document.getElementById(id).style.display='';document.getElementById('off_'+id).style.display="none";}
else
{document.getElementById(id).style.display="none";document.getElementById('off_'+id).style.display='';}}
function compare_fullscreen(num)
{if(num==0)
{compare_cover(0);document.getElementById('compare_table_block_ALL').style.position="absolute";document.getElementById('compare_table_block_ALL').style.zIndex="9999";document.getElementById('compare_table_block_ALL').style.top="0";document.getElementById('compare_table_block_ALL').style.left="0";document.getElementById('compare_table_block_ALL').style.width="96%";document.getElementById('compare_table_block').style.width="100%";document.getElementById('compare_table_block_ALL').style.margin="35px";document.getElementById('compare_full_off').style.display="none";document.getElementById('compare_full_on').style.display="block";}
if(num==1)
{compare_cover(1);document.getElementById('compare_table_block_ALL').style.position="";document.getElementById('compare_table_block_ALL').style.top="";document.getElementById('compare_table_block_ALL').style.left="";document.getElementById('compare_table_block').style.width=szerokosc_compare+'px';document.getElementById('compare_table_block_ALL').style.margin="";document.getElementById('compare_table_block_ALL').style.width="100%";document.getElementById('compare_full_off').style.display="block";document.getElementById('compare_full_on').style.display="none";}}
var compare_vis_tablica=new Array();function compare_visibility(poz,num)
{var elems=document.getElementsByTagName('td');for(i=0;i<elems.length;i++)
{if(elems[i].id==poz)
{if(num=='0')
{document.getElementById('compare_vis_off_'+poz).style.display="none";document.getElementById('compare_vis_on_'+poz).style.display="block";compare_vis_tablica[i]=elems[i].innerHTML;elems[i].innerHTML='';elems[i].className="podswietlenie";}
if(num=='1')
{document.getElementById('compare_vis_off_'+poz).style.display="block";document.getElementById('compare_vis_on_'+poz).style.display="none";elems[i].innerHTML=compare_vis_tablica[i];elems[i].className="";}}}}
var marquee_licznik3=0;var marquee_margin3=0;var marquee_width_sub_inner3;var marquee_speed3=50;var move3;var zm3=0;function moveMarque(){move3=setTimeout(function(){marquee_slider3('banner_marque_cont3','banner_marque_sub3')},marquee_speed3);}
function stopMarque(){move3=clearInterval(move3)}
function marquee_slider3(contener,subcontener){if(!document.getElementById(contener)||!document.getElementById(subcontener)){move3=setTimeout(function(){marquee_slider3(contener,subcontener)},marquee_speed3);return false;}
var temp=document.getElementById("temp");var cont=document.getElementById(contener);var sub=document.getElementById(subcontener);var width_sub_inner=0;width_sub_inner=marquee_counter3(sub,width_sub_inner);if(marquee_licznik3==0){marquee_width_sub_inner3=width_sub_inner;}
if(width_sub_inner<=cont.clientWidth&&cont.clientWidth!=0){sub.innerHTML+=sub.innerHTML;move3=setTimeout(function(){marquee_slider3(contener,subcontener)},marquee_speed3);return false;}
else{if(cont.clientWidth==0){move3=setTimeout(function(){marquee_slider3(contener,subcontener)},marquee_speed3);return false;}
if(marquee_licznik3==0){width_sub_inner=0;sub.innerHTML+=sub.innerHTML;width_sub_inner=marquee_counter3(sub,width_sub_inner);sub.style.width=width_sub_inner+'px';cont.scrollLeft=0;marquee_licznik3=1;}}
if(marquee_width_sub_inner3+cont.clientWidth<=cont.scrollLeft+cont.clientWidth){cont.scrollLeft=0;}
cont.scrollLeft+=1;move3=setTimeout(function(){marquee_slider3(contener,subcontener)},marquee_speed3);}
function marquee_counter3(sub,width_sub_inner)
{var temp=document.getElementById("temp");for(i=0;i<sub.childNodes.length;i++)
{if(sub.childNodes[i].className=="commercial_banner_marque3")
{sub.childNodes[i].style.margin=marquee_margin3+"px";width_sub_inner+=sub.childNodes[i].clientWidth+(marquee_margin3*2);}}
return width_sub_inner;}
function hide_txt(id){document.getElementById(id).className='text_clean';}
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';}}
txt_theprice="Price: ";txt_dostepny="In stock.";txt_niedostepny="Delivery coming soon.";txt_zamowienie="Product on demand.";txt_czas_wysylki="Shipping within  ";txt_czas_dostawy="Delivery within  ";txt_points="You can buy it for points.<br />Points required: ";txt_points_only="Special offer product, only for points.";var txt_warning_choosen="Ready to buy?";txt_actual_version="See detailed description ";txt_telprice="Ask for price";txt_czas_wysylki_zero="We send within 24h.";txt_shipping="";txt_czas_dostawy_today="Shipping today.";txt_za="within ";txt_dni=" days.";txt_dzis=" today.";txt_jutro=" tomorrow.";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 statusDesc;var statusGraphic;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];statusDesc=arVersionSizes[id][8];statusGraphic=arVersionSizes[id][9];if(document.getElementById('id_display_shipping'))
{el_0=document.getElementById('id_display_shipping');if((price==shippinglimitfree)||(price>shippinglimitfree))
{el_0.style.display="block";el_0.innerHTML=txt_shipping;}
else
{el_0.style.display="none";}}
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+' dni.';}else{if(days==0){el2.innerHTML=txt_czas_wysylki_zero;}else{el2.innerHTML=txt_czas_wysylki+days+' dzień.';}}}
if(availabilityStatus=='order'&&days){el.innerHTML=txt_zamowienie;if(days>1){el2.innerHTML=txt_czas_wysylki+days+' dni.';}else{el2.innerHTML=txt_czas_wysylki+days+' dzień.';}}
toBasket=1;}
else
{toBasket=0;if(el=document.getElementById('id_display_availability')){el.innerHTML=txt_niedostepny;if(availabilityStatus=='disable'&&days){if(days>1){el.innerHTML='';el2.innerHTML=txt_czas_dostawy+days+' dni.';}
if(days==1){el.innerHTML='';el2.innerHTML=txt_czas_dostawy+days+' dzień.';}
if(days==0){el.innerHTML='';el2.innerHTML=txt_czas_dostawy_today;}}}}}
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=txt_theprice+promo_price+price+currency;}}else{e11.style.display="none";toBasket=0;}}
if(statusDesc!=''){if(statDesc=document.getElementById('av_desc')){statDesc.innerHTML=statusDesc;if((availabilityStatus=='disable')&&(days!='')){if(Addition=document.getElementById('av_addition')){if(days=='0'){Addition.innerHTML=txt_dzis;}
else if(days=='1'){Addition.innerHTML=txt_jutro;}
else{Addition.innerHTML=txt_za+days+txt_dni;}}}}}
if(statusGraphic!=''){if(statGfx=document.getElementById('av_gfx')){statGfx.innerHTML='<img id="aval_gfx" class="aval_gfx_c" src="'+statusGraphic+'" alt="'+statusDesc+'" />';if(statusDesc==''){if(statDesc=document.getElementById('av_desc')){statDesc.innerHTML='';}}}}
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')){el3=document.getElementById('id_display_basket3')
el2=document.getElementById('id_display_basket2')
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";el3.style.display='block';el3.style.opacity='1';el3.style.filter="alpha(opacity=100)";el3.style.cursor="pointer";el2.style.display='block';el2.style.opacity='1';el2.style.filter="alpha(opacity=100)";el2.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";el3.style.display='block';el3.style.opacity='.4';el3.style.filter="alpha(opacity=40)";el3.style.cursor="not-allowed";el2.style.display='block';el2.style.opacity='.4';el2.style.filter="alpha(opacity=40)";el2.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 components=new Array("component_projector_suggestproduct","component_projector_askforproduct","component_projector_longdescription");function projector_details_switch(name){for(var i=0;i<components.length;i++){if(document.getElementById(components[i])){document.getElementById(components[i]).style.display='none';}}
document.getElementById(name).style.display='block';}
function projector_details_change(){ps=document.getElementById('projector_size');if(ps.firstChild.nodeName=='SELECT'){id=ps.firstChild.value;dl=document.location;dl.href=dl.protocol+'//'+dl.host+dl.pathname+'?product='+id;}}
function projector_details_deselectradio(){var radios=document.getElementsByTagName('input');for(i=0;i<radios.length;i++){if(radios[i].checked){radios[i].checked=!radios[i].checked;}}}
function projector_button_switch(cont){if(cont=='component_projector_suggestproduct'){if(document.getElementById('component_projector_askforproduct')){document.getElementById('component_projector_askforproduct').style.display='none';}
if(document.getElementById('component_projector_suggestproduct')){document.getElementById('component_projector_suggestproduct').style.display='block';}}
if(cont=='component_projector_askforproduct'){if(document.getElementById('component_projector_suggestproduct')){document.getElementById('component_projector_suggestproduct').style.display='none';}
if(document.getElementById('component_projector_askforproduct')){document.getElementById('component_projector_askforproduct').style.display='block';}}}
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;}
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();}}
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 HOVER_classname_start="tab";var HOVER_classname_stat=0;var HOVER_opinions=false;var HOVER_choosenone="12";var Hover_Array_Disable=new Array();var Hover_Array=new Array();var Hover_Array2=new Array();Hover_Array2[6]=new Array("component_projector_sizes","0");Hover_Array2[1]=new Array("component_projector_opinions","0","2");Hover_Array2[7]=new Array("component_projector_associated_zones","0","1");Hover_Array2[8]=new Array("component_projector_longdescription","0");Hover_Array2[4]=new Array("component_projector_suggestproduct","0");Hover_Array2[5]=new Array("component_projector_askforproduct","1");Hover_Array2[9]=new Array("component_projector_warranty","0");Hover_Array2[10]=new Array("component_projector_dictionary","0");Hover_Array2[11]=new Array("component_projector_enclosures","0");Hover_Array2[12]=new Array("component_projector_defaultcms","0");Hover_Array2[2]=new Array("component_projector_associated_zone1","0");Hover_Array2[3]=new Array("component_projector_associated_zone2","0");Hover_Array2[13]=new Array("component_projector_associated_zone3","0");Hover_Array2[14]=new Array("component_projector_associated_zone4","0");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_OPINIONS)
{if(document.getElementById(Hover_Array_OPINIONS[n][0]))document.getElementById(Hover_Array_OPINIONS[n][0]).style.display="none";}
for(n in Hover_Array)
{if(document.getElementById('btn_'+Hover_Array[n][0]))
{if(HOVER_classname_stat==1)
{document.getElementById('btn_'+Hover_Array[n][0]).className=Hover_Array[n][0];}
else
{document.getElementById('btn_'+Hover_Array[n][0]).className=HOVER_classname_start;}
Hover_Array_Disable[n]=false;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')
{document.getElementById(Hover_Array[n][0]).style.display="block";}
else
{document.getElementById(Hover_Array[n][0]).style.display="none";}}
if(Hover_Array[n][2]=='2')
{for(k in Hover_Array_OPINIONS)
{if(document.getElementById(Hover_Array_OPINIONS[k][0]))Hover_Array_Disable[n]=true;}
if(Hover_Array[n][1]=='1')
{for(n in Hover_Array_OPINIONS)
{if(document.getElementById(Hover_Array_OPINIONS[n][0]))document.getElementById(Hover_Array_OPINIONS[n][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';setTimeout("HOVER_disable()",500);}}}}
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);}
function menu_categories_toggle(id,id_up){if(document.getElementById(id).style.display=='block'){document.getElementById(id).style.display='none';}else{document.getElementById(id).style.display='block';}}
function menu_highlight(id){if(document.getElementById(id).className=='menu_categories_cat_sub_first')
{document.getElementById(id).className='menu_categories_cat_sub_first_active';return false;}
if(document.getElementById(id).className=='menu_categories_cat_sub_last')
{document.getElementById(id).className='menu_categories_cat_sub_last_active';return false;}
if(document.getElementById(id).className=='menu_categories_cat_sub')
{document.getElementById(id).className='menu_categories_cat_sub_active';return false;}
if(document.getElementById(id).className=='menu_categories_cat_sub_first_active')
{document.getElementById(id).className='menu_categories_cat_sub_first';return false;}
if(document.getElementById(id).className=='menu_categories_cat_sub_last_active')
{document.getElementById(id).className='menu_categories_cat_sub_last';return false;}
if(document.getElementById(id).className=='menu_categories_cat_sub_active')
{document.getElementById(id).className='menu_categories_cat_sub';return false;}}
function menu_highlight_sub(id){if(document.getElementById(id).className=='menu_categories_3b')
{document.getElementById(id).className='menu_categories_3b_active';return false;}
if(document.getElementById(id).className=='menu_categories_3b_active')
{document.getElementById(id).className='menu_categories_3b';return false;}}
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 PutYear(){var today=new Date()
var Year=today.getYear()
if(Year<1000){Year+=1900;}
return Year;}
var ChangeDivPosition={};var ns=document.getElementById&&!document.all;function positiontip(e){ChangeDivPosition.pageX=(ns)?e.pageX:event.clientX+document.documentElement.scrollLeft;ChangeDivPosition.pageY=(ns)?e.pageY:event.clientY+document.documentElement.scrollTop;var obj=document.getElementById(ChangeDivPosition.id);if(obj){var x=ChangeDivPosition.marginLeft+(ChangeDivPosition.pageX-parseInt(ChangeDivPosition.startX));var y=ChangeDivPosition.marginTop+(ChangeDivPosition.pageY-parseInt(ChangeDivPosition.startY));if(x>ChangeDivPosition.maxX){x=ChangeDivPosition.maxX;}else if(x<0){x=0;}
if(y>ChangeDivPosition.maxY){y=ChangeDivPosition.maxY;}else if(y<0){y=0;}
var r=ChangeDivPosition.maxX;var PriceMax=document.getElementById('max_price_start').value;var PriceMin=document.getElementById('min_price_start').value;var price=parseInt(PriceMin)+parseInt((PriceMax-PriceMin)*x/r);if(obj.id=='s1'){var obj2=document.getElementById('s2');}else{var obj2=document.getElementById('s1');}
if(parseInt(obj2.style.marginLeft.replace('px',''))>x){if(PriceMin>=price){document.getElementById('pricelimitmin').value='';}else{document.getElementById('pricelimitmin').value=price;}
document.getElementById('min_price_text').innerHTML=price+'.00';}else{if(PriceMax<=price){document.getElementById('pricelimitmax').value='';}else{document.getElementById('pricelimitmax').value=price;}
document.getElementById('max_price_text').innerHTML=price+'.00';}
obj.style.marginLeft=x+'px';var left1=parseInt(obj2.style.marginLeft.replace('px',''));var left2=x;if(left2>left1){document.getElementById('s3').style.marginLeft=(left1+10)+'px';if((left2-left1-10)>0){document.getElementById('s3').style.width=(left2-left1-10)+'px';}else{document.getElementById('s3').style.width='0px';}}else{document.getElementById('s3').style.marginLeft=(left2+10)+'px';if((left1-left2-10)>0){document.getElementById('s3').style.width=(left1-left2-10)+'px';}else{document.getElementById('s3').style.width='0px';}}}}
function StartDrag(obj,contenerId){ChangeDivPosition.id=obj.id
ChangeDivPosition.startX=ChangeDivPosition.pageX;ChangeDivPosition.startY=ChangeDivPosition.pageY;ChangeDivPosition.wait=3;if(!obj.style.marginLeft){if(obj.offsetLeft){obj.style.marginLeft=obj.offsetLeft+'px';}else{obj.style.marginLeft='0px';}}
if(!obj.style.marginTop){if(obj.offsetTop){obj.style.marginTop=obj.offsetTop+'px';}else{obj.style.marginTop='0px';}}
if(!obj.style.width){if(obj.offsetWidth){obj.style.width=obj.offsetWidth+'px';}else{obj.style.width='0px';}}
ChangeDivPosition.marginLeft=parseInt(obj.style.marginLeft.replace('px',''));ChangeDivPosition.marginTop=parseInt(obj.style.marginTop.replace('px',''));var contener=document.getElementById(contenerId);if(!contener.style.width){if(contener.offsetWidth){contener.style.width=contener.offsetWidth+'px';}else{contener.style.width='0px';}}
if(!contener.style.height){if(contener.offsetHeight){contener.style.height=contener.offsetHeight+'px';}else{contener.style.height='0px';}}
ChangeDivPosition.maxX=parseInt(contener.style.width.replace('px',''))-parseInt(obj.style.width.replace('px',''));;ChangeDivPosition.maxY=parseInt(contener.style.height.replace('px',''))-parseInt(obj.style.height.replace('px',''));}
function StartDrag2(obj){if(ChangeDivPosition.id){ChangeDivPosition.wait=3;}}
function StopDrag(obj,wait){if(ChangeDivPosition.wait==3&&wait==2){ChangeDivPosition.wait=2;}
if(wait<1){ChangeDivPosition.id='';Searching.send('price');}else if(ChangeDivPosition.id&&ChangeDivPosition.wait!=3){setTimeout("StopDrag ('', '"+(wait-1)+"')",200);}}
var Searching={selectFields:{},highlightTextSelect:'',startPricePosition:function(contenerId)
{var contener=document.getElementById(contenerId);if(!contener.style.width){if(contener.offsetWidth){contener.style.width=contener.offsetWidth+'px';}else{contener.style.width=contener.currentStyle['width'];}}
if(!contener.style.height){if(contener.offsetHeight){contener.style.height=contener.offsetHeight+'px';}else{contener.style.height=contener.currentStyle['height'];}}
if(!document.getElementById('s2').style.width){if(document.getElementById('s2').offsetWidth){document.getElementById('s2').style.width=document.getElementById('s2').offsetWidth+'px';}else{document.getElementById('s2').style.width=document.getElementById('s2').currentStyle['width'];}}
var r=parseInt(contener.style.width.replace('px',''))-parseInt(document.getElementById('s2').style.width.replace('px',''));;var PriceMax=document.getElementById('max_price_start').value;var PriceMin=document.getElementById('min_price_start').value;var price=document.getElementById('pricelimitmin').value;document.getElementById('s1').style.marginLeft='0px';document.getElementById('s2').style.marginLeft=r+'px';document.getElementById('s3').style.marginLeft=10+'px';document.getElementById('s3').style.width=r+'px';},send:function()
{var name=arguments[0];if(name=='traits'&&arguments[1]){name=name+'['+arguments[1]+']';}
if(name=='text'){setTimeout("document.getElementById('find-text').style.display = 'none';",500);}
Searching.selectFields[name]=1;document.getElementById('searchingPreloader2').style.display='';var txt='';var active=true;for(nameTmp in Searching.selectFields){var form=document.getElementsByName(nameTmp);if(nameTmp=='price'){if(active){txt=txt+'&pricelimitmin='+document.getElementById('pricelimitmin').value;txt=txt+'&pricelimitmax='+document.getElementById('pricelimitmax').value;}}else if(nameTmp=='date'){if(active){txt=txt+'&day='+document.getElementById('date_d').value;txt=txt+'&month='+document.getElementById('date_m').value;txt=txt+'&year='+document.getElementById('date_y').value;}}else if(form[0].type=='select-one'&&form[0].name){if(active){if(form[0].value){txt=txt+'&'+form[0].name+'='+form[0].value;}}else{form[0].selectedIndex=0;}}else if(form[0].type=='checkbox'){if(active){if(form[0].checked){txt=txt+'&'+form[0].name+'='+form[0].value;}}else{form[0].checked=false;}}else if(nameTmp=='text'){if(active){txt=txt+'&text='+document.getElementById('searching_text').value;}else{form[0].value='';}}else if(form[0].name&&form[0].value){if(active){txt=txt+'&'+form[0].name+'='+form[0].value;}else{form[0].value='';}}
if(name==nameTmp){active=false;}}
IAI_Ajax.Request('ajax/search.php?ajax=true&selectAll=t&change_name='+name+txt,'',{onSuccess:'Searching.prepareForms'});},prepareForms:function(x)
{document.getElementById('searchingPreloader2').style.display='none';try{var response=eval('('+x+')');}catch(e){return false;}
Searching.highlightTextSelect=0;var form=document.getElementById('searching_form').elements;if(response['countProducts']>0){document.getElementById('select_products_info').style.display='none';}else{document.getElementById('select_products_info').style.display='block';}
for(i=0;i<form.length;i++){var display=false;if(!form[i].name){display='hidden';if(form[i].id=='searching_category_1'&&!form[i].value){display=false;SearchingCategory2={};if(response['category']){display=true;for(j in response['category']){SearchingCategory2[j]=SearchingCategory[j];for(k in SearchingCategoryParents[j]){if(SearchingCategoryParents[j][k]){SearchingCategory2[SearchingCategoryParents[j][k]]=SearchingCategory[SearchingCategoryParents[j][k]];}}}
for(j=1;j<form[i].options.length;j++){if(form[i].options[j].value&&!SearchingCategory2[form[i].options[j].value]){form[i].options[j].style.display='none';}else if(form[i].options[j].value){form[i].options[j].style.display='';}}}}}else if(form[i].type=='select-one'){if(form[i].value){display=true;}else if(!response[form[i].name]||response[form[i].name].length<=2){display=false;}else if(response[form[i].name]){var tmpI=1;var copySelectId='copy_'+form[i].name;if(document.getElementById(copySelectId)){var countTmpOptions=form[i].options.length;for(j=1;j<countTmpOptions;j++){form[i].removeChild(form[i].options[1]);}
for(j=1;j<document.getElementById(copySelectId).options.length;j++){var optionTmp=document.getElementById(copySelectId).options[j];if(response[form[i].name][optionTmp.value]){display=true;var t=Searching.addOption(form[i]);t.id=optionTmp.id;t.value=optionTmp.value;t.textContent=optionTmp.textContent;t.text=optionTmp.text;tmpI++}}}
if(tmpI<=2){display=false;}}}else if(form[i].type=='checkbox'){display=true;if(!form[i].checked){if(!response[form[i].name]){display=false;}else if(response[form[i].name].length<2){display=false;}}}else{display=true;}
if(display=='hidden'){}else if(display==true){form[i].disabled='';}else{form[i].disabled='disabled';}}
if(response['day']&&response['month']&&response['year']&&response['change_name']!='date'){document.getElementById('date_d').value=response['day'];document.getElementById('date_m').value=response['month'];document.getElementById('date_y').value=response['year'];document.getElementById('date').value=response['year']+'-'+response['month']+'-'+response['day'];}
if(response['pricemin']&&response['pricemax']&&response['change_name']!='price'){var errorprice=0;for(nameTmp in Searching.selectFields){if(nameTmp=='price'){errorprice=1;}else if(response['change_name']==nameTmp&&errorprice==1){errorprice=2;}}
if(response['pricemin']==response['pricemax']){errorprice=2;}
if(errorprice!=2||(document.getElementById('pricelimitmax').value==document.getElementById('max_price_start').value&&document.getElementById('pricelimitmin').value==document.getElementById('min_price_start').value)){if(response['pricemin']!=response['pricemax']){document.getElementById('contener3').style.display='block';document.getElementById('contener4').style.display='none';document.getElementById('pricelimitmin').value=response['pricemin'];document.getElementById('pricelimitmax').value=response['pricemax'];document.getElementById('min_price_text').innerHTML=response['pricemin'];document.getElementById('max_price_text').innerHTML=response['pricemax'];document.getElementById('min_price_start').value=response['pricemin'];document.getElementById('max_price_start').value=response['pricemax'];Searching.startPricePosition('contener');}else{document.getElementById('contener3').style.display='none';document.getElementById('min_price_text_2').innerHTML=response['pricemax'];document.getElementById('contener4').style.display='block';}}}},findText:function(e)
{var txt=document.getElementById('searching_text').value;if(!e)e=window.event;var key=e.keyCode||e.which;if(key==38||key==40){if(document.getElementById('find-text-1-div')){if(!Searching.highlightTextSelect){Searching.highlightText(1);}else if(key==38&&document.getElementById('find-text-'+(Searching.highlightTextSelect-1)+'-div')){Searching.highlightText(Searching.highlightTextSelect-1);}else if(key==40&&document.getElementById('find-text-'+parseInt(Searching.highlightTextSelect+1)+'-div')){Searching.highlightText(Searching.highlightTextSelect+1);}}}else if(key==13&&Searching.highlightTextSelect){Searching.selectText(Searching.highlightTextSelect);}else{if(txt.length>1){IAI_Ajax.Request('ajax/search-name.php?ajax=true&text='+txt,'',{onSuccess:'Searching.prepareFindText'});}}},checkEnter:function()
{if(Searching.highlightTextSelect){Searching.selectText(Searching.highlightTextSelect);return false;}else{return true;}},highlightText:function(i)
{if(Searching.highlightTextSelect){document.getElementById('find-text-'+Searching.highlightTextSelect+'-div').style.backgroundColor='';}
Searching.highlightTextSelect=i;document.getElementById('find-text-'+i+'-div').style.backgroundColor='#FFEEAA';},sendSubmit:function()
{Searching.highlightTextSelect='';document.getElementById('searching_form').submit();},prepareFindText:function(x)
{try{var response=eval('('+x+')');}catch(e){return false;}
Searching.highlightTextSelect=0;var text='';var re=new RegExp(response.text.toLowerCase(),"gi");if(response.products_name.length>0){document.getElementById('select_products_info').style.display='none';document.getElementById('find-text').style.display='block';var j=response.products_name.length;for(var i=1;i<=j;i++){var tmpTxt=response.products_name[i-1];if(!response.products_name[i-1]){i--;j--;continue;}
text=text+'<div id="find-text-'+i+'-div" style="cursor: pointer;" onmouseover="Searching.highlightText(\''+i+'\');" onclick="Searching.selectText(\''+i+'\');"><input type="hidden" value="'+tmpTxt+'" id="find-text-'+i+'">'+tmpTxt.replace(re,'<b>$&</b>')+'</div>';}}else{document.getElementById('find-text').style.display='none';document.getElementById('select_products_info').style.display='block';}
document.getElementById("find-text").innerHTML=text;},selectText:function(id)
{document.getElementById('searching_text').value=document.getElementById('find-text-'+id).value;document.getElementById('find-text').style.display='none';Searching.highlightTextSelect='';document.getElementById('searching_form').submit();},changeSelectCategory:function(obj,number)
{var selectId=obj.value;if(selectId){document.getElementById('category').value=selectId;}else{if(number==1){document.getElementById('category').value='';}else if(number==2){document.getElementById('category').value=document.getElementById("searching_category_1").value;}else if(number==3){document.getElementById('category').value=document.getElementById("searching_category_2").value;}else{document.getElementById('category').value=document.getElementById("searching_category_3").value;}}
if(number<4){document.getElementById("searching_category_4").style.display="none";if(number<3){document.getElementById("searching_category_3").style.display="none";if(number<2){document.getElementById("searching_category_2").style.display="none";}}}
var idtmp="searching_category_"+(1+number);if(selectId){document.getElementById(idtmp).selectedIndex=0;var j=document.getElementById(idtmp).options.length;while(j>1){j--;document.getElementById(idtmp).removeChild(document.getElementById(idtmp).options[j]);}
var ile=0;for(k in SearchingCategory2[selectId]){k=parseInt(k);if(k>0){var t=Searching.addOption(document.getElementById(idtmp));t.id=SearchingCategory2[selectId][k]["id"];t.value=SearchingCategory2[selectId][k]["id"];t.textContent=SearchingCategory2[selectId][k]["name"];t.text=SearchingCategory2[selectId][k]["name"];ile++;}}
if(ile){document.getElementById("searching_category_2").style.display="";if(number<2){document.getElementById("searching_category_3").style.display="none";}else{document.getElementById("searching_category_3").style.display="";}
if(number<3){document.getElementById("searching_category_4").style.display="none";}else{document.getElementById("searching_category_4").style.display="";}}else{document.getElementById(idtmp).style.display="none";}}
Searching.send('category');},addOption:function(p)
{var t;p.appendChild(t=document.createElement('option'));return t;},hideCalendar:function()
{document.getElementById('calendar').innerHTML='';if(document.getElementById('calendar_frame')){document.getElementById('calendar_frame').parentNode.removeChild(document.getElementById('calendar_frame'));}
document.getElementById('calendar').style.display='none';},hideselects:function()
{for(i=0;i<Searching_hideselectsArray.length;i++)
{document.getElementById(Searching_hideselectsArray[i]).style.display='none';}}};function validateDate(obj)
{}
function Calendar(E,T){var i,j,tBody,Row,od,Do,d,dt,z=0,zeroAllowed=false;function cEl(t,p,h,cl){p.appendChild(t=document.createElement(t));if(h){t.innerHTML=h;}
if(cl){t.className=cl;}
return t;}
function cB(x,E,T){with(IaiCld){if(x==0){R--;}else if(x==1){R++;}else if(x==2){M--;if(M<0){M=11;R--;}}else if(x==3){M++;if(M>11){M=0;R++;}}
od=Date.UTC(R,M,1);Do=Date.UTC(R,M+1,1);}
draw(E,T);}
function draw(E,T)
{while(E.childNodes.length){E.removeChild(E.firstChild);}
table=cEl('table',E,'','calendar_table_header');table.cellSpacing="4";table.cellPadding="0";var tBody=cEl('tbody',table);tBody.onmouseup=function(){draw(E,T);}
tBody.onmousemove=function(){if(window.getSelection){window.getSelection().removeAllRanges();}
if(document.selection){document.selection.empty();}}
Row=cEl('tr',tBody);var tmp=cEl('td',Row,'','calendar_select_year_left').onmousedown=function(){cB(0,E,T);}
tmp.id='calendar_select_year_left';cEl('th',Row,IaiCld.R,'calendar_year');var tmp=cEl('td',Row,'','calendar_select_year_right').onmousedown=function(){cB(1,E,T);}
tmp.id='calendar_select_year_right';Row=cEl('tr',tBody);var tmp=cEl('td',Row,'','calendar_select_month_left').onmousedown=function(){cB(2,E,T);}
tmp.id='calendar_select_month_left';cEl('th',Row,IaiCld.month[IaiCld.M],'calendar_month');var tmp=cEl('td',Row,'','calendar_select_month_right').onmousedown=function(){cB(3,E,T);}
tmp.id='calendar_select_month_right';var R=IaiCld.R;var M=IaiCld.M;var selectY=document.getElementById(T.id+"_y").value;var selectM=document.getElementById(T.id+"_m").value-1;var selectD=document.getElementById(T.id+"_d").value;var table2=cEl('table',E,'','calendar_table');table2.cellSpacing="4";table2.cellPadding="0";tBody=cEl('tbody',table2);Row=cEl('tr',tBody);for(i=0;i<7;i++){cEl('th',Row,IaiCld.day[i],i==6?'calendar_days_sunday':'calendar_days');}
for(i=od;i<Do;i+=86400000){with(new Date(i)){d=getUTCDate();dt=getUTCDay();}
if(dt==1||i==od){Row=cEl('tr',tBody);}
if(dt!=1&&d==1){for(j=1;j<(dt?dt:7);j++){cEl('th',Row);}}
dt=cEl('td',Row,d);dt.onmousedown=function(x){x=+this.innerHTML;with(IaiCld){a=x;document.getElementById(T.id+"_y").value=R;document.getElementById(T.id+"_m").value=(x=M+1)<10?'0'+x:x;document.getElementById(T.id+"_d").value=a<10?'0'+a:a;document.getElementById(T.id).value=R+'-'+((x=M+1)<10?'0'+x:x)+'-'+(a<10?'0'+a:a);document.getElementById('calendar').innerHTML='';if(document.getElementById('calendar_frame')){document.getElementById('calendar_frame').parentNode.removeChild(document.getElementById('calendar_frame'));}
document.getElementById('calendar').style.display='none';Searching.send(T.id);}}
if(d==selectD&&M==selectM&&R==selectY){dt.id="calendar_checked_day";}else{dt.className="calendar_normal_day";}}
IaiCld.B=1;var valueT=0,valueL=0,cont=T;do{valueT+=cont.offsetTop||0;valueL+=cont.offsetLeft||0;cont=cont.offsetParent;}while(cont);valueL+=T.offsetWidth+2;var mh=!!(window.attachEvent&&!window.opera)?172:151;if((valueT+mh)>document.body.offsetHeight){valueT=document.body.offsetHeight-mh;}
E.style.display='block';}
if((arguments.length>=3)&&arguments[2]){zeroAllowed=true;}
with(IaiCld){core=T.id;R=document.getElementById(core+"_y").value;M=document.getElementById(core+"_m").value-1;D.setFullYear(R,M,document.getElementById(core+"_d").value);if((R<=0)&&(M<=-1)){M=new Date().getMonth();R=new Date().getFullYear();}
od=Date.UTC(R,M,1);Do=Date.UTC(R,M+1,1);var frame;document.getElementById("calendar").parentNode.appendChild(frame=document.createElement('iframe'));frame.id='calendar_frame';}
draw(document.getElementById("calendar"),T);document.getElementById('calendar').style.display='block';}
IaiCld={day:new Array('pn','wt','śr','cz','pt','s','n'),month:new Array('Styczeń','Luty','Marzec','Kwiecień','Maj','Czerwiec','Lipiec','Sierpień','Wrzesień','Październik','Listopad','Grudzień'),D:new Date(),M:new Date().getMonth(),R:new Date().getFullYear()}
var top_searching="SEARCH...";function searching_blur(x){if(x.value==''){x.value=top_searching;}}
function searching_focus(x){if(x.value==top_searching){x.value='';}}
function showList(){document.getElementById('curr_list').style.display="block";}
function hideList(){document.getElementById('curr_list').style.display="none";}
function showMenu(idSub){document.getElementById(idSub).style.display="block";}
function hideMenu(idSub){document.getElementById(idSub).style.display="none";}
var ClientSave={validateLogin:function(obj)
{obj.value=obj.value.toLowerCase();}}
var product_id=0;var size_id=0;var price=0;var viewSubmits=false;var active='';var message=true;function auction_delivery_addr(){if(document.getElementById('delivery_address').checked){document.getElementById('delivery_address_inputs').style.display='block';}else{document.getElementById('delivery_address_inputs').style.display='none';}}
function show_firm(){if(document.getElementById('add_firm').checked){document.getElementById('add_firm_inputs').style.display='block';}else{document.getElementById('add_firm_inputs').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 SwitchSize(id,id2)
{var srhprice;var srhprice_net;var srhstatus;var srhstatus_txt;var srhstatus_gfx;var sdays;srhprice=arSearchSizes[id][0];srhprice_net=arSearchSizes[id][1];srhstatus=arSearchSizes[id][2];srhstatus_txt=arSearchSizes[id][3];srhstatus_gfx=arSearchSizes[id][4];sdays=arSearchSizes[id][5];document.getElementById('av_img'+id2).src=srhstatus_gfx;document.getElementById('av_txt'+id2).innerHTML=srhstatus_txt;if((srhstatus=='disable')&&(sdays!='')){if(sdays=='0'){document.getElementById('av_txt'+id2).innerHTML=srhstatus_txt+' '+txt_dzis;}
else if(days=='1'){document.getElementById('av_txt'+id2).innerHTML=srhstatus_txt+' '+txt_jutro;}
else{document.getElementById('av_txt'+id2).innerHTML=srhstatus_txt+txt_za+sdays+txt_dni;}}
document.getElementById('av_netprice'+id2).innerHTML=srhprice_net;document.getElementById('av_price'+id2).innerHTML=srhprice;}
var marquee_licznik=0;var marquee_margin=5;var marquee_height_sub_inner2;var marquee_speed=65;function marquee_slider(contener,subcontener)
{if(!document.getElementById(contener)||!document.getElementById(subcontener))
{setTimeout(function(){marquee_slider(contener,subcontener)},500);return false;}
var temp=document.getElementById("temp");var cont=document.getElementById(contener);var sub=document.getElementById(subcontener);var height_sub_inner=0;height_sub_inner=marquee_counter(sub,height_sub_inner);if(marquee_licznik==0){marquee_height_sub_inner2=height_sub_inner;}
if(height_sub_inner<=cont.clientHeight&&cont.clientHeight!=0)
{sub.innerHTML+=sub.innerHTML;setTimeout(function(){marquee_slider(contener,subcontener)},40);return false;}
else
{if(cont.clientHeight==0)
{setTimeout(function(){marquee_slider(contener,subcontener)},40);return false;}
if(marquee_licznik==0)
{height_sub_inner=0;sub.innerHTML+=sub.innerHTML;height_sub_inner=marquee_counter(sub,height_sub_inner);sub.style.height=height_sub_inner+'px';cont.scrollLeft=0;marquee_licznik=1;}}
if(marquee_height_sub_inner2+cont.clientHeight<=cont.scrollTop+cont.clientHeight){cont.scrollTop=0;}
cont.scrollTop+=1;setTimeout(function(){marquee_slider(contener,subcontener)},marquee_speed);}
function marquee_counter(sub,height_sub_inner)
{var temp=document.getElementById("temp");for(i=0;i<sub.childNodes.length;i++)
{if(sub.childNodes[i].className=="commercial_banner_marque")
{sub.childNodes[i].style.margin=marquee_margin+"px";height_sub_inner+=sub.childNodes[i].clientHeight+(marquee_margin*2);}}
return height_sub_inner;}
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";function selectCountryG(idCountry){if(idCountry=="1143020183"){if(document.getElementById("submit_edit")){document.getElementById("submit_edit").style.display="none";}
if(document.getElementById("submit_register")){document.getElementById("submit_register").style.display="none";}
if(document.getElementById("submit_noregister")){document.getElementById("submit_noregister").style.display="none";}
document.getElementById("cntrRed").style.display="block";document.getElementById("cntrRed").href="REDIRECT-cabout-pol-101.html";}}
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=ClientDeliveryAddreses[IdAddress+"_firstname"];document.getElementById('additional_lastname').value=ClientDeliveryAddreses[IdAddress+"_lastname"];document.getElementById('additional_city').value=ClientDeliveryAddreses[IdAddress+"_city"];document.getElementById('additional_additional').value=ClientDeliveryAddreses[IdAddress+"_additional"];document.getElementById('additional_street').value=ClientDeliveryAddreses[IdAddress+"_street"];document.getElementById('additional_zipcode').value=ClientDeliveryAddreses[IdAddress+"_zipcode"];document.getElementById('additional_phone').value=ClientDeliveryAddreses[IdAddress+"_phone"];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==ClientDeliveryAddreses[IdAddress+"_region_id"]){document.getElementById('additional_region').selectedIndex=i;break;}}}
if(ClientDeliveryAddreses[IdAddress+"_removable"]=='yes'){document.getElementById('delete_delivery_address').style.display='';RemoveAddresLink=ClientDeliveryAddreses[IdAddress+"_removelink"];}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(ClientDeliveryAddreses[IdAddress+"_editable"]=='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='';}}},check_inp:function(idd,name,delay){if(document.getElementById(idd)){idd=document.getElementById(idd);}
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.val[0]){document.getElementById(obj+'_help').innerHTML='<div>'+response.message.val[0]+'</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_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('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(){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 product_id=0;var size_id=0;var price=0;var viewSubmits=false;var active='';var message=true;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';}}
function viewSubmit(id)
{var confirm=document.getElementById('submit_confirm');var confirm_idle=document.getElementById('submit_confirm_idle');var div=document.getElementById(id);if(viewSubmits==false){viewSubmits=true;div.style.display='block';confirm.style.display='none';confirm_idle.style.display='block';active=id;}else{if((active!=id)&&(message)){switch(active){case'submit_client':alert(text_submit_client);break;case'submit_delivery':alert(text_submit_delivery);break;}
message=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;}
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);}
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 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 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;document.getElementById('big_photo2').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;document.getElementById('big_photo2').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);}},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=.8:cover.style.filter="alpha(Opacity=80)";if(window.opera){cover.style.opacity=.8;}
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,id2)
{if(displayed==''){document.getElementById('img_1').style.display='none';}else{document.getElementById(displayed).style.display='none';}
document.getElementById(id).style.display='';displayed=id;var imglist=document.getElementById('photos_list');imglist=imglist.getElementsByTagName('img');i=0;while(i<imglist.length){imglist[i].className="miniatura";i++;}
id2.className="miniatura_on";}
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;if(isNaN(timer)){show();}
timer=setTimeout("show();",100);}
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"}