
function PoliczRate(koszyk,shopNo) { 
window.open('https://www.zagiel.com.pl/kalkulator/index_smart.php?action=getklientdet_si_rata&shopNo='+shopNo+'&goodsValue='+koszyk, 'Policz_rate', 'width=630,height=500,directories=no,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no');
}

function _menu (obj)
  {
  ul = obj.parentNode.getElementsByTagName('ul'); 
  if ( ul.length )
    {
    if (  ul[0].style.display == '' || ul[0].style.display == 'none' )  ul[0].style.display = 'block';   
      else
    ul[0].style.display = 'none';
    }
  }
  
function sub_check( obj )
  {
  if (obj.value == 'Podaj e-mail') obj.value = '';
  }

function over(){
event.srcElement.style.cursor="hand";
}
function out(){
event.srcElement.style.cursor ="auto";
}

  function check_main_tab () {
  maintab = document.getElementById('tab1');
 if ( maintab.offsetHeight % 2 == 0 )
    {
    //document.getElementById('tab1').height =  maintab.offsetHeight+1;
    maintab.height = maintab.offsetHeight+1;
    }
  
  }

function dokoszyka (plik){
var ilosc5 = prompt ("Podaj ilość produktów dodanych do koszyka","1");
if(ilosc5>0)
{
var plik2;
plik2=plik+'&ilosc='+ilosc5;
parent.location.href=plik2;
}

}



function amenu(div)
{
 div1= document.getElementById(div);
 div1.style.top= 100;
}

function amenu2(div)
{
 div1= document.getElementById(div);
 div1.style.top= -1000;
}



function pasek(txt)
{
   window.status = txt;
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


function otworz(plik) {

window.location=plik;

}



function produkt_popup(url, displayWindow ){
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(url, '" + id + "','width=100,height=100,top=30,left=100,resizable=yes,scrollbars=yes,menubar=no');");
}
function intro_popup(url, width, height){
var Win = window.open(url,"intro_popup1",'width=' + width + ',height=' + height + ',top=30,left=100,resizable=yes,scrollbars=no,menubar=no');
}


function popup(url ){
var Win = window.open(url, 'mapa' ,'width=100,height=100,top=30,left=100,resizable=yes,scrollbars=yes,menubar=no');
}

function displayWindow(url, width, height){
var Win = window.open(url,"displayWindow",'width=' + width + ',height=' + height + ',top=30,left=100,resizable=no,scrollbars=no,menubar=no');
}

function displayWindow1(url, width, height){
var Win = window.open(url,"displayWindow",'width=' + width + ',height=' + height + ',top=20,left=250,resizable=no,scrollbars=no,menubar=no');
}

function displayWindow2(url, width, height){
var Win = window.open(url,"displayWindow",'width=' + width + ',height=' + height + ',top=220,left=380,resizable=no,scrollbars=no,menubar=no');
}


function test(){
var re_mail = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z])+$/;
if (!re_mail.test(emailform.email.value)) {
alert('Podałeś błędny adres email !!!');
}
else { emailform.submit(); }
}
function moveover(txt) {
   window.status = txt;
   setTimeout("erase()",1300);
}
function erase() {
   window.status="";
}


function test1()
{
var re_mail=logowanie_55.email_h.value;
if(logowanie_55.email_h.value=='')
{
alert('Podaj adres e-mail !!!');
}
else
{
logowanie_55.submit();
}



}
function otworz(plik)
{
parent.location.href=plik;
}



function pasek(txt)
{
   window.status = txt;
}

function pasek1(txt)
{
   window.status = txt;

   setTimeout("erase()",1500);
}



 function edit_kat( object0, object1, object2 )
 {

 obiekt0= document.getElementById(object0);
 obiekt1= document.getElementById(object1);
 obiekt2= document.getElementById(object2);

 obiekt0.style.display = '';
 obiekt1.style.display = '';
 obiekt2.style.display = 'none';

  }


 function edit_kat_n( object0, object1, object2 )
 {

 obiekt0= document.getElementById(object0);
 obiekt1= document.getElementById(object1);
 obiekt2= document.getElementById(object2);

 obiekt0.style.display = 'none';
 obiekt1.style.display = 'none';
 obiekt2.style.display = '';

  }


function aktualizujParent(nowyURL)
{
//var ilosc5= document.form_wybor.ilosc_sztuk.value;
//if(ilosc5<0)ilosc=1;
//nowyURL=nowyURL+'&ilosc='+ilosc5;
window.document.location= nowyURL;
alert ('Dodałeś produkt do koszyka');
}


