function currLocation(locationReferer) {
	window.location = locationReferer; 
}

function countPotisk(absolute_url, order_count, calc, potiskTitle, absolute_logs, lang) {
	
	if (document.getElementById('countPotisk')) {
		xmlHttp_cart_p = createXmlHttpObject();
		
		if (xmlHttp_cart_p==null) {
			ajax_not_supported();
			return false;
		} 
		
		var priceVyroba = document.getElementById('price_'+ potiskTitle).value;
		
		var url_p = absolute_url + '/ajax_potisk.php?order_count='+order_count+'&absolute_logs='+absolute_logs+'&lang='+lang+'&calc='+calc+'&potiskTitle='+potiskTitle+'&vyroba='+priceVyroba;
		
		var block_p = document.getElementById('countPotisk');
		
		xmlHttp_cart_p.onreadystatechange = function () {
			stateChanged(xmlHttp_cart_p,block_p,block_p);
		}
		
		xmlHttp_cart_p.open("GET",url_p,true);
		xmlHttp_cart_p.send(null);
		
		return true;
		
	}
	
}

function defaultPaging(locationReferer, absolute_url, sess, count) {
			
		xmlHttp_cart = createXmlHttpObject();
		
		if (xmlHttp_cart==null) {
			ajax_not_supported();
			return false;
		} 
		
		//alert(locationReferer);
		
		var url = absolute_url + '/ajax_shop.php?maxOnPage='+count+'&sess='+sess;
		
		//window.location(locationReferer);
		
				
		var block = document.getElementById('shopSess');
		
		xmlHttp_cart.onreadystatechange = function () {
			stateChanged(xmlHttp_cart,block,block);
			setTimeout("window.location.replace('"+ locationReferer +"');", 50);
		}
		
		xmlHttp_cart.open("GET",url,true);
		xmlHttp_cart.send(null);
		
		//setTimeout("window.location.replace('"+ locationReferer +"');", 10);
		//currLocation(locationReferer);
		
		return true;
}

function defaultOrdering(locationReferer, absolute_url, sess, order) {
			
		xmlHttp_cart = createXmlHttpObject();
		
		if (xmlHttp_cart==null) {
			ajax_not_supported();
			return false;
		} 
		
		//alert(locationReferer);
		
		var url = absolute_url + '/ajax_shop.php?shop_default_order='+order+'&sess='+sess;
		
		//window.location(locationReferer);
		
				
		var block = document.getElementById('shopSess');
		
		xmlHttp_cart.onreadystatechange = function () {
			stateChanged(xmlHttp_cart,block,block);
			setTimeout("window.location.replace('"+ locationReferer +"');", 50);
		}
		
		xmlHttp_cart.open("GET",url,true);
		xmlHttp_cart.send(null);
		
		//setTimeout("window.location.replace('"+ locationReferer +"');", 10);
		//currLocation(locationReferer);
		
		return true;
}

function defaultOrderingType(locationReferer, absolute_url, sess, type) {
			
		xmlHttp_cart = createXmlHttpObject();
		
		if (xmlHttp_cart==null) {
			ajax_not_supported();
			return false;
		} 
		
		//alert(locationReferer);
		
		var url = absolute_url + '/ajax_shop.php?orderingType='+type+'&sess='+sess;
		
		//window.location(locationReferer);
		
				
		var block = document.getElementById('shopSess');
		
		xmlHttp_cart.onreadystatechange = function () {
			stateChanged(xmlHttp_cart,block,block);
			setTimeout("window.location.replace('"+ locationReferer +"');", 50);
		}
		
		xmlHttp_cart.open("GET",url,true);
		xmlHttp_cart.send(null);
		
		//setTimeout("window.location.replace('"+ locationReferer +"');", 10);
		//currLocation(locationReferer);
		
		return true;
}

