echo utf8_encode($result);
        exit;
    } elseif ($_POST['me_action'] == 'ADDBOOKITEM') {
        $booking_id = tep_db_prepare_input($_POST['booking_id']);
        $psid = tep_db_prepare_input($_POST['psid']);
        $bqty = tep_db_prepare_input($_POST['bqty']);
        $booking = new stock_booking($booking_id);
        $booking->addItem($psid, $bqty);
        $ajaxResult = array();
        $ajaxResult['psid'] = $psid;
        $ajaxResult['bqty'] = $bqty;
        ajaxReturn($ajaxResult);
        exit;
    }
}
$available_status = stock_booking::getBookingStatus();
unset($available_status[1]);
//$sop_header = 'Create New Stock Booking';
//$sop_contents = array();
//$sop_contents[] = 'Use this module to create a new stock booking order. When set as active, the booked quantity will be reduce from available stock and not used for any orders until it is released (set back as inactive).';
//$sop_contents[] = 'To create a booking order:';
//$sop_contents[] = '1) Choose wheter you want to create a new order or you want to add new products to exsting booking order';
//$sop_contents[] = '2) Specified a name for the order. Please use a name that will easily remind you to the reason of the booking.';
//$sop_contents[] = '3) Choose a status. Select Inactive only if you want to activate the booking later manually.';
//$sop_contents[] = '4) Click the create button ';
//$content .= drawSOPinfo($header, $paragraphs);
$content .= '<div id="step-1"><input id="btn-create" type="button" value="Create new Order" /><input id="btn-existing" type="button" value="Use Existing Order" /></div>';
$content .= '<div id="step-2-create" class="step-2" style="display:none;">';
$content .= '<h2>Create New Order</h2>';
$content .= '<table border="0" cellpadding="0" cellspacing="0">';
$content .= '<tr><td style="width:80px;">Order Name</td><td>:</td><td><input id="booking_name" class="input2" /></td></tr>';