function displayWindow(b,d,a){var c=window.open(b,"displayWindow","width="+d+",height="+a+",resizable=0,scrollbars=no,menubar=no")}function displayWindow2(b,d,a){var c=window.open(b,"displayWindow","width="+d+",height="+a+",resizable=1,scrollbars=yes,menubar=yes")}function UpdateQty(b,a){itemId=b.name;newQty=b.options[b.selectedIndex].text;document.location.href="koszyk.php?action=update_item&prodid="+itemId+"&ilosc="+newQty+"&m="+a}function UpdateQtyRewrite(b,a){itemId=b.name;newQty=b.options[b.selectedIndex].text;document.location.href="/koszyk/zmien/"+itemId+"/"+newQty+"/"+a}function UpdateQtyShortRewrite(b,a){itemId=b.name;newQty=b.options[b.selectedIndex].text;document.location.href="/koszyk/zmien/"+itemId+"/"+newQty};

window.addEvent("domready",function(){
if($('i1')!=null && $('i2')!=null && $('i3')!=null) {
var arr = new Array();
var arr2 = new Array();
arr[0] = $('i1').offsetHeight;
arr[1] = $('i2').offsetHeight;
arr[2] = $('i3').offsetHeight;

arr2[0] = $('j1').offsetHeight;
arr2[1] = $('j2').offsetHeight;
arr2[2] = $('j3').offsetHeight;

var max = Math.max(arr[0], arr[1],arr[2]);
var max2 = Math.max(arr2[0], arr2[1],arr2[2]);

$$('.row1_height').set('styles',{height:max-30+'px'});
$$('.row2_height').set('styles',{height:max2+'px'});
}

//carousel
var horizontal;;
	
	horizontal = new Fx.Scroll.Carousel('horizontal',{
		mode: 'horizontal',
		onStart: function(){
			horizontal.getCurrent().tween('color','#000');
		},
		onComplete: function(){
			horizontal.getCurrent().tween('color','#fff');
		}
	});
	

	
	$('next').addEvent('click', function(){
		horizontal.toNext();
	});
	
	$('previous').addEvent('click', function(){
		horizontal.toPrevious();
	});
	/*
	$('loopOnScrollEnd').addEvent('change',function(){
		var bool = (this.value == 'true') ? true : false;
		horizontal.options.loopOnScrollEnd = bool;
	});
	
	var events = {
		onNext: function(){ $('onNext').highlight(); },
		onPrevious: function(){ $('onPrevious').highlight(); },
		onLoop: function(){ $('onLoop').highlight(); },
		onPreviousLoop: function(){ $('onPreviousLoop').highlight(); },
		onNextLoop: function(){ $('onNextLoop').highlight(); }
	};
	*/
	//horizontal.addEvents(events);

});



