
function displayWindow(url, width, height) {
        var Win = window.open(url,"displayWindow",'width=' + width + ',height=' + height + ',resizable=0,scrollbars=no,menubar=no' );
}


function displayWindow2(url, width, height) {
        var Win = window.open(url,"displayWindow",'width=' + width + ',height=' + height + ',resizable=1,scrollbars=yes,menubar=yes' );
}


//divpopupWindow by adek
function wczytaj_fotke(plik)
{

   if(obrazcel.complete)
   {
   document.getElementById("fotopreloaader").style.marginTop=0;
   document.getElementById("fotopreloaader").src=obrazcel.src;
   }
}

function preloadpic(plik, szer, wys) 

{

var wysplus;
var wyspol;

var picdiv = document.getElementById("picturediv");
var overlay = document.getElementById("overlay");
wysplus = parseInt(wys) + 0;
wyspol = Math.floor((parseInt(wys)/2));
szerpol = Math.floor((parseInt(szer)/2));

if (isIE || isGecko) {
   picdiv.style.top = Math.round((document.documentElement.clientHeight/2)-(wyspol)+document.documentElement.scrollTop)+'px'; 
	//overlay.style.height = document.documentElement.clientHeight +document.documentElement.scrollTop +'px';
overlay.style.height = document.body.scrollHeight + 19 + 'px';


	if (isIE6) {


    picdiv.style.left = Math.round((document.documentElement.clientWidth/2)-(szerpol))+'px';
	overlay.style.display='none';
	//alert(picdiv.style.left);

   }
} else
if (isOpera) {
   picdiv.style.top = Math.round((document.body.clientHeight/2)-(wyspol)+document.body.scrollTop)+'px';
	overlay.style.height = document.documentElement.clientHeight +document.documentElement.scrollTop +'px';

};

picdiv.innerHTML="<div style=\"width:" + szer + "px;height:" + wysplus + "px\"><img id=\"fotopreloaader\" style=\"margin-top:"+wyspol+"px\" src=\"/files/Image/loading_transp.gif\" onclick=\"document.getElementById('picturediv').style.visibility='hidden';document.getElementById('overlay').style.display='none'\" alt=\"Kliknij, aby zamkn±æ zdjêcie\" title=\"Kliknij, aby zamkn±æ zdjêcie\"/></div>";

document.getElementById("overlay").style.display="block";

picdiv.style.visibility="visible";


obrazcel = new Image(); 
obrazcel.src = plik;
czas2=setInterval("wczytaj_fotke('plik')",1200);

}

//shop



function UpdateQty(item)
	{
	itemId = item.name;
	newQty = item.options[item.selectedIndex].text;
				
	document.location.href = 'koszyk.php?action=update_item&prodid='+itemId+'&ilosc='+newQty;
	}

/*
var Tips2 = new Tips($$('.Tips2'), {
	initialize:function(){
		this.fx = new Fx.Style(this.toolTip, 'opacity', {duration: 500, wait: false}).set(0);
	},
	onShow: function(toolTip) {
		this.fx.start(1);
	},
	onHide: function(toolTip) {
		this.fx.start(0);
	}
});

var list = $$('.menuleft li');
list.each(function(element) {
 
	var fx = new Fx.Styles(element, {duration:300, wait:false});
 
	element.addEvent('mouseenter', function(){
		fx.start({
			'margin-left': 5

		});
	});
 
	element.addEvent('mouseleave', function(){
		fx.start({
			'margin-left': 0

		});
	});
 
});
*/

