function checkIfClientExists(login) {
	// console.log("start");
	var status = false;

	$.ajax( {
		url : "/php/class.ajaxHandler.php",
		async : false,
		data : {
			'login' : login,
			'existanceCheck' : "true" // function name
		},
		success : function(data) {
			if (data == "true") {
				status = true;
			}
		}
	});
	// console.log("end" + status);
	return status;
}



function setItemAmount(type, id, amount) {
	// console.log("type:" + type + " id: " + id + " amount: "+ amount);
	$.ajax( {
		url : "/php/class.ajaxHandler.php",
		async : true,
		data : {
			'type' : type,
			'id' : id,
			'amount' : amount,
			'setItemAmount' : "true" // function name
		},
		success : function(json) {
			var data = jQuery.parseJSON(json);

// console.log("servicesCount" + data.servicesCount);
// console.log("addonsCount" + data.addonsCount);
// console.log("servicesCount" + data.servicesCount);

		$("#cartHodler").load(
				"/index.php?id_cat=4 #cartHodler > *",
				function(response, status, xhr) {
					if (status == "error") {
						var msg = "Sorry but there was an error: ";
						$("#error").html(
								msg + xhr.status + " " + xhr.statusText);
					} else {
						cartHandler();
					}
				});

	}
	});
	return status;
}

function getCartItemsCount() {
	$.ajax( {
		url : "/php/class.ajaxHandler.php",
		async : false,
		data : {
			'getCartItemsCount' : "true"
		},
		success : function(data) {
			count = data;
		}

	});
	return count;
}

function getUserType() {
	$.ajax( {
		url : "/php/class.ajaxHandler.php",
		async : false,
		data : {
			'getUserType' : "true"
		},
		success : function(data) {
			type = data;
		}

	});
	return type;
}

function hasServices() {
	$.ajax( {
		url : "/php/class.ajaxHandler.php",
		async : false,
		data : {
			'hasServices' : "true"
		},
		success : function(data) {
			type = data;
		}

	});
	return type;
}

