

function PoliczRate(koszyk) { 
window.open('https://www.eraty.pl/symulator/oblicz.php?numerSklepu=14110584&wariantSklepu=1&typProduktu=0&wartoscTowarow='+koszyk,'Policz_rate', 'width=630,height=500,directories=no,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no');
}



function NaRaty() { 
window.open('http://www.aigcredit.pl/kalkulator/index.php?action=about&partnerId=102', 'KupNaRaty', 'width=900,height=750,directories=no,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no');
}

function FAQ() { 
window.open('http://www.aigcredit.pl/kalkulator/index.php?action=faq&partnerId=102', 'FAQ', 'width=900,height=750,directories=no,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no');
}


function ObliczRate(koszyk) { 
window.open('http://www.aigcredit.pl/kalkulator/index.php?partnerId=73315&cena='+koszyk+'', 'ObliczRate', 'width=900,height=750,directories=no,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no');
}




function nwin(site, w, h){
okno=window.open("http://www.gama-sklep.pl/popups/"+site+"", "", "toolbar=no,menubar=no,scrollbars=yes,directories=no,status=no,resizable=yes,width="+w+",height="+h+",top=0,left=50");
okno.focus();
}


function downloadfile(url,fileid){
okno=window.open("http://ww.gama-sklep.pl/popups/Download.php?r="+url+"&f="+fileid+" ", "", "toolbar=no,menubar=no,scrollbars=yes,directories=no,status=no,resizable=yes,width=780,height=550,top=0,left=50");
okno.focus();
}



function redirect_producer(url,id){
okno=window.open("http://ww.gama-sklep.pl/popups/Producer.php?r="+url+"&f="+id+" ", "", "");
okno.focus();
}


function redirect(urlid){
okno=window.open("http://ww.gama-sklep.pl/popups/Redirect.php?id="+urlid+" ", "", "");
okno.focus();
}


function redirect_baner(urlid){
okno=window.open("http://ww.gama-sklep.pl/popups/RedirectBaner.php?id="+urlid+" ", "", "");
okno.focus();
}

var myPopupWindow = '';  
function openPopupWindow(url, name, width, height)  
{  
   

     if (!myPopupWindow.closed && myPopupWindow.location)  
     {  
         myPopupWindow.location.href = encodeUrl(url);  
     }  
     else  
     {  
         myPopupWindow= window.open(url, name, "location=no, scrollbars=yes, resizable=yes, toolbar=no, menubar=no, width=" + width + ", height=" + height );  
         if (!myPopupWindow.opener) myPopupWindow.opener = self;  
     }  
   
     if (window.focus) {myPopupWindow.focus()}  
}

function showlink(Ops){

	if(document.getElementById(Ops).style.display=='none'){
	
	document.getElementById(Ops).style.display="";
	
	}
	else{
	document.getElementById(Ops).style.display='none';
	}


}



function ShowFirm(){

	if(document.getElementById('RegisterForm').firm.options[document.getElementById('RegisterForm').firm.options.selectedIndex].value=='yes'){
	document.getElementById('Company').style.display="";
	}
	else{
	document.getElementById('Company').style.display='none';
	}

}


function ShowDeliv2(){

	if(document.getElementById('RegisterForm').deliv.options[document.getElementById('RegisterForm').deliv.options.selectedIndex].value=='yes'){
	document.getElementById('Delivery').style.display='none';
	}
	else{
	document.getElementById('Delivery').style.display="";
	}

}


function ShowDeliv(){


  
	if(document.getElementById('RegisterForm').deliv.checked==true){
	document.getElementById('Delivery').style.display='none';
	}
	else{
	document.getElementById('Delivery').style.display="";
	}



}

function ShowRegister(){


  
	if(document.getElementById('RegisterForm').register.checked==true){
	document.getElementById('Register').style.display="";
	}
	else{
	document.getElementById('Register').style.display='none';
	}



}




function ShowDAddress(){

	if(document.getElementById('OrderForm').delivUs.options[document.getElementById('OrderForm').delivUs.options.selectedIndex].value=='yes'){
	document.getElementById('Deliv_In').style.display="";
	}
	else{
	document.getElementById('Deliv_In').style.display='none';
	}

}



function ShowComments(){
  
	document.getElementById('Comments').style.display="";
	

}

function ShowRecommend(){
  
	document.getElementById('Recommend').style.display="";
	

}

function ShowAsk(){
  
	document.getElementById('Ask').style.display="";
	

}

function swapImages(){
      var $active = $('#ImgGallery .active');
      var $next = ($('#ImgGallery .active').next().length > 0) ? $('#ImgGallery .active').next() : $('#ImgGallery div:first');
      $active.fadeOut(function(){
      $active.removeClass('active');
      $next.fadeIn().addClass('active');
      });

    }
function swapImages2(){
      var $active = $('#ImgGallery2 .active');
      var $next = ($('#ImgGallery2 .active').next().length > 0) ? $('#ImgGallery2 .active').next() : $('#ImgGallery2 span:first');
      $active.fadeOut(function(){
      $active.removeClass('active');
      $next.fadeIn().addClass('active');
      });
}
      
function swapImages3(){
      var $active = $('#ImgGallery3 .active');
      var $next = ($('#ImgGallery3 .active').next().length > 0) ? $('#ImgGallery3 .active').next() : $('#ImgGallery3 div:first');
      $active.fadeOut(function(){
      $active.removeClass('active');
      $next.fadeIn().addClass('active');
      });    

    }

function locatProd(url)
{
	var vor = document.getElementById("selectStyle");
	var df = vor.selectedIndex;
	var id = vor.options[df].value;
	window.location = url + id;
//	txtValueObj.value = selObj.options[selIndex].value;
}



