

    function myConfirm(url){
        Dialog.confirm($("login").innerHTML, {
        windowParameters: {
	className:"alphacube",
        width:400},
        okLabel: "Tak",
            cancelLabel: "Nie",
        ok:function(win){
        Windows.focusedWindow.hide();
        location.href=url;
	}
	});
    }

    function sell(id,newUrl){
	var url = '/a/sellProduct/'+id+'/';
	new Ajax.Request(url, {
	    method: 'get',
	    onSuccess: function(transport) {
    		var notice = $('notice');
		if(transport.responseText=='OK'){
		    document.location.href=newUrl;
		    return false;
		}else
		    return false;
                }
        });
    }
