function loadPage(){
	initLightbox();
	if($("gototill")){
		$("gototill").onclick = function(){
			return window.location.href = "kasa.html";
		}
	}
	if($("gotobasket")){
		$("gotobasket").onclick = function(){
			return window.location.href = "moj-koszyk.html";
		}
	}
	if($("priceproducts")){
		$("priceproducts").onclick = function(){
			var hendle = $("configuratorform");
			var selects = hendle.getElementsByTagName("select");
			var id = "";
			for(x=0;x<selects.length;x++){
				id = id + selects[x].value + ".";
			}
			advAJAX.get({
			    url: "modules/getprices.php?id=" + id,
			    onInitialization : function(obj) { 
					$("viewprice").style.visibility = "visible";
					$("viewprice").innerHTML = "Wyliczam sumę ..."; 
				},
				onSuccess : function(obj) { $("viewprice").innerHTML = "Cena skonfigurowanego zestawu: <strong>" + obj.responseText + " zł</strong>"; }
			});
		}
	}
	if($("gotogallery")){
		$("gotogallery").onchange = function(){
			return window.location.href = $("gotogallery").value;
		}
	}
	if($("gotofiles")){
		$("gotofiles").onchange = function(){
			return window.location.href = $("gotofiles").value;
		}
	}
	if($("printwindow")){
		$("printwindow").onclick = function(){
			return window.print();
		}
	}
}

function changeProduct(kind,id){
	var number = $("number_"+id).value;
	if(kind == 1)number--;
	if(kind == 2)number++;
	if(number <= 0)number = 0;
	$("number_"+id).value = number;
}
