function okno(adres,nazwa,szer,wys) {
	var left = (screen.width-szer)/2;
	left = Math.round(left);
	var top = (screen.height-wys-100)/2;
	top = Math.round(top);
	nazwa = window.open(adres,nazwa,'resizable=0,height='+wys+',width='+szer+',top='+top+',left='+left);
	nazwa.moveTo(left,top);
	nazwa.focus();
}
	
function openfull(parametr){
w = window.open(parametr, "", "scrollbars=yes,resizable=yes,menubar=no", true);
w.focus ();
}	

function PoliczRate(koszyk) { 
	var price = document.getElementById('productPrice').value;
	window.open('http://www.zagiel.com.pl/kalkulator/index_smart.php?action=getklientdet_si_rata&shopNo=28011111&goodsValue='+price, 'Policz_rate', 'width=630,height=500,directories=no,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no');
}


function CaptchaRefreshs() { 
  image = "_tools/captcha/captcha_image.php" //name of the image 
  date = new Date(); 
  tmp = "?"+date.getTime() 
  document.images["captcha"].src = image+tmp 
}  

function pokazdiv(el) {
         for(var i=1; i<=30; i++) {
                 if(el == i) {
                       document.getElementById(el).style.display = "block";
//                         document.getElementById(el).fadeIn(1800);
                 } else {
                       document.getElementById(i).style.display = "none";
                 }
        }
}

    /**
     * Sprawdzanie czy wybrano opcje produktu
    */
      function info_form_attr() {

        var stat=1;

        $('form#qwe_dodaj').find('select').map(function() {
          if($(this).val()=='---') {
                alert('Nie wybrano atrybutów (rozmiar)');
                stat=0;
          }
          else if($(this).val().match(/^-+$/)) {
                $('form#qwe_dodaj').submit();
                stat=1;
          }
        });


        if (stat==0)
            return false;
        else
            return true;
      }

